1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Try to ensure a C99 compiler.

Some still-supported Linux distributions (Debian jessie and Ubuntu 14.04
at least) still use GCC 4, where C99 isn't the default.

For autoconf, we do it the autotools way. For the standalone Makefiles,
we go for -std=gnu99 rather than c99, to avoid trouble with fdopen().
This commit is contained in:
Jacob Nevins 2019-01-01 13:49:05 +00:00
parent b6f296a17a
commit 4f54dc0c5f
2 changed files with 8 additions and 6 deletions

View File

@ -1,5 +1,5 @@
# To compile this into a configure script, you need:
# * Autoconf 2.50 or newer
# * Autoconf 2.59c or newer
# * Gtk (for $prefix/share/aclocal/gtk.m4)
# * Automake (for aclocal)
# If you've got them, running "autoreconf" should work.
@ -17,6 +17,8 @@ AC_PROG_RANLIB
ifdef([AM_PROG_AR],[AM_PROG_AR])
AM_PROG_CC_C_O
AC_PROG_CC_C99
# Mild abuse of the '--enable' option format to allow manual
# specification of setuid or setgid setup in pterm.
setidtype=none

View File

@ -627,8 +627,8 @@ if (defined $makefiles{'cygwin'}) {
"# You may also need to tell windres where to find include files:\n".
"# RCINC = --include-dir c:\\cygwin\\include\\\n".
"\n".
&splitline("CFLAGS = -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT".
" -D_NO_OLDNAMES " .
&splitline("CFLAGS = -Wall -O2 -std=gnu99 -D_WINDOWS -DDEBUG".
" -DWIN32S_COMPAT -D_NO_OLDNAMES " .
(join " ", map {"-I$dirpfx$_"} @srcdirs)) .
"\n".
"LDFLAGS = -s\n".
@ -1420,7 +1420,7 @@ if (defined $makefiles{'gtk'}) {
"\n".
"unexport CFLAGS # work around a weird issue with krb5-config\n".
"\n".
&splitline("CFLAGS = -O2 -Wall -Werror -g " .
&splitline("CFLAGS = -O2 -Wall -Werror -std=gnu99 -g " .
(join " ", map {"-I$dirpfx$_"} @srcdirs) .
" \$(shell \$(GTK_CONFIG) --cflags)").
" -D _FILE_OFFSET_BITS=64\n".
@ -1501,7 +1501,7 @@ if (defined $makefiles{'unix'}) {
"\n".
"unexport CFLAGS # work around a weird issue with krb5-config\n".
"\n".
&splitline("CFLAGS = -O2 -Wall -Werror -g " .
&splitline("CFLAGS = -O2 -Wall -Werror -std=gnu99 -g " .
(join " ", map {"-I$dirpfx$_"} @srcdirs)).
" -D _FILE_OFFSET_BITS=64\n".
"ULDFLAGS = \$(LDFLAGS)\n".
@ -1743,7 +1743,7 @@ if (defined $makefiles{'osx'}) {
print
"CC = \$(TOOLPATH)gcc\n".
"\n".
&splitline("CFLAGS = -O2 -Wall -Werror -g " .
&splitline("CFLAGS = -O2 -Wall -Werror -std=gnu99 -g " .
(join " ", map {"-I$dirpfx$_"} @srcdirs))."\n".
"MLDFLAGS = -framework Cocoa\n".
"ULDFLAGS =\n".