Add missing PRIx32 and PRIx64 compatibility definitions.

This fixes portability to systems that lack C99 inttypes.h.

Thanks to Juan Manuel Guerrero.
This commit is contained in:
Lasse Collin 2010-12-12 16:07:11 +02:00
parent e6baedddcf
commit ce56f63c41
1 changed files with 9 additions and 0 deletions

View File

@ -65,6 +65,9 @@
#ifndef PRIu32 #ifndef PRIu32
# define PRIu32 "u" # define PRIu32 "u"
#endif #endif
#ifndef PRIx32
# define PRIx32 "x"
#endif
#ifndef PRIX32 #ifndef PRIX32
# define PRIX32 "X" # define PRIX32 "X"
#endif #endif
@ -76,6 +79,9 @@
# ifndef PRIu64 # ifndef PRIu64
# define PRIu64 "llu" # define PRIu64 "llu"
# endif # endif
# ifndef PRIx64
# define PRIx64 "llx"
# endif
# ifndef PRIX64 # ifndef PRIX64
# define PRIX64 "llX" # define PRIX64 "llX"
# endif # endif
@ -86,6 +92,9 @@
# ifndef PRIu64 # ifndef PRIu64
# define PRIu64 "lu" # define PRIu64 "lu"
# endif # endif
# ifndef PRIx64
# define PRIx64 "lx"
# endif
# ifndef PRIX64 # ifndef PRIX64
# define PRIX64 "lX" # define PRIX64 "lX"
# endif # endif