# include <stdbool.h>
#endif
+/* Try to fix format strings for all versions of mingw and mingw64 */
+#if defined( _WIN32 ) && defined( __USE_MINGW_ANSI_STDIO )
+ #undef PRId64
+ #define PRId64 "lld"
+ #undef PRIi64
+ #define PRIi64 "lli"
+ #undef PRIu64
+ #define PRIu64 "llu"
+ #undef PRIo64
+ #define PRIo64 "llo"
+ #undef PRIx64
+ #define PRIx64 "llx"
+ #define snprintf __mingw_snprintf
+ #define vsnprintf __mingw_vsnprintf
+#endif
+
/* Format string sanity checks */
#ifdef __GNUC__
-# define LIBVLC_FORMAT(x,y) __attribute__ ((format(printf,x,y)))
+# 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)))
+# endif
# define LIBVLC_FORMAT_ARG(x) __attribute__ ((format_arg(x)))
# define LIBVLC_USED __attribute__ ((warn_unused_result))
# define LIBVLC_MALLOC __attribute__ ((malloc))
/* 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 );
/*****************************************************************************