@@ -3449,6 +3449,97 @@ ac_cpp='$CPP $CPPFLAGS'
34493449ac_compile=' $CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34503450ac_link=' $CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34513451ac_compiler_gnu=$ac_cv_c_compiler_gnu
3452+
3453+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking for $CC option to accept ISO C89" >&5
3454+ $as_echo_n " checking for $CC option to accept ISO C89... " >&6 ; }
3455+ if ${ac_cv_prog_cc_c89+: } false ; then :
3456+ $as_echo_n " (cached) " >&6
3457+ else
3458+ ac_cv_prog_cc_c89=no
3459+ ac_save_CC=$CC
3460+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
3461+ /* end confdefs.h. */
3462+ #include <stdarg.h>
3463+ #include <stdio.h>
3464+ struct stat;
3465+ /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3466+ struct buf { int x; };
3467+ FILE * (*rcsopen) (struct buf *, struct stat *, int);
3468+ static char *e (p, i)
3469+ char **p;
3470+ int i;
3471+ {
3472+ return p[i];
3473+ }
3474+ static char *f (char * (*g) (char **, int), char **p, ...)
3475+ {
3476+ char *s;
3477+ va_list v;
3478+ va_start (v,p);
3479+ s = g (p, va_arg (v,int));
3480+ va_end (v);
3481+ return s;
3482+ }
3483+
3484+ /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3485+ function prototypes and stuff, but not '\xHH' hex character constants.
3486+ These don't provoke an error unfortunately, instead are silently treated
3487+ as 'x'. The following induces an error, until -std is added to get
3488+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3489+ array size at least. It's necessary to write '\x00'==0 to get something
3490+ that's true only with -std. */
3491+ int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3492+
3493+ /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3494+ inside strings and character constants. */
3495+ #define FOO(x) 'x'
3496+ int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3497+
3498+ int test (int i, double x);
3499+ struct s1 {int (*f) (int a);};
3500+ struct s2 {int (*f) (double a);};
3501+ int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3502+ int argc;
3503+ char **argv;
3504+ int
3505+ main ()
3506+ {
3507+ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3508+ ;
3509+ return 0;
3510+ }
3511+ _ACEOF
3512+ for ac_arg in ' ' -qlanglvl=extc89 -qlanglvl=ansi -std \
3513+ -Ae " -Aa -D_HPUX_SOURCE" " -Xc -D__EXTENSIONS__"
3514+ do
3515+ CC=" $ac_save_CC $ac_arg "
3516+ if ac_fn_c_try_compile " $LINENO " ; then :
3517+ ac_cv_prog_cc_c89=$ac_arg
3518+ fi
3519+ rm -f core conftest.err conftest.$ac_objext
3520+ test " x$ac_cv_prog_cc_c89 " ! = " xno" && break
3521+ done
3522+ rm -f conftest.$ac_ext
3523+ CC=$ac_save_CC
3524+
3525+ fi
3526+ # AC_CACHE_VAL
3527+ case " x$ac_cv_prog_cc_c89 " in
3528+ x)
3529+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: none needed" >&5
3530+ $as_echo " none needed" >&6 ; } ;;
3531+ xno)
3532+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: unsupported" >&5
3533+ $as_echo " unsupported" >&6 ; } ;;
3534+ * )
3535+ CC=" $CC $ac_cv_prog_cc_c89 "
3536+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: $ac_cv_prog_cc_c89 " >&5
3537+ $as_echo " $ac_cv_prog_cc_c89 " >&6 ; } ;;
3538+ esac
3539+ if test " x$ac_cv_prog_cc_c89 " ! = xno; then :
3540+
3541+ fi
3542+
34523543 ac_ext=c
34533544ac_cpp=' $CPP $CPPFLAGS'
34543545ac_compile=' $CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4115,6 +4206,8 @@ if test "$GCC" = yes; then
41154206 CFLAGS=" $CFLAGS -fno-strength-reduce"
41164207 fi
41174208 fi
4209+
4210+ CPPFLAGS=" $CPPFLAGS -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700"
41184211fi
41194212
41204213{ $as_echo " $as_me :${as_lineno-$LINENO } : checking for clang version" >&5
@@ -4187,7 +4280,7 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
41874280 { $as_echo " $as_me :${as_lineno-$LINENO } : result: yes" >&5
41884281$as_echo " yes" >&6 ; }
41894282 MACOS_X=yes
4190- CPPFLAGS=" $CPPFLAGS -DMACOS_X"
4283+ CPPFLAGS=" $CPPFLAGS -D_DARWIN_C_SOURCE - DMACOS_X"
41914284
41924285 { $as_echo " $as_me :${as_lineno-$LINENO } : checking --disable-darwin argument" >&5
41934286$as_echo_n " checking --disable-darwin argument... " >&6 ; }
@@ -14341,6 +14434,10 @@ if test "$zOSUnix" = "yes"; then
1434114434 CFLAGS=" -D_ALL_SOURCE -Wc,float\(ieee\),dll"
1434214435fi
1434314436
14437+ if test " $GCC " = yes -a " $GUITYPE " ! = " GTK" ; then
14438+ CFLAGS=" $CFLAGS -ansi"
14439+ fi
14440+
1434414441ac_config_files=" $ac_config_files auto/config.mk:config.mk.in"
1434514442
1434614443cat > confcache << \_ACEOF
0 commit comments