Set LLONG_MAX for C89 test.

If we don't have LLONG_MAX, configure will figure out that it can get it
by setting -std=gnu99, at which point we won't be testing C89 any more.
To avoid this, feed it in via CFLAGS.
This commit is contained in:
Darren Tucker 2023-08-31 23:02:35 +10:00
parent f98031773d
commit ff3eda68ce
No known key found for this signature in database
1 changed files with 7 additions and 0 deletions

7
.github/configs vendored
View File

@ -30,6 +30,13 @@ case "$config" in
default|sol64) default|sol64)
;; ;;
c89) c89)
# If we don't have LLONG_MAX, configure will figure out that it can
# get it by setting -std=gnu99, at which point we won't be testing
# C89 any more. To avoid this, feed it in via CFLAGS.
llong_max=`gcc -E -dM - </dev/null | \
awk '$2=="__LONG_LONG_MAX__"{print $3}'`
CPPFLAGS="-DLLONG_MAX=${llong_max}"
CC="gcc" CC="gcc"
CFLAGS="-Wall -std=c89 -pedantic -Werror=vla" CFLAGS="-Wall -std=c89 -pedantic -Werror=vla"
CONFIGFLAGS="--without-zlib" CONFIGFLAGS="--without-zlib"