소스 검색

Guarded include of stdint.h and inttypes.h

Tatsuhiro Tsujikawa 13 년 전
부모
커밋
aa944f4ef6
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. 7 2
      src/common.h

+ 7 - 2
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