Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools/compat Check for sys/socket.h and socklen_t.



details:   https://anonhg.NetBSD.org/src/rev/258bfe2764c4
branches:  trunk
changeset: 544144:258bfe2764c4
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Mar 13 04:30:39 2003 +0000

description:
Check for sys/socket.h and socklen_t.

diffstat:

 tools/compat/compat_defs.h |    6 +-
 tools/compat/config.h.in   |    3 +-
 tools/compat/configure     |  857 +++++++++++++++++++++++---------------------
 tools/compat/configure.ac  |    8 +-
 4 files changed, 464 insertions(+), 410 deletions(-)

diffs (truncated from 2066 to 300 lines):

diff -r a0320afc10f5 -r 258bfe2764c4 tools/compat/compat_defs.h
--- a/tools/compat/compat_defs.h        Thu Mar 13 03:04:13 2003 +0000
+++ b/tools/compat/compat_defs.h        Thu Mar 13 04:30:39 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_defs.h,v 1.25 2003/01/31 20:50:29 uwe Exp $     */
+/*     $NetBSD: compat_defs.h,v 1.26 2003/03/13 04:30:39 thorpej Exp $ */
 
 #ifndef        __NETBSD_COMPAT_DEFS_H__
 #define        __NETBSD_COMPAT_DEFS_H__
@@ -110,6 +110,10 @@
 typedef unsigned long id_t;
 #endif
 
+#if !HAVE_SOCKLEN_T
+typedef int socklen_t;
+#endif
+
 /* Prototypes for replacement functions. */
 
 #if !HAVE_ASPRINTF
diff -r a0320afc10f5 -r 258bfe2764c4 tools/compat/config.h.in
--- a/tools/compat/config.h.in  Thu Mar 13 03:04:13 2003 +0000
+++ b/tools/compat/config.h.in  Thu Mar 13 04:30:39 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: config.h.in,v 1.26 2002/11/29 13:00:23 lukem Exp $     */
+/*     $NetBSD: config.h.in,v 1.27 2003/03/13 04:30:39 thorpej Exp $   */
 
 #ifndef        __NETBSD_COMPAT_CONFIG_H__
 #define        __NETBSD_COMPAT_CONFIG_H__
@@ -31,6 +31,7 @@
 #undef STDC_HEADERS
 
 #undef HAVE_ID_T
+#undef HAVE_SOCKLEN_T
 #undef HAVE_LONG_LONG
 #undef HAVE_U_QUAD_T
 
diff -r a0320afc10f5 -r 258bfe2764c4 tools/compat/configure
--- a/tools/compat/configure    Thu Mar 13 03:04:13 2003 +0000
+++ b/tools/compat/configure    Thu Mar 13 04:30:39 2003 +0000
@@ -2291,8 +2291,8 @@
 # currently conditionalized.
 
 for ac_header in sys/ioctl.h sys/mman.h sys/mtio.h sys/param.h \
-       sys/stat.h sys/time.h sys/types.h sys/utsname.h sys/wait.h \
-       assert.h ctype.h errno.h fcntl.h grp.h limits.h locale.h \
+       sys/socket.h sys/stat.h sys/time.h sys/types.h sys/utsname.h \
+       sys/wait.h assert.h ctype.h errno.h fcntl.h grp.h limits.h locale.h \
        netdb.h pwd.h signal.h stdarg.h stdio.h stdlib.h string.h \
        termios.h unistd.h
 do
@@ -2916,161 +2916,63 @@
 EOF
 
 fi
-
-       echo "$as_me:2920: checking for uint8_t" >&5
-echo $ECHO_N "checking for uint8_t... $ECHO_C" >&6
-if test "${ac_cv_type_uint8_t+set}" = set; then
+echo "$as_me:2919: checking for socklen_t" >&5
+echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
+if test "${ac_cv_type_socklen_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 2926 "configure"
+#line 2925 "configure"
 #include "confdefs.h"
 $ac_includes_default
 int
 main ()
 {
-if ((uint8_t *) 0)
-  return 0;
-if (sizeof (uint8_t))
-  return 0;
-  ;
+if ((socklen_t *) 0)
   return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2941: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:2944: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2947: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:2950: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_type_uint8_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_type_uint8_t=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:2960: result: $ac_cv_type_uint8_t" >&5
-echo "${ECHO_T}$ac_cv_type_uint8_t" >&6
-if test $ac_cv_type_uint8_t = yes; then
-  :
-else
-
-               echo "$as_me:2966: checking for u_int8_t" >&5
-echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6
-if test "${ac_cv_type_u_int8_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 2972 "configure"
-#include "confdefs.h"
-$ac_includes_default
-int
-main ()
-{
-if ((u_int8_t *) 0)
-  return 0;
-if (sizeof (u_int8_t))
+if (sizeof (socklen_t))
   return 0;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2987: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2940: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2990: \$? = $ac_status" >&5
+  echo "$as_me:2943: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2993: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2946: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2996: \$? = $ac_status" >&5
+  echo "$as_me:2949: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_type_u_int8_t=yes
+  ac_cv_type_socklen_t=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_type_u_int8_t=no
+ac_cv_type_socklen_t=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:3006: result: $ac_cv_type_u_int8_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int8_t" >&6
-if test $ac_cv_type_u_int8_t = yes; then
-  cat >>confdefs.h <<\EOF
-#define uint8_t u_int8_t
+echo "$as_me:2959: result: $ac_cv_type_socklen_t" >&5
+echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
+if test $ac_cv_type_socklen_t = yes; then
+
+cat >>confdefs.h <<EOF
+#define HAVE_SOCKLEN_T 1
 EOF
 
-else
-  { { echo "$as_me:3014: error: cannot find a suitable type for uint8_t" >&5
-echo "$as_me: error: cannot find a suitable type for uint8_t" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-
-       echo "$as_me:3021: checking for u_int8_t" >&5
-echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6
-if test "${ac_cv_type_u_int8_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 3027 "configure"
-#include "confdefs.h"
-$ac_includes_default
-int
-main ()
-{
-if ((u_int8_t *) 0)
-  return 0;
-if (sizeof (u_int8_t))
-  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3042: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:3045: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:3048: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:3051: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_type_u_int8_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_type_u_int8_t=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:3061: result: $ac_cv_type_u_int8_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int8_t" >&6
-if test $ac_cv_type_u_int8_t = yes; then
-  :
-else
-
-               echo "$as_me:3067: checking for uint8_t" >&5
+fi
+
+       echo "$as_me:2969: checking for uint8_t" >&5
 echo $ECHO_N "checking for uint8_t... $ECHO_C" >&6
 if test "${ac_cv_type_uint8_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 3073 "configure"
+#line 2975 "configure"
 #include "confdefs.h"
 $ac_includes_default
 int
@@ -3085,16 +2987,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3088: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2990: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:3091: \$? = $ac_status" >&5
+  echo "$as_me:2993: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:3094: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2996: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3097: \$? = $ac_status" >&5
+  echo "$as_me:2999: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_type_uint8_t=yes
 else
@@ -3104,7 +3006,154 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:3107: result: $ac_cv_type_uint8_t" >&5
+echo "$as_me:3009: result: $ac_cv_type_uint8_t" >&5
+echo "${ECHO_T}$ac_cv_type_uint8_t" >&6
+if test $ac_cv_type_uint8_t = yes; then
+  :
+else
+
+               echo "$as_me:3015: checking for u_int8_t" >&5
+echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6
+if test "${ac_cv_type_u_int8_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3021 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+if ((u_int8_t *) 0)
+  return 0;
+if (sizeof (u_int8_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3036: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:3039: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:3042: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:3045: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_u_int8_t=yes



Home | Main Index | Thread Index | Old Index