summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-10-13 16:03:33 +0300
committerArnold D. Robbins <arnold@skeeve.com>2017-10-13 16:03:33 +0300
commit9b85ee5535a0fd1f21b1cb43d4f5c91ef719684d (patch)
treeb8176c0f6d8731bf9c7613d3f7e6a7fb4e68774f
parent919ef69e86da9cbed3ba50c462e89313bb283e48 (diff)
downloadgawk-9b85ee5535a0fd1f21b1cb43d4f5c91ef719684d.tar.gz
Remove gawkbool.h; rely on their being a stdbool.h.
-rw-r--r--ChangeLog7
-rw-r--r--NEWS2
-rw-r--r--awk.h12
-rw-r--r--configh.in6
-rwxr-xr-xconfigure4
-rw-r--r--configure.ac4
-rw-r--r--missing_d/ChangeLog4
-rw-r--r--missing_d/gawkbool.h40
8 files changed, 18 insertions, 61 deletions
diff --git a/ChangeLog b/ChangeLog
index 4686e41a..a7dee7d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-10-13 Arnold D. Robbins <arnold@skeeve.com>
+
+ Assume a more C99 environment:
+
+ * awk.h: Assume we have limits.h, stdarg.h and stdbool.h.
+ * configure.ac: Remove checks for limits.h and stdarg.h.
+
2017-10-10 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Remove --with-whiny-user-strftime option.
diff --git a/NEWS b/NEWS
index bcc24091..fd411940 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,8 @@ Changes from 4.2.0 to 5.0.0
2. The `--with-whiny-user-strftime' configuration option is now gone.
+3. The code now makes some stronger assumptions about a C99 environment.
+
Changes from 4.1.4 to 4.2.0
---------------------------
diff --git a/awk.h b/awk.h
index 5eec241e..895dad9a 100644
--- a/awk.h
+++ b/awk.h
@@ -53,9 +53,7 @@
#include <stdio.h>
#include <assert.h>
-#ifdef HAVE_LIMITS_H
#include <limits.h>
-#endif /* HAVE_LIMITS_H */
#include <ctype.h>
#include <setjmp.h>
@@ -73,11 +71,8 @@
#error "gawk no longer supports non-C89 environments (no __STDC__ or __STDC__ < 1)"
#endif
-#if defined(HAVE_STDARG_H)
#include <stdarg.h>
-#else
-#error "gawk no longer supports <varargs.h>. Please update your compiler and runtime"
-#endif
+#include <stdbool.h>
#include <signal.h>
#include <time.h>
#include <errno.h>
@@ -89,11 +84,6 @@ extern int errno;
#include <stdlib.h>
#endif /* not STDC_HEADERS */
-#ifdef HAVE_STDBOOL_H
-#include <stdbool.h>
-#else
-#include "missing_d/gawkbool.h"
-#endif
/* We can handle multibyte strings. */
#include <wchar.h>
diff --git a/configh.in b/configh.in
index 4ac4461a..2bd480ab 100644
--- a/configh.in
+++ b/configh.in
@@ -108,9 +108,6 @@
/* Define if you have the libsigsegv library. */
#undef HAVE_LIBSIGSEGV
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
@@ -186,9 +183,6 @@
/* we have sockets on this system */
#undef HAVE_SOCKETS
-/* Define to 1 if you have the <stdarg.h> header file. */
-#undef HAVE_STDARG_H
-
/* Define to 1 if stdbool.h conforms to C99. */
#undef HAVE_STDBOOL_H
diff --git a/configure b/configure
index b4563e04..d7d428e1 100755
--- a/configure
+++ b/configure
@@ -7999,8 +7999,8 @@ $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
fi
-for ac_header in arpa/inet.h fcntl.h limits.h locale.h libintl.h mcheck.h \
- netdb.h netinet/in.h stdarg.h stddef.h string.h \
+for ac_header in arpa/inet.h fcntl.h locale.h libintl.h mcheck.h \
+ netdb.h netinet/in.h stddef.h string.h \
sys/ioctl.h sys/param.h sys/select.h sys/socket.h sys/time.h unistd.h \
termios.h stropts.h wchar.h wctype.h
do :
diff --git a/configure.ac b/configure.ac
index d7a66c84..9013a5f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,8 +142,8 @@ AM_LANGINFO_CODESET
gt_LC_MESSAGES
dnl checks for header files
-AC_CHECK_HEADERS(arpa/inet.h fcntl.h limits.h locale.h libintl.h mcheck.h \
- netdb.h netinet/in.h stdarg.h stddef.h string.h \
+AC_CHECK_HEADERS(arpa/inet.h fcntl.h locale.h libintl.h mcheck.h \
+ netdb.h netinet/in.h stddef.h string.h \
sys/ioctl.h sys/param.h sys/select.h sys/socket.h sys/time.h unistd.h \
termios.h stropts.h wchar.h wctype.h)
AC_HEADER_STDC
diff --git a/missing_d/ChangeLog b/missing_d/ChangeLog
index a62758ae..c8368e1d 100644
--- a/missing_d/ChangeLog
+++ b/missing_d/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-13 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawkbool.h: Removed.
+
2017-10-08 Arnold D. Robbins <arnold@skeeve.com>
* strncasecmp.c: Fix FSF's address.
diff --git a/missing_d/gawkbool.h b/missing_d/gawkbool.h
deleted file mode 100644
index c75a5a10..00000000
--- a/missing_d/gawkbool.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * gawkbool.h -- replacement definitions for bool.
- */
-
-/*
- * Copyright (C) 2012 the Free Software Foundation, Inc.
- *
- * This file is part of GAWK, the GNU implementation of the
- * AWK Programming Language.
- *
- * GAWK is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * GAWK is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/* This stuff largely taken from the Autoconf doc. */
-
-#ifndef __bool_true_false_are_defined
-# ifndef HAVE__BOOL
-# ifdef __cplusplus
-typedef bool _Bool;
-# else
-# define _Bool signed char
-# endif
-# endif
-# define bool _Bool
-# define false 0
-# define true 1
-# define __bool_true_false_are_defined 1
-#endif