lib/replace: prefer inttypes.h over stdint.h
authorChristian Ambach <ambi@samba.org>
Tue, 9 Apr 2013 21:10:16 +0000 (23:10 +0200)
committerChristian Ambach <ambi@samba.org>
Mon, 6 May 2013 14:33:38 +0000 (16:33 +0200)
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>
lib/replace/replace.h

index 9774da4673f5f0ed7e56748da365c60ff9f94c90..2262a8bd38f2c6ca8c3fb6767e3bec20f6861b8f 100644 (file)
 #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