Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2005-07-17 00:19:09 UTC
Modified files:
configure.in ChangeLog
Log message:
Check a few possibilities for socklen_t (fixes SF#1236456).
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.667 ircu2.10/ChangeLog:1.668
--- ircu2.10/ChangeLog:1.667 Sat Jul 16 17:03:35 2005
+++ ircu2.10/ChangeLog Sat Jul 16 17:18:58 2005
@@ -1,5 +1,11 @@
2005-07-16 Michael Poole <[EMAIL PROTECTED]>
+ * configure.in: Apply a test for socklen_t that Reed found.
+
+ * configure: Regenerate.
+
+2005-07-16 Michael Poole <[EMAIL PROTECTED]>
+
* RELEASE.NOTES: Mention that 2.10.11 does not support oplevels.
* README.FreeBSD: Remove (merged into README).
Index: ircu2.10/configure.in
diff -u ircu2.10/configure.in:1.33 ircu2.10/configure.in:1.34
--- ircu2.10/configure.in:1.33 Thu May 12 19:03:33 2005
+++ ircu2.10/configure.in Sat Jul 16 17:18:58 2005
@@ -19,7 +19,7 @@
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
-dnl $Id: configure.in,v 1.33 2005/05/13 02:03:33 entrope Exp $
+dnl $Id: configure.in,v 1.34 2005/07/17 00:18:58 entrope Exp $
dnl Make sure we are in the correct directory (someone could have run
dnl 'configure' with a wrong '--srcdir').
@@ -74,10 +74,35 @@
AC_STRUCT_TM
AC_TYPE_UID_T
unet_CHECK_TYPE_SIZES
-AC_CHECK_TYPE(socklen_t, unsigned int)
AC_CHECK_TYPE(struct sockaddr_in6, [unet_have_sockaddr_in6="yes"],
[unet_have_sockaddr_in6="no"], [#include <sys/types.h>
#include <netinet/in.h>])
+dnl Check for socklen_t. In traditional BSD this is an int, but some
+dnl OSes use a different type. Test until we find something that will
+dnl work properly. Test borrowed from a patch submitted for Python.
+AC_CHECK_TYPE([socklen_t], ,[
+ AC_MSG_CHECKING([for socklen_t equivalent])
+ AC_CACHE_VAL([curl_cv_socklen_t_equiv],
+ [
+dnl Systems have either "struct sockaddr*" or "void*" as second
+dnl arg to getpeername.
+ curl_cv_socklen_t_equiv=
+ for arg2 in "struct sockaddr" void ; do
+ for t in int size_t unsigned long "unsigned long" ; do
+ AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/socket.h>
+int getpeername (int $arg2 *, $t *);],[$t len;
+ getpeername(0, 0, &len);], [curl_cv_socklen_t_equiv="$t"
+ break])
+ done
+ done
+ ])
+ AC_MSG_RESULT($curl_cv_socklen_t_equiv)
+ AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv,
+ [type to use in place of socklen_t if not defined])],
+ [#include <sys/types.h>
+#include<sys/socket.h>])
+
dnl Checks for library functions.
AC_CHECK_FUNCS([kqueue setrlimit getrusage times])
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches