From f4ec967205c6fa0f3d37aad24335337251f17e16 Mon Sep 17 00:00:00 2001 From: David Levine Date: Thu, 17 Aug 2017 19:45:20 -0400 Subject: [PATCH] Default CFLAGS to -std=c99 instead of -ansi. gcc -ansi -pedantic issued a few warnings about C90 not supporting the "ll" printf length modifier. Ralph pointed out that http://www.unix.org/version4/overview.html says: The following source code portability standards lie at the core of the Single UNIX Specification: POSIX.1-2008 (This is technically identical to the Base Specifications, Issue 7; they are one and the same document.) The ISO/IEC 9899:1999 standard So perhaps we're wrong to expect modern POSIX code to compile as C90. --- build_nmh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_nmh b/build_nmh index 80566701..832bd581 100755 --- a/build_nmh +++ b/build_nmh @@ -364,7 +364,7 @@ if [ -z "$CFLAGS" ]; then if cc -dM -E - &1 | grep __GNUC__ >/dev/null; then #### configure will supply -g -O2 with gcc, but only if CFLAGS #### isn't defined. - CFLAGS='-g -ansi -pedantic' + CFLAGS='-g -std=c99 -pedantic' if [ "$config_debug" = n ]; then CFLAGS="$CFLAGS -O2" else -- 2.56.0