diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-14 04:12:53 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-14 04:12:53 +0200 |
commit | 3bd73c926ec83e07051b361c5681c29ced1f4fd3 (patch) | |
tree | 858cf618d09c2fe3628ed053b70ea6209900964d /lib/replace | |
parent | b96329f4f9ed1f70d21c637f696f27a52af6955d (diff) | |
download | samba-3bd73c926ec83e07051b361c5681c29ced1f4fd3.tar.gz samba-3bd73c926ec83e07051b361c5681c29ced1f4fd3.tar.bz2 samba-3bd73c926ec83e07051b361c5681c29ced1f4fd3.zip |
Define inttypes macros if not provided by system.
Diffstat (limited to 'lib/replace')
-rw-r--r-- | lib/replace/replace.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/lib/replace/replace.h b/lib/replace/replace.h index 99fdf53ba4..4ac77e7270 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -56,6 +56,54 @@ #include <inttypes.h> #endif +#ifndef __PRI64_PREFIX +# if __WORDSIZE == 64 +# define __PRI64_PREFIX "l" +# else +# define __PRI64_PREFIX "ll" +# endif +#endif + +/* Decimal notation. */ +#ifndef PRId8 +# define PRId8 "d" +#endif +#ifndef PRId16 +# define PRId16 "d" +#endif +#ifndef PRId32 +# define PRId32 "d" +#endif +#ifndef PRId64 +# define PRId64 __PRI64_PREFIX "d" +#endif + +#ifndef PRIi8 +# define PRIi8 "i" +#endif +#ifndef PRIi8 +# define PRIi16 "i" +#endif +#ifndef PRIi8 +# define PRIi32 "i" +#endif +#ifndef PRIi8 +# define PRIi64 __PRI64_PREFIX "i" +#endif + +#ifndef PRIu8 +# define PRIu8 "u" +#endif +#ifndef PRIu16 +# define PRIu16 "u" +#endif +#ifndef PRIu32 +# define PRIu32 "u" +#endif +#ifndef PRIu64 +# define PRIu64 __PRI64_PREFIX "u" +#endif + #ifdef HAVE_STRING_H #include <string.h> #endif |