summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-07-04 00:00:24 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-07-04 00:00:24 +0900
commitaa944f4ef6a3ceaaf8b6068727d93898860e01f1 (patch)
tree220c70b3a68399425546ca48995f56b69d361de0 /src/common.h
parent98e1c6c5809610c60baf8d15542a8340a9e307aa (diff)
Guarded include of stdint.h and inttypes.h
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/common.h b/src/common.h
index e107efc8..86db14d4 100644
--- a/src/common.h
+++ b/src/common.h
@@ -78,9 +78,14 @@
// use C99 limit macros
#define __STDC_LIMIT_MACROS
// included here for compatibility issues with old compiler/libraries.
-#include <stdint.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif // HAVE_STDINT_H
+
// For PRId64
#define __STDC_FORMAT_MACROS
-#include <inttypes.h>
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif // HAVE_INTTYPES_H
#endif // D_COMMON_H