[vlc-devel] Win64 patch and format

Rémi Denis-Courmont remi at remlab.net
Wed Sep 2 17:08:45 CEST 2009

Le mercredi 2 septembre 2009 17:08:44 Jean-Baptiste Kempf, vous avez écrit :
> +#if defined( _WIN64 ) && defined( __USE_MINGW_ANSI_STDIO )
> + #undef PRId64
> + #define PRId64 "lld"
> + #undef PRIi64
> + #define PRIi64 "lli"
> + #undef PRIu64
> + #define PRIu64 "llu"
> +#endif

I'd rather put this in vlc_fixups.h. You may need to include <inttypes.h> 
first. But really, it looks like you should ratehr send a patch to Mingw.

>  /* Format string sanity checks */
>  #ifdef __GNUC__
> +# ifdef _WIN64
> +#   define LIBVLC_FORMAT(x,y) __attribute__ ((format(gnu_printf,x,y)))
> +# else

Wouldn't that apply to any Mingw variant, not just Win64?

> 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.

But then again, without FFMPEG not Qt4, the Win64 port is basically useless. 
If mingw64 <inttypes.h> is buggy, you might as well send them a patch, and 
manually fix your own header installation until they merge.

Rémi Denis-Courmont

More information about the vlc-devel mailing list