]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Use built-in "offsetof"
authorAlan T. DeKok <aland@freeradius.org>
Mon, 2 May 2011 12:47:16 +0000 (14:47 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 2 May 2011 12:50:38 +0000 (14:50 +0200)
Look for "stddef.h", and if found, include it in the various
configure checks.  Also use it at run time.

acinclude.m4
configure
configure.in
src/include/autoconf.h.in
src/include/missing.h

index 1dd8ad14c8ec7c775aaf6bbf6fbfdb70be49a1cf..2730606faa74ef2d5cefabf113017d3ce1393854 100644 (file)
@@ -349,6 +349,9 @@ dnl
 
   AC_TRY_COMPILE([
 $1
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
 #ifndef offsetof
 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
 #endif
index cd0356c27a219e968bf3cecaef08ca04f74eea64..73e8732fdd2fba8dbd09c6058b0f9320eb4b1537 100755 (executable)
--- a/configure
+++ b/configure
@@ -20091,9 +20091,7 @@ echo "${ECHO_T}no" >&6; }
 fi
 
 
-else
 
-  LIBTOOL="`pwd`/libtool"
 
 
 
@@ -20103,6 +20101,10 @@ else
 
 
 
+else
+
+  LIBTOOL="`pwd`/libtool"
+
 
 
 
@@ -22723,6 +22725,8 @@ fi
 
 
 
+
+
 
 
 
@@ -22760,6 +22764,7 @@ for ac_header in \
        prot.h \
        pwd.h \
        grp.h \
+       stddef.h \
         fnmatch.h \
        sia.h \
        siad.h
@@ -23163,6 +23168,7 @@ echo "$as_me: skipping test for openssl/ssl.h" >&6;}
 
 
 
+
 for ac_header in \
        openssl/ssl.h \
        openssl/crypto.h \
@@ -24775,6 +24781,9 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 #include <utmpx.h>
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
 #ifndef offsetof
 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
 #endif
@@ -24848,6 +24857,9 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 #include <netinet/in.h>
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
 #ifndef offsetof
 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
 #endif
@@ -24920,6 +24932,9 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 #include <netinet/in.h>
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
 #ifndef offsetof
 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
 #endif
index 24476fb812eb7cfe492371c049dfb3c120404fc9..a12eb9fb5182a25037fc4a38e189085bb3513d7a 100644 (file)
@@ -619,6 +619,7 @@ AC_CHECK_HEADERS( \
        prot.h \
        pwd.h \
        grp.h \
+       stddef.h \
         fnmatch.h \
        sia.h \
        siad.h
index 9b5d1b843519bac6975de6b9ce36ec1b2f5b3569..3493254c585eb77c085c7dc62847ae5c648d047d 100644 (file)
 /* Define to 1 if you have the `snprintf' function. */
 #undef HAVE_SNPRINTF
 
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
index 7c7b37fb2c19c8e5caca182dc1d22eb18a851da1..679d7f2b8bef503dede277b82fd4d891cb50c694 100644 (file)
@@ -18,6 +18,10 @@ RCSIDH(missing_h, "$Id$")
 #include <stdint.h>
 #endif
 
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
+
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif