From: habu Date: Sun, 18 Nov 2012 13:43:54 +0000 (+0000) Subject: autoconfから--enable-c99を削除し、stdint.hの有無で判定するよう変更 X-Git-Tag: v2.1.2~229 X-Git-Url: http://git.osdn.net/view?p=hengband%2Fhengband.git;a=commitdiff_plain;h=82565983d582ea28268eaa16a9d90527e488c318 autoconfから--enable-c99を削除し、stdint.hの有無で判定するよう変更 --- diff --git a/configure.in b/configure.in index 11b02738e..b0fe1129d 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/src/h-type.h b/src/h-type.h index 62d6a7b12..126ca6ec5 100644 --- a/src/h-type.h +++ b/src/h-type.h @@ -1,9 +1,5 @@ /* File: h-type.h */ -#ifdef C99 -#include -#endif - #ifndef INCLUDED_H_TYPE_H #define INCLUDED_H_TYPE_H @@ -43,6 +39,9 @@ */ +#ifdef HAVE_STDINT_H +#include +#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