diff --git a/lib/avilib-0.6.10/avilib.c b/lib/avilib-0.6.10/avilib.c index 1f21c758a..768f108d4 100644 --- a/lib/avilib-0.6.10/avilib.c +++ b/lib/avilib-0.6.10/avilib.c @@ -476,9 +476,9 @@ static int avi_add_odml_index_entry(avi_t *AVI, unsigned char *tag, long flags, if (AVI->video_superindex->nEntriesInUse > NR_IXNN_CHUNKS) { fprintf (stderr, "Internal error in avilib - redefine NR_IXNN_CHUNKS\n"); - fprintf (stderr, "[avilib dump] cur_std_idx=%d NR_IXNN_CHUNKS=%d" - "POS=" LLD " towrite=" LLD "\n", - cur_std_idx,NR_IXNN_CHUNKS, AVI->pos, towrite); + /* fprintf (stderr, "[avilib dump] cur_std_idx=%d NR_IXNN_CHUNKS=%d" */ + /* "POS=" LLD " towrite=" LLD "\n", */ + /* cur_std_idx,NR_IXNN_CHUNKS, AVI->pos, towrite); */ return -1; } diff --git a/lib/librmff/librmff.h b/lib/librmff/librmff.h index e676bea2c..1a8cbc160 100644 --- a/lib/librmff/librmff.h +++ b/lib/librmff/librmff.h @@ -1000,14 +1000,12 @@ void rmff_put_uint32_be(void *buf, uint32_t value); */ void rmff_put_uint32_le(void *buf, uint32_t value); -#if defined(ARCH_LITTLEENDIAN) +#if !defined(WORDS_BIGENDIAN) || (WORDS_BIGENDIAN != 1) # define rmff_get_uint32_me(b) rmff_get_uint32_le(b) # define rmff_put_uint32_me(b) rmff_put_uint32_le(b) -#elif defined(ARCH_BIGENDIAN) +#else # define rmff_get_uint32_me(b) rmff_get_uint32_be(b) # define rmff_put_uint32_me(b) rmff_put_uint32_be(b) -#else -# error Neither ARCH_LITTLEENDIAN nor ARCH_BIGENDIAN has been defined. #endif #if defined(__cplusplus) diff --git a/src/common/common.h b/src/common/common.h index b97d6cbf9..6bf55b68b 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -16,9 +16,10 @@ #undef min #undef max -#include - #include +#include +#include +#include #include #include #include @@ -26,20 +27,10 @@ #include #include #include +#include #include -#include -#include - -#if defined(HAVE_SYS_TYPES_H) -# include -#endif // HAVE_SYS_TYPES_H -#if defined(HAVE_STDINT_H) -# include -#endif // HAVE_STDINT_H -#if defined(HAVE_INTTYPES_H) -# include -#endif // HAVE_INTTYPES_H +#include // Don't support user-defined literals in fmt as they aren't used by // MKVToolNix and produce a compiler warning in -Wpedantic diff --git a/src/common/os.h b/src/common/os.h index 92cde3a9d..cce8d088f 100644 --- a/src/common/os.h +++ b/src/common/os.h @@ -14,9 +14,6 @@ #include "config.h" -// For PRId64 and PRIu64: -#define __STDC_FORMAT_MACROS - #if (defined(_WIN32) || defined(WIN32) || defined(__MINGW32__)) && !defined(__CYGWIN__) # define SYS_WINDOWS #elif defined(__APPLE__) @@ -53,57 +50,8 @@ # define strncasecmp _strnicmp # define strcasecmp _stricmp -using int64_t = __int64; -using int32_t = __int32; -using int16_t = __int16; -using int8_t = __int8; -using uint64_t = unsigned __int64; -using uint32_t = unsigned __int32; -using uint16_t = unsigned __int16; -using uint8_t = unsigned __int8; - -# define nice(a) -using ssize_t = _fsize_t; #define PACKED_STRUCTURE #else // COMP_MSC #define PACKED_STRUCTURE __attribute__((__packed__)) #endif // COMP_MSC - -#if defined(COMP_MINGW) || defined(COMP_MSC) - -# if defined(COMP_MINGW) -// mingw is a special case. It does have inttypes.h declaring -// PRId64 to be I64d, but it warns about "int type format, different -// type argument" if %I64d is used with a int64_t. The mx* functions -// convert %lld to %I64d on mingw/msvc anyway. -# undef PRId64 -# define PRId64 "lld" -# undef PRIu64 -# define PRIu64 "llu" -# undef PRIx64 -# define PRIx64 "llx" -# else -// MSVC doesn't have inttypes, nor the PRI?64 defines. -# define PRId64 "I64d" -# define PRIu64 "I64u" -# define PRIx64 "I64x" -# endif // defined(COMP_MINGW) - -#endif // COMP_MINGW || COMP_MSC - -#define LLD "%" PRId64 -#define LLU "%" PRIu64 - -#if defined(HAVE_NO_INT64_T) -using int64_t = INT64_TYPE; -#endif -#if defined(HAVE_NO_UINT64_T) -using uint64_t = UINT64_TYPE; -#endif - -#if defined(WORDS_BIGENDIAN) && (WORDS_BIGENDIAN == 1) -# define ARCH_BIGENDIAN -#else -# define ARCH_LITTLEENDIAN -#endif