OSSP CVS Repository

ossp - Check-in [1109]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1109
Date: 2001-Oct-08 17:01:26 (local)
2001-Oct-08 15:01:26 (UTC)
User:rse
Branch:
Comment: Revert my idea of fixing the socklen_t stuff with a fallback substitution in sa.h, because this is nasty for the inclusion in L2. Do it with a less-heavy #define on-the-fly in sa.h
Tickets:
Inspections:
Files:
ossp-pkg/sa/Makefile.in      1.6 -> 1.7     1 inserted, 1 deleted
ossp-pkg/sa/configure.ac      1.5 -> 1.6     1 inserted, 1 deleted
ossp-pkg/sa/sa.ac      1.4 -> 1.5     1 inserted, 23 deleted
ossp-pkg/sa/sa.h      1.14 -> 1.15     15 inserted, 0 deleted
ossp-pkg/sa/sa.h.in      1.1->removed

ossp-pkg/sa/Makefile.in 1.6 -> 1.7

--- Makefile.in  2001/10/08 14:50:56     1.6
+++ Makefile.in  2001/10/08 15:01:26     1.7
@@ -90,7 +90,7 @@
 
 distclean: clean
         -$(RM) config.log config.status config.cache
-        -$(RM) Makefile config.h sa.h sa-config
+        -$(RM) Makefile config.h sa-config
         -$(RM) libtool
 
 realclean: distclean


ossp-pkg/sa/configure.ac 1.5 -> 1.6

--- configure.ac 2001/10/08 14:47:30     1.5
+++ configure.ac 2001/10/08 15:01:26     1.6
@@ -48,7 +48,7 @@
 SA_CHECK_ALL
 
 AC_CONFIG_HEADERS(config.h)
-AC_CONFIG_FILES(sa.h Makefile sa-config)
+AC_CONFIG_FILES(Makefile sa-config)
 AC_OUTPUT
 
 chmod a+x sa-config


ossp-pkg/sa/sa.ac 1.4 -> 1.5

--- sa.ac        2001/10/08 14:47:30     1.4
+++ sa.ac        2001/10/08 15:01:26     1.5
@@ -53,28 +53,6 @@
     fi
 ])
 
-dnl #   Check for socklen_t
-dnl #   configure.in:
-dnl #     SA_CHECK_SOCKLENTYPE
-
-AC_DEFUN(SA_CHECK_SOCKLENTYPE,[dnl
-    SA_CHECK_TYPEDEF(socklen_t, sys/socket.h)
-    AC_MSG_CHECKING(for fallback socklen_t)
-    AC_CACHE_VAL(ac_cv_check_socklentype, [
-        if test ".$ac_cv_typedef_socklen_t" = .yes; then
-            ac_cv_check_socklentype='socklen_t'
-        else
-            ac_cv_check_socklentype='int'
-        fi
-    ])
-    AC_MSG_RESULT([$ac_cv_check_socklentype])
-    SA_FALLBACK_SOCKLEN_T="typedef ${ac_cv_check_socklentype} socklen_t;"
-    if test ".$ac_cv_check_socklentype" = ".socklen_t"; then
-        SA_FALLBACK_SOCKLEN_T="/* $SA_FALLBACK_SOCKLEN_T */"
-    fi
-    AC_SUBST(SA_FALLBACK_SOCKLEN_T)
-])
-
 dnl #   Check for anything OSSP SA wants to know
 dnl #   configure.in:
 dnl #     SA_CHECK_ALL
@@ -94,6 +72,6 @@
     AC_CHECK_FUNCS(inet_aton inet_pton inet_ntoa inet_ntop snprintf)
 
     dnl # check for network/socket size type
-    SA_CHECK_SOCKLENTYPE
+    SA_CHECK_TYPEDEF(socklen_t, sys/socket.h)
 ])
 


ossp-pkg/sa/sa.h 1.14 -> 1.15

--- sa.h 2001/10/08 14:47:30     1.14
+++ sa.h 2001/10/08 15:01:26     1.15
@@ -36,6 +36,16 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 
+/* include optional Autoconf header */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* fallback for POSIX socklen_t */
+#if defined(HAVE_CONFIG_H) && !defined(HAVE_SOCKLEN_T)
+#define socklen_t int
+#endif
+
 /* embedding support */
 #ifdef SA_PREFIX
 #if defined(__STDC__) || defined(__cplusplus)
@@ -169,5 +179,10 @@
 sa_rc_t sa_recv         (sa_t *sa, char *buf, size_t buflen, size_t *bufdone, sa_addr_t **raddr);
 sa_rc_t sa_send         (sa_t *sa, const char *buf, size_t buflen, size_t *bufdone, sa_addr_t *raddr);
 
+/* cleanup */
+#if defined(HAVE_CONFIG_H) && !defined(HAVE_SOCKLEN_T)
+#undef socklen_t
+#endif
+
 #endif /* __SA_H__ */
 


ossp-pkg/sa/sa.h.in 1.1 -> 1.2


CVSTrac 2.0.1