mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
Re-define PRI?64 for mingw. The reason is that mingw does not recognize %I64? as 64 bit formats but assumes integer formats and warngs about int64_t arguments. The mxmsg functions already convert %ll? etc into the proper %I64? values on Windows, so I can use %ll? just to shut up mingw.
This commit is contained in:
parent
b72486e3ec
commit
4b6932b8e9
@ -64,6 +64,16 @@ typedef _fsize_t ssize_t;
|
|||||||
#define PACKED_STRUCTURE __attribute__((__packed__))
|
#define PACKED_STRUCTURE __attribute__((__packed__))
|
||||||
#endif // COMP_MSC
|
#endif // COMP_MSC
|
||||||
|
|
||||||
|
#if defined(HAVE_SYS_TYPES_H)
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif // HAVE_SYS_TYPES_H
|
||||||
|
#if defined(HAVE_STDINT_H)
|
||||||
|
# include <stdint.h>
|
||||||
|
#endif // HAVE_STDINT_H
|
||||||
|
#if defined(HAVE_INTTYPES_H)
|
||||||
|
# include <inttypes.h>
|
||||||
|
#endif // HAVE_INTTYPES_H
|
||||||
|
|
||||||
#if defined(COMP_MINGW) || defined(COMP_MSC)
|
#if defined(COMP_MINGW) || defined(COMP_MSC)
|
||||||
|
|
||||||
// For DLL stuff...
|
// For DLL stuff...
|
||||||
@ -77,26 +87,29 @@ typedef _fsize_t ssize_t;
|
|||||||
# define MTX_DLL_API
|
# define MTX_DLL_API
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#else // COMP_MINGW || COMP_MSC
|
# if defined(COMP_MINGW)
|
||||||
|
// mingw is a special case. It does have inttypes.h declaring
|
||||||
# define MTX_DLL_API
|
// PRId64 to be I64d, but it warns about "int type format, different
|
||||||
#endif // COMP_MINGW || COMP_MSC
|
// type argument" if %I64d is used with a int64_t. The mx* functions
|
||||||
|
// convert %lld to %I64d on mingw/msvc anyway.
|
||||||
#if defined(HAVE_SYS_TYPES_H)
|
# undef PRId64
|
||||||
# include <sys/types.h>
|
# define PRId64 "lld"
|
||||||
#endif // HAVE_SYS_TYPES_H
|
# undef PRIu64
|
||||||
#if defined(HAVE_STDINT_H)
|
# define PRIu64 "llu"
|
||||||
# include <stdint.h>
|
# undef PRIx64
|
||||||
#endif // HAVE_STDINT_H
|
# define PRIx64 "llx"
|
||||||
#if defined(HAVE_INTTYPES_H)
|
# else
|
||||||
# include <inttypes.h>
|
// MSVC doesn't have inttypes, nor the PRI?64 defines.
|
||||||
#endif // HAVE_INTTYPES_H
|
|
||||||
|
|
||||||
#if defined(COMP_MSC)
|
|
||||||
# define PRId64 "I64d"
|
# define PRId64 "I64d"
|
||||||
# define PRIu64 "I64u"
|
# define PRIu64 "I64u"
|
||||||
# define PRIx64 "I64x"
|
# define PRIx64 "I64x"
|
||||||
#endif
|
# endif // defined(COMP_MINGW)
|
||||||
|
|
||||||
|
#else // COMP_MINGW || COMP_MSC
|
||||||
|
|
||||||
|
# define MTX_DLL_API
|
||||||
|
|
||||||
|
#endif // COMP_MINGW || COMP_MSC
|
||||||
|
|
||||||
#define LLD "%" PRId64
|
#define LLD "%" PRId64
|
||||||
#define LLU "%" PRIu64
|
#define LLU "%" PRIu64
|
||||||
|
Loading…
Reference in New Issue
Block a user