Include inttypes.h, if we have it, and use the standard format macro PRIi64 if it is defined.

This commit is contained in:
Steve Checkoway
2008-12-26 23:21:20 +00:00
parent fc59d1f853
commit 2258f21c2d
3 changed files with 6 additions and 0 deletions
+1
View File
@@ -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" )
+2
View File
@@ -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
+3
View File
@@ -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__)