diff --git a/Configure b/Configure index ef2257f43838..27410e8f759c 100755 --- a/Configure +++ b/Configure @@ -1111,6 +1111,7 @@ installprefix='' installprefixexp='' installstyle='' installusrbinperl='' +intmaxsize='' intsize='' longsize='' shortsize='' @@ -5787,12 +5788,14 @@ case "$intsize" in #ifdef I_STDLIB #include #endif +#include #include int main() { printf("intsize=%d;\n", (int)sizeof(int)); printf("longsize=%d;\n", (int)sizeof(long)); printf("shortsize=%d;\n", (int)sizeof(short)); + printf("intmaxsize=%d;\n", (int)sizeof(intmax_t)); exit(0); } EOCP @@ -5802,6 +5805,7 @@ EOCP echo "Your integers are $intsize bytes long." echo "Your long integers are $longsize bytes long." echo "Your short integers are $shortsize bytes long." + echo "Your longest integers are $intmaxsize bytes long." else $cat >&4 <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un * This symbol contains the value of sizeof(short) so that the C * preprocessor can make decisions based on it. */ +/* INTMAXSIZE: + * This symbol contains the value of sizeof(intmax_t) so that the C + * preprocessor can make decisions based on it. + */ #define INTSIZE $intsize /**/ #define LONGSIZE $longsize /**/ #define SHORTSIZE $shortsize /**/ +#define INTMAXSIZE $intmaxsize /**/ /* MULTIARCH: * This symbol, if defined, signifies that the build diff --git a/configure.com b/configure.com index f800aecc6ea0..16ec73f2cf30 100644 --- a/configure.com +++ b/configure.com @@ -3263,6 +3263,7 @@ $ OS $ WS "#if defined(__DECC) || defined(__DECCXX)" $ WS "#include " $ WS "#endif" +$ WS "#include " $ WS "#include " $ WS "int main()" $ WS "{" @@ -5574,6 +5575,10 @@ $ gosub type_size_check $ intsize = tmp $ ENDIF $! +$ tmp = "''intmax_t'" +$ gosub type_size_check +$ intmaxsize = tmp +$! $ tmp = "''u32type'" $ gosub type_size_check $ u32size = tmp @@ -6615,6 +6620,7 @@ $ WC "installsitearch='" + installsitearch + "'" $ WC "installsitebin='" + sitebin + "'" $ WC "installsitelib='" + installsitelib + "'" $ WC "installusrbinperl='undef'" +$ WC "intmaxsize='" + intmaxsize + "'" $ WC "intsize='" + intsize + "'" $ WC "ivdformat='" + ivdformat + "'" $ WC "ivsize='" + ivsize + "'" diff --git a/plan9/config_sh.sample b/plan9/config_sh.sample index 3da90256ec4a..9b142bd8aab1 100644 --- a/plan9/config_sh.sample +++ b/plan9/config_sh.sample @@ -850,6 +850,7 @@ installusrbinperl='undef' installvendorarch='' installvendorbin='' installvendorlib='' +intmaxsize='8' intsize='4' issymlink='/bin/test -h' ivdformat='"ld"' diff --git a/win32/config.gc b/win32/config.gc index 017c14d30abc..756fc2f406bc 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -862,6 +862,7 @@ installvendorlib='' installvendorman1dir='' installvendorman3dir='' installvendorscript='' +intmaxsize='8' intsize='4' issymlink='' ivdformat='"ld"' diff --git a/win32/config.vc b/win32/config.vc index 77351781cdc7..b13e276ff74d 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -861,6 +861,7 @@ installvendorlib='' installvendorman1dir='' installvendorman3dir='' installvendorscript='' +intmaxsize='8' intsize='4' issymlink='' ivdformat='"ld"'