[vlc-devel] Win64 patch and format

Jean-Baptiste Kempf jb at videolan.org
Wed Sep 2 16:08:44 CEST 2009


Hello,


In order to make VLC to compile for Win64, I had to modify a bit
include/vlc_common.h

====

diff --git a/include/vlc_common.h b/include/vlc_common.h
index 8675ff8..90b5180 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
 -56,9 +56,22 @@
 # include <stdbool.h>
 #endif

+#if defined( _WIN64 ) && defined( __USE_MINGW_ANSI_STDIO )
+ #undef PRId64
+ #define PRId64 "lld"
+ #undef PRIi64
+ #define PRIi64 "lli"
+ #undef PRIu64
+ #define PRIu64 "llu"
+#endif
+
 /* Format string sanity checks */
 #ifdef __GNUC__
+# ifdef _WIN64
+#   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_USED __attribute__ ((warn_unused_result))
 #else
 #   define LIBVLC_FORMAT(x,y)

====

There is NO need to scream, tell me that this isn't a good solution
or that the compiler is broken or get upset.

We have no other compiler that can compile almost all the modules of VLC
for Win64 and it seems a bit too oriented to MSVC.

If you have a good idea to ease the above patch integration, please say so.


Btw: VLC runs on Win64 with 350 modules compiled:
http://people.videolan.org/~jb/Win64/VLC_Win64_1strun.jpg
It does output audio, but stalls unless you give --no-video
FFmpeg and Qt4 are missing...

Best Regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/



More information about the vlc-devel mailing list