INN commit: trunk (configure.ac include/clibrary.h m4/sendfd.m4)
INN Commit
rra at isc.org
Sun Dec 7 18:33:37 UTC 2014
Date: Sunday, December 7, 2014 @ 10:33:37
Author: iulius
Revision: 9762
Remove super-ancient definitions of ptrdiff_t, atexit and strtoul
These functions were missing on some pre-C89 systems like SunOS.
(The on_exit stuff may be for ULTRIX.) They're present on all modern
systems and can just be used unconditionally.
Also, string.h is now universal. One has to go back to SunOS to find
a version of UNIX that doesn't have it, and it's standardized by ISO C.
It can be included unconditionally.
Remove checking for stddef.h, not used in the code.
Modified:
trunk/configure.ac
trunk/include/clibrary.h
trunk/m4/sendfd.m4
--------------------+
configure.ac | 9 ++++-----
include/clibrary.h | 16 +---------------
m4/sendfd.m4 | 4 +---
3 files changed, 6 insertions(+), 23 deletions(-)
Modified: configure.ac
===================================================================
--- configure.ac 2014-12-04 20:47:19 UTC (rev 9761)
+++ configure.ac 2014-12-07 18:33:37 UTC (rev 9762)
@@ -394,8 +394,8 @@
AC_HEADER_STDBOOL
dnl Generic checks for header files.
-AC_CHECK_HEADERS([crypt.h inttypes.h limits.h stddef.h \
- stdint.h string.h sys/bitypes.h sys/filio.h sys/loadavg.h \
+AC_CHECK_HEADERS([crypt.h inttypes.h limits.h \
+ stdint.h sys/bitypes.h sys/filio.h sys/loadavg.h \
sys/select.h sys/time.h sys/uio.h syslog.h unistd.h])
dnl Some Linux systems have db1/ndbm.h instead of ndbm.h. Others have
@@ -454,7 +454,6 @@
AC_TYPE_SSIZE_T
AC_FUNC_GETGROUPS
AC_TYPE_UID_T
-AC_CHECK_TYPES([ptrdiff_t])
AC_CHECK_TYPES([sig_atomic_t], [], [],
[#include <sys/types.h>
#include <signal.h>])
@@ -496,8 +495,8 @@
INN_FUNC_SNPRINTF
dnl Check for various other functions.
-AC_CHECK_FUNCS(atexit getloadavg getrusage getspnam setbuffer sigaction \
- setgroups setrlimit setsid socketpair strncasecmp strtoul \
+AC_CHECK_FUNCS(getloadavg getrusage getspnam setbuffer sigaction \
+ setgroups setrlimit setsid socketpair strncasecmp \
sysconf)
dnl Find a way to get the file descriptor limit.
Modified: include/clibrary.h
===================================================================
--- include/clibrary.h 2014-12-04 20:47:19 UTC (rev 9761)
+++ include/clibrary.h 2014-12-07 18:33:37 UTC (rev 9762)
@@ -41,9 +41,7 @@
#include <sys/types.h>
#include <stdlib.h>
#include <stddef.h>
-#if HAVE_STRING_H
-# include <string.h>
-#endif
+#include <string.h>
#if HAVE_STRINGS_H
# include <strings.h>
#endif
@@ -136,10 +134,6 @@
extern int vsnprintf(char *, size_t, const char *, va_list);
#endif
-/* In case <sys/types.h> does not define ptrdiff_t. */
-#if !HAVE_PTRDIFF_T
-typedef long ptrdiff_t;
-#endif
/* In case <signal.h> does not define sig_atomic_t. */
#if !HAVE_SIG_ATOMIC_T
typedef int sig_atomic_t;
@@ -147,14 +141,6 @@
END_DECLS
-/* "Good enough" replacements for standard functions. */
-#if !HAVE_ATEXIT
-# define atexit(arg) on_exit((arg), 0)
-#endif
-#if !HAVE_STRTOUL
-# define strtoul(a, b, c) (unsigned long) strtol((a), (b), (c))
-#endif
-
/* This almost certainly isn't necessary, but it's not hurting anything.
gcc assumes that if SEEK_SET isn't defined none of the rest are either,
so we certainly can as well. */
Modified: m4/sendfd.m4
===================================================================
--- m4/sendfd.m4 2014-12-04 20:47:19 UTC (rev 9761)
+++ m4/sendfd.m4 2014-12-07 18:33:37 UTC (rev 9762)
@@ -10,9 +10,7 @@
define([_INN_SYS_STREAMS_SENDFD],
[AC_LANG_SOURCE([[
#include <stdio.h>
-#if HAVE_STRING_H
-# include <string.h>
-#endif
+#include <string.h>
#include <stropts.h>
#include <sys/types.h>
#include <sys/socket.h>
More information about the inn-committers
mailing list