X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_common.h;h=31cd81c8a6a2ec13ecca4247cb61503fae472248;hb=46d6d2d1d32b386b5fb8463b44bcb8f14c8a54d1;hp=356cb1612701cdd92a028419365e63f695eaf012;hpb=99fab9089e9e1709d9c3a4bc5ced0c137ac59134;p=vlc diff --git a/include/vlc_common.h b/include/vlc_common.h index 356cb16127..31cd81c8a6 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -38,10 +38,8 @@ * Required vlc headers *****************************************************************************/ #if defined( __BORLANDC__ ) -# undef HAVE_VARIADIC_MACROS # undef HAVE_STDINT_H # undef HAVE_INTTYPES_H -# undef off_t #elif defined( _MSC_VER ) # pragma warning( disable : 4244 ) #endif @@ -53,7 +51,6 @@ *****************************************************************************/ #include #include -#include #include #include @@ -127,10 +124,6 @@ typedef int ptrdiff_t; # endif #endif -#if (defined( WIN32 ) || defined( UNDER_CE )) && !defined( _SSIZE_T_ ) -typedef int ssize_t; -#endif - /* Counter for statistics and profiling */ typedef unsigned long count_t; @@ -143,10 +136,6 @@ typedef uint8_t yuv_data_t; /* Audio volume */ typedef uint16_t audio_volume_t; -#ifndef HAVE_SOCKLEN_T -typedef int socklen_t; -#endif - /** * High precision date or time interval * @@ -494,7 +483,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ # endif #else # ifdef __cplusplus -# if HAVE_ATTRIBUTE_VISIBILITY +# ifdef HAVE_ATTRIBUTE_VISIBILITY # define VLC_PUBLIC_API __attribute__((visibility("default"))) # define VLC_PRIVATE_API __attribute__((visibility("default"))) # define VLC_EXPORT( type, name, args ) extern "C" __attribute__((visibility("default"))) type name args @@ -505,7 +494,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ # define VLC_INTERNAL( type, name, args ) extern "C" type name args # endif # else -# if HAVE_ATTRIBUTE_VISIBILITY +# ifdef HAVE_ATTRIBUTE_VISIBILITY # define VLC_PUBLIC_API extern __attribute__((visibility("default"))) # define VLC_PRIVATE_API extern __attribute__((visibility("default"))) # define VLC_EXPORT( type, name, args ) __attribute__((visibility("default"))) type name args @@ -599,6 +588,8 @@ struct gc_object_t VLC_GC_MEMBERS }; +#include /* FIXME: should not be included here */ + static inline void __vlc_gc_incref( gc_object_t * p_gc ) { assert( p_gc->i_gc_refcount > 0 ); @@ -827,34 +818,6 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw ) /* */ #define VLC_UNUSED(x) (void)(x) -/* Alignment of critical dynamic data structure - * - * Not all platforms support memalign so we provide a vlc_memalign wrapper - * void *vlc_memalign( size_t align, size_t size, void **pp_orig ) - * *pp_orig is the pointer that has to be freed afterwards. - */ -#if 0 -#ifdef HAVE_POSIX_MEMALIGN -# define vlc_memalign(align,size,pp_orig) \ - ( !posix_memalign( pp_orig, align, size ) ? *(pp_orig) : NULL ) -#endif -#endif -#ifdef HAVE_MEMALIGN - /* Some systems have memalign() but no declaration for it */ - void * memalign( size_t align, size_t size ); - -# define vlc_memalign(pp_orig,align,size) \ - ( *(pp_orig) = memalign( align, size ) ) - -#else /* We don't have any choice but to align manually */ -# define vlc_memalign(pp_orig,align,size) \ - (( *(pp_orig) = malloc( size + align - 1 )) \ - ? (void *)( (((unsigned long)*(pp_orig)) + (unsigned long)(align-1) ) \ - & (~(unsigned long)(align-1)) ) \ - : NULL ) - -#endif - /* Stuff defined in src/extras/libc.c */ #ifndef HAVE_STRDUP # define strdup vlc_strdup @@ -1251,11 +1214,6 @@ VLC_EXPORT( const char *, VLC_Changeset, ( void ) ); extern vlc_threadvar_t msg_context_global_key; -#if defined( __BORLANDC__ ) -# undef PACKAGE -# define PACKAGE -#endif - #if defined( WIN32 ) || defined( UNDER_CE ) # define DIR_SEP_CHAR '\\' # define DIR_SEP "\\"