libbluray | branch: master | Jean-Baptiste Kempf <[email protected]> | Tue May 27 11:49:51 2014 +0200| [e2e355ab62fe25ce42080423fdafa9e9662d04d7] | committer: Jean-Baptiste Kempf
Use GNU/Mingw printf for Mingw builds This should kill most warnings when crosscompiling for Windows > http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=e2e355ab62fe25ce42080423fdafa9e9662d04d7 --- configure.ac | 1 + src/util/attributes.h | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b32e04d..4ca8369 100644 --- a/configure.ac +++ b/configure.ac @@ -37,6 +37,7 @@ case "${host_os}" in SYS=mingw32 AC_DEFINE([_WIN32_WINNT], 0x0501, [Define to '0x0500' for Windows XP APIs.]) AC_DEFINE([_WIN32_IE], 0x0501, [Define to '0x0501' for IE 5.01.]) + CPPFLAGS="${CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=1" ;; esac ;; diff --git a/src/util/attributes.h b/src/util/attributes.h index c16853e..9aa84d8 100644 --- a/src/util/attributes.h +++ b/src/util/attributes.h @@ -21,7 +21,11 @@ #define LIBBLURAY_ATTRIBUTES_H_ #if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3 )) -# define BD_ATTR_FORMAT_PRINTF(format,var) __attribute__((__format__(__printf__,format,var))) +# if defined(_WIN32) +# define BD_ATTR_FORMAT_PRINTF(format,var) __attribute__((__format__(__gnu_printf__,format,var))) +# else +# define BD_ATTR_FORMAT_PRINTF(format,var) __attribute__((__format__(__printf__,format,var))) +# endif # define BD_ATTR_MALLOC __attribute__((__malloc__)) # define BD_ATTR_PACKED __attribute__((packed)) #else _______________________________________________ libbluray-devel mailing list [email protected] https://mailman.videolan.org/listinfo/libbluray-devel
