OSDN Git Service

autoconfから--enable-c99を削除し、stdint.hの有無で判定するよう変更
authorhabu <habu@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 18 Nov 2012 13:43:54 +0000 (13:43 +0000)
committerhabu <habu@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 18 Nov 2012 13:43:54 +0000 (13:43 +0000)
configure.in
src/h-type.h

index 11b0273..b0fe112 100644 (file)
@@ -48,9 +48,6 @@ AC_ARG_ENABLE(worldscore,
 [  --disable-worldscore    disable worldscore support], ,AC_DEFINE(WORLD_SCORE, 1, [Allow the game to send scores to the score server]))
 AC_ARG_ENABLE(chuukei,
 [  --enable-chuukei        enable internet chuukei support], AC_DEFINE(CHUUKEI, 1, [Chuukei mode]))
-AC_ARG_ENABLE(c99,
-[  --enable-c99      use c99 option for typedef], AC_DEFINE(C99,
- 1, [C99 Compile]))
 
 dnl -fno-strength-reduce prevents a bug in some versions of gcc
 if test "$GCC" = yes; then
@@ -98,7 +95,7 @@ if test "$have_x" = yes; then
 fi
 
 AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h strings.h sys/file.h sys/ioctl.h sys/time.h termio.h unistd.h)
+AC_CHECK_HEADERS(fcntl.h strings.h sys/file.h sys/ioctl.h sys/time.h termio.h unistd.h stdint.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
index 62d6a7b..126ca6e 100644 (file)
@@ -1,9 +1,5 @@
 /* File: h-type.h */
 
-#ifdef C99
-#include <stdint.h>
-#endif
-
 #ifndef INCLUDED_H_TYPE_H
 #define INCLUDED_H_TYPE_H
 
@@ -43,6 +39,9 @@
  */
 
 
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
 
 /*** Special 4 letter names for some standard types ***/
 
@@ -117,7 +116,7 @@ typedef unsigned long huge;
 
 
 /* Signed/Unsigned 16 bit value */
-#ifdef C99
+#ifdef HAVE_STDINT_H
 typedef int16_t s16b;
 typedef uint16_t u16b;
 #else
@@ -126,7 +125,7 @@ typedef unsigned short u16b;
 #endif
 
 /* Signed/Unsigned 32 bit value */
-#ifdef C99
+#ifdef HAVE_STDINT_H
 typedef int32_t s32b;
 typedef uint32_t u32b;
 #else