Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Configure
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,7 @@ installprefix=''
installprefixexp=''
installstyle=''
installusrbinperl=''
intmaxsize=''
intsize=''
longsize=''
shortsize=''
Expand Down Expand Up @@ -5787,12 +5788,14 @@ case "$intsize" in
#ifdef I_STDLIB
#include <stdlib.h>
#endif
#include <stdint.h>
#include <stdio.h>
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
Expand All @@ -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 <<EOM
!
Expand All @@ -5822,6 +5826,10 @@ EOM
rp="What is the size of a short integer (in bytes)?"
. ./myread
shortsize="$ans"
dflt=$longsize
rp="What is the size of a intmax_t integer (in bytes)?"
. ./myread
intmaxsize="$ans"
fi
;;
esac
Expand Down Expand Up @@ -24264,7 +24272,7 @@ $rm_try
set i_stdckdint
eval $setvar

: see if stdint is available
: stdint.h should be available, but this makes sure it gets in config.h
set stdint.h i_stdint
eval $inhdr

Expand Down Expand Up @@ -25753,6 +25761,7 @@ installvendorlib='$installvendorlib'
installvendorman1dir='$installvendorman1dir'
installvendorman3dir='$installvendorman3dir'
installvendorscript='$installvendorscript'
intmaxsize='$intmaxsize'
intsize='$intsize'
issymlink='$issymlink'
ivdformat='$ivdformat'
Expand Down
1 change: 1 addition & 0 deletions Cross/config.sh-arm-linux
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,7 @@ installvendorlib=''
installvendorman1dir=''
installvendorman3dir=''
installvendorscript=''
intmaxsize='8'
intsize='4'
issymlink='/usr/bin/test -h'
ivdformat='"ld"'
Expand Down
1 change: 1 addition & 0 deletions Cross/config.sh-arm-linux-n770
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,7 @@ installvendorlib=''
installvendorman1dir=''
installvendorman3dir=''
installvendorscript=''
intmaxsize='8'
intsize='4'
issymlink='/usr/bin/test -h'
ivdformat='"ld"'
Expand Down
4 changes: 4 additions & 0 deletions Porting/Glossary
Original file line number Diff line number Diff line change
Expand Up @@ -4134,6 +4134,10 @@ installvendorscript (vendorscript.U):
those systems using AFS. For extra portability, only this variable
should be used in makefiles.

intmaxsize (intsize.U):
This variable contains the value of the INTMAXSIZE symbol, which
indicates to the C program how many bytes there are in intmax_t.

intsize (intsize.U):
This variable contains the value of the INTSIZE symbol, which
indicates to the C program how many bytes there are in an int.
Expand Down
1 change: 1 addition & 0 deletions Porting/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,7 @@ installvendorlib=''
installvendorman1dir=''
installvendorman3dir=''
installvendorscript=''
intmaxsize='8'
intsize='4'
issymlink='test -h'
ivdformat='"ld"'
Expand Down
5 changes: 5 additions & 0 deletions config_h.SH
Original file line number Diff line number Diff line change
Expand Up @@ -799,9 +799,14 @@ sed <<!GROK!THIS! >$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
Expand Down
6 changes: 6 additions & 0 deletions configure.com
Original file line number Diff line number Diff line change
Expand Up @@ -3263,6 +3263,7 @@ $ OS
$ WS "#if defined(__DECC) || defined(__DECCXX)"
$ WS "#include <stdlib.h>"
$ WS "#endif"
$ WS "#include <stdint.h>"
$ WS "#include <stdio.h>"
$ WS "int main()"
$ WS "{"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 + "'"
Expand Down
1 change: 1 addition & 0 deletions plan9/config_sh.sample
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,7 @@ installusrbinperl='undef'
installvendorarch=''
installvendorbin=''
installvendorlib=''
intmaxsize='8'
intsize='4'
issymlink='/bin/test -h'
ivdformat='"ld"'
Expand Down
1 change: 1 addition & 0 deletions win32/config.gc
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@ installvendorlib=''
installvendorman1dir=''
installvendorman3dir=''
installvendorscript=''
intmaxsize='8'
intsize='4'
issymlink=''
ivdformat='"ld"'
Expand Down
1 change: 1 addition & 0 deletions win32/config.vc
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@ installvendorlib=''
installvendorman1dir=''
installvendorman3dir=''
installvendorscript=''
intmaxsize='8'
intsize='4'
issymlink=''
ivdformat='"ld"'
Expand Down
Loading