diff options
author | Christian Ambach <ambi@samba.org> | 2013-04-09 23:10:16 +0200 |
---|---|---|
committer | Christian Ambach <ambi@samba.org> | 2013-05-06 16:33:38 +0200 |
commit | d68e676cacdcd346f0555c80a3389f50079d2e4f (patch) | |
tree | ef0e5510815565ee09288aea707335fa5be207f5 | |
parent | bbf62213efb0b77388aff1f5feb852414e1128a2 (diff) | |
download | samba-d68e676cacdcd346f0555c80a3389f50079d2e4f.tar.gz samba-d68e676cacdcd346f0555c80a3389f50079d2e4f.tar.bz2 samba-d68e676cacdcd346f0555c80a3389f50079d2e4f.zip |
lib/replace: prefer inttypes.h over stdint.h
according to C99 7.8, inttypes.h should include stdint.h so prefer inttypes.h
and fall back to stdint.h (and our own definitions of PRI*) only when inttypes.h
could not be found
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
-rw-r--r-- | lib/replace/replace.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/replace/replace.h b/lib/replace/replace.h index 9774da4673..2262a8bd38 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -46,14 +46,14 @@ #endif -#ifdef HAVE_STDINT_H +#ifdef HAVE_INTTYPES_H +#define __STDC_FORMAT_MACROS +#include <inttypes.h> +#elif HAVE_STDINT_H #include <stdint.h> /* force off HAVE_INTTYPES_H so that roken doesn't try to include both, which causes a warning storm on irix */ #undef HAVE_INTTYPES_H -#elif HAVE_INTTYPES_H -#define __STDC_FORMAT_MACROS -#include <inttypes.h> #endif #ifdef HAVE_MALLOC_H |