/* Format string sanity checks */
#ifdef __GNUC__
-# if defined( _WIN32 ) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 4
+# if defined( _WIN32 ) && (__GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 4 ) )
# define LIBVLC_FORMAT(x,y) __attribute__ ((format(gnu_printf,x,y)))
# else
# define LIBVLC_FORMAT(x,y) __attribute__ ((format(printf,x,y)))
typedef struct input_thread_t input_thread_t;
typedef struct input_thread_sys_t input_thread_sys_t;
typedef struct input_item_t input_item_t;
+typedef struct input_item_node_t input_item_node_t;
typedef struct access_t access_t;
typedef struct access_sys_t access_sys_t;
typedef struct stream_t stream_t;
int i_flags; \
\
/* Object properties */ \
- volatile bool b_error; /**< set by the object */ \
volatile bool b_die; /**< set by the outside */ \
bool b_force; /**< set by the outside (eg. module_need()) */ \
\
- /** Just a reminder so that people don't cast garbage */ \
- bool be_sure_to_add_VLC_COMMON_MEMBERS_to_struct; \
- \
/* Stuff related to the libvlc structure */ \
libvlc_int_t *p_libvlc; /**< (root of all evil) - 1 */ \
\
/* VLC_OBJECT: attempt at doing a clever cast */
#ifdef __GNUC__
-# define VLC_OBJECT( x ) \
- (((vlc_object_t *)(x))+0*(((__typeof__(x))0)->be_sure_to_add_VLC_COMMON_MEMBERS_to_struct))
+# ifndef __cplusplus
+# define VLC_OBJECT( x ) \
+ __builtin_choose_expr(__builtin_offsetof(__typeof__(*x), psz_object_type), \
+ (void)0 /* screw you */, (vlc_object_t *)(x))
+# else
+# define VLC_OBJECT( x ) \
+ ((vlc_object_t *)(x) \
+ + 0 * __builtin_offsetof(__typeof__(*x), psz_object_type))
+# endif
#else
# define VLC_OBJECT( x ) ((vlc_object_t *)(x))
#endif
/* dir wrappers (defined in src/extras/libc.c) */
VLC_EXPORT(int, vlc_wclosedir, ( void *_p_dir ));
+VLC_EXPORT( void, vlc_tdestroy, ( void *, void (*)(void *) ) );
+
/* Fast large memory copy and memory set */
VLC_EXPORT( void *, vlc_memcpy, ( void *, const void *, size_t ) );
VLC_EXPORT( void *, vlc_memset, ( void *, int, size_t ) );
VLC_EXPORT( const char *, VLC_Version, ( void ) LIBVLC_USED );
VLC_EXPORT( const char *, VLC_CompileBy, ( void ) LIBVLC_USED );
VLC_EXPORT( const char *, VLC_CompileHost, ( void ) LIBVLC_USED );
-VLC_EXPORT( const char *, VLC_CompileDomain, ( void ) LIBVLC_USED );
VLC_EXPORT( const char *, VLC_Compiler, ( void ) LIBVLC_USED );
/*****************************************************************************