INN commit: trunk (6 files)
INN Commit
rra at isc.org
Wed Sep 9 20:03:32 UTC 2009
Date: Wednesday, September 9, 2009 @ 13:03:31
Author: iulius
Revision: 8627
Use new Autoconf 2.60 macros AC_TYPE_UINT16_T, AC_TYPE_UINT32_T,
AC_TYPE_LONG_LONG_INT and AC_TYPE_SSIZE_T.
We do not need m4/int32.m4 any longer to define uint32_t
(int32_t is not used).
Modified:
trunk/MANIFEST
trunk/configure.ac
trunk/doc/pod/hacking.pod
trunk/lib/mkstemp.c
trunk/lib/snprintf.c
Deleted:
trunk/m4/int32.m4
---------------------+
MANIFEST | 1
configure.ac | 10 +++-----
doc/pod/hacking.pod | 2 -
lib/mkstemp.c | 2 -
lib/snprintf.c | 2 -
m4/int32.m4 | 57 --------------------------------------------------
6 files changed, 7 insertions(+), 67 deletions(-)
Modified: MANIFEST
===================================================================
--- MANIFEST 2009-09-07 09:06:42 UTC (rev 8626)
+++ MANIFEST 2009-09-09 20:03:31 UTC (rev 8627)
@@ -545,7 +545,6 @@
m4/cc-flags.m4 Autoconf macro for compiler flags
m4/compress.m4 Autoconf macro for compress detection
m4/inet-ntoa.m4 Autoconf macro to check inet_ntoa
-m4/int32.m4 Autoconf macro for int32_t
m4/iov-max.m4 Autoconf macro for IOV_MAX
m4/krb5.m4 Autoconf macro for Kerberos v5
m4/large-fpos.m4 Autoconf macro for large-file fpos_t
Modified: configure.ac
===================================================================
--- configure.ac 2009-09-07 09:06:42 UTC (rev 8626)
+++ configure.ac 2009-09-09 20:03:31 UTC (rev 8627)
@@ -38,7 +38,6 @@
m4_include([m4/cc-flags.m4])
m4_include([m4/compress.m4])
m4_include([m4/inet-ntoa.m4])
-m4_include([m4/int32.m4])
m4_include([m4/iov-max.m4])
m4_include([m4/krb5.m4])
m4_include([m4/large-fpos.m4])
@@ -431,18 +430,17 @@
#include <sys/socket.h>])
dnl Checks for types.
-INN_TYPE_INT32_T
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+AC_TYPE_LONG_LONG_INT
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
AC_TYPE_UID_T
-AC_CHECK_TYPES([long long])
AC_CHECK_TYPE([ptrdiff_t], ,
[AC_DEFINE([ptrdiff_t], [long],
[Define to long if <sys/types.h> does not define.])])
-AC_CHECK_TYPE([ssize_t], ,
- [AC_DEFINE([ssize_t], [int],
- [Define to int if <sys/types.h> does not define.])])
AC_CHECK_TYPE([sig_atomic_t], ,
[AC_DEFINE([sig_atomic_t], [int],
[Define to int if <signal.h> does not define.])],
Modified: doc/pod/hacking.pod
===================================================================
--- doc/pod/hacking.pod 2009-09-07 09:06:42 UTC (rev 8626)
+++ doc/pod/hacking.pod 2009-09-09 20:03:31 UTC (rev 8627)
@@ -334,7 +334,7 @@
The first picks up all defines generated by B<autoconf> and is necessary for
types that may not be present on all systems (I<uid_t>, I<pid_t>, I<size_t>,
-I<int32_t>, and the like). It therefore should be included before any other
+I<uint32_t>, and the like). It therefore should be included before any other
headers that use those types, as well as to get general configuration
information. It also includes F<inn/defines.h> and F<inn/options.h>, which
pick up additional support macros and compile-time configuration.
Modified: lib/mkstemp.c
===================================================================
--- lib/mkstemp.c 2009-09-07 09:06:42 UTC (rev 8626)
+++ lib/mkstemp.c 2009-09-09 20:03:31 UTC (rev 8627)
@@ -25,7 +25,7 @@
#endif
/* Pick the longest available integer type. */
-#if HAVE_LONG_LONG
+#if HAVE_LONG_LONG_INT
typedef unsigned long long long_int_type;
#else
typedef unsigned long long_int_type;
Modified: lib/snprintf.c
===================================================================
--- lib/snprintf.c 2009-09-07 09:06:42 UTC (rev 8626)
+++ lib/snprintf.c 2009-09-09 20:03:31 UTC (rev 8627)
@@ -113,7 +113,7 @@
#define LDOUBLE double
#endif
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
# define LLONG long long
#else
# define LLONG long
Deleted: m4/int32.m4
===================================================================
--- m4/int32.m4 2009-09-07 09:06:42 UTC (rev 8626)
+++ m4/int32.m4 2009-09-09 20:03:31 UTC (rev 8627)
@@ -1,57 +0,0 @@
-dnl int32.m4 -- Find an appropriate int32_t and uint32_t.
-dnl $Id$
-dnl
-dnl The public macro exposed by this file is INN_TYPE_INT32_T. This macro
-dnl locates the appropriate header files to include for int32_t and uint32_t
-dnl or determines how to define those types, and then both includes the
-dnl appropriate defines into the generated config.h.
-
-dnl Used to build the type cache name.
-AC_DEFUN([_INN_TYPE_CACHE], translit([ac_cv_sizeof_$1], [ *], [_p]))
-
-dnl A modified version of AC_CHECK_SIZEOF that doesn't always AC_DEFINE, but
-dnl instead lets you execute shell code based on success or failure. This is
-dnl to avoid config.h clutter.
-AC_DEFUN([_INN_IF_SIZEOF],
-[AC_MSG_CHECKING([size of $1])
-AC_CACHE_VAL(_INN_TYPE_CACHE([$1]),
-[AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <stdio.h>
-main()
-{
- FILE *f = fopen("conftestval", "w");
- if (!f) exit(1);
- fprintf(f, "%d\n", sizeof($1));
- exit(0);
-}
-]])], _INN_TYPE_CACHE([$1])=`cat conftestval`, _INN_TYPE_CACHE([$1])=0,
-ifelse([$2], , , _INN_TYPE_CACHE([$1])=$2))
-])dnl
-AC_MSG_RESULT($_INN_TYPE_CACHE([$1]))
-if test x"$_INN_TYPE_CACHE([$1])" = x"$3" ; then
- ifelse([$4], , :, [$4])
-else
- ifelse([$5], , :, [$5])
-fi
-])
-
-dnl This is the beginning of the macro called by the user.
-AC_DEFUN([INN_TYPE_INT32_T],
-[
-
-dnl Find a 32 bit type, by trying likely candidates. First, check for the
-dnl C9X int32_t, then look for something else with a size of four bytes.
-_INN_IF_SIZEOF(int, 4, 4, INN_INT32=int,
- [_INN_IF_SIZEOF(long, 4, 4, INN_INT32=long,
- [_INN_IF_SIZEOF(short, 2, 4, INN_INT32=short)])])
-
-dnl Now, check to see if we need to define int32_t and uint32_t ourselves.
-dnl This has to be done after the probes for an appropriately sized integer
-dnl type so that we can pass that type to AC_DEFINE_UNQUOTED.
-AC_CHECK_TYPE(int32_t, ,
- [AC_DEFINE_UNQUOTED([int32_t], [$INN_INT32],
- [Define to a 4-byte signed type if <inttypes.h> does not define.])])
-AC_CHECK_TYPE(uint32_t, ,
- [AC_DEFINE_UNQUOTED([uint32_t], [unsigned $INN_INT32],
- [Define to a 4-byte unsigned type if <inttypes.h> does not define.])])
-])
More information about the inn-committers
mailing list