Skip to content

Commit

Permalink
Set LLONG_MAX for C89 test.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
daztucker committed Aug 31, 2023
1 parent f980317 commit ff3eda6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/configs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ case "$config" in
default|sol64)
;;
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"
CFLAGS="-Wall -std=c89 -pedantic -Werror=vla"
CONFIGFLAGS="--without-zlib"
Expand Down

0 comments on commit ff3eda6

Please sign in to comment.