Include inttypes.h, if we have it, and use the standard format macro PRIi64 if it is defined.
This commit is contained in:
@@ -222,6 +222,7 @@ AC_CHECK_LIB( pthread, pthread_cond_timedwait, AC_DEFINE([HAVE_PTHREAD_COND_TIME
|
||||
|
||||
# Always:
|
||||
AC_DEFINE(_GNU_SOURCE, 1, [Use GNU extensions])
|
||||
AC_DEFINE(__STDC_FORMAT_MACROS, 1, [Use PRId64 and similar])
|
||||
|
||||
AM_CONDITIONAL(HAVE_ALSA, test x$alsa != xfalse )
|
||||
AM_CONDITIONAL(HAVE_GTK, test "$enable_gtk2" != "no" )
|
||||
|
||||
@@ -178,6 +178,8 @@ int64_t pos_map_queue::Search( int64_t iSourceFrame, bool *bApproximate ) const
|
||||
*/
|
||||
#if defined(WIN32)
|
||||
#define LI "%I64i"
|
||||
#elif defined(PRIi64)
|
||||
#define LI "%" PRIi64
|
||||
#else
|
||||
#define LI "%lli"
|
||||
#endif
|
||||
|
||||
@@ -55,6 +55,9 @@
|
||||
#if !defined(MISSING_STDINT_H) /* need to define int64_t if so */
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#if defined(HAVE_INTTYPES_H)
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
|
||||
/* Branch optimizations: */
|
||||
#if defined(__GNUC__)
|
||||
|
||||
Reference in New Issue
Block a user