From 7906942942dd10d798195ef76e98c2c0a61eed9c Mon Sep 17 00:00:00 2001 From: mainzelm Date: Thu, 21 Jun 2001 09:23:18 +0000 Subject: [PATCH] Correct check for socklen_t, stolen from XEmacs. --- configure.in | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 499a3c3..159346f 100644 --- a/configure.in +++ b/configure.in @@ -189,6 +189,20 @@ AC_DEFUN(SCSH_CONST_SYS_ERRLIST,[ fi ]) +dnl -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +AC_DEFUN(SCSH_SOCKLEN_T,[ + AC_MSG_CHECKING(for socklen_t) + AC_TRY_COMPILE([#include + socklen_t x; + ],[],[AC_MSG_RESULT(yes)],[ + AC_TRY_COMPILE([#include + int accept (int, struct sockaddr *, size_t *); + ],[],[ + AC_MSG_RESULT(size_t) + AC_DEFINE(socklen_t,size_t)], [ + AC_MSG_RESULT(int) + AC_DEFINE(socklen_t,int)])]) +]) dnl -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- AC_INIT(c/scheme48vm.c) AC_CONFIG_HEADER(c/sysdep.h) @@ -331,7 +345,7 @@ esac AC_CHECK_HEADERS(sys/un.h) AC_CHECK_HEADERS(crypt.h) AC_CHECK_FUNCS(gettimeofday ftime nlist select setitimer sigaction) - AC_CHECK_TYPE(socklen_t, unsigned int) + SCSH_SOCKLEN_T AC_CHECK_FUNC(dlopen, AC_DEFINE(HAVE_DLOPEN), AC_CHECK_FUNC(nlist, [LIBOBJS="$LIBOBJS c/fake/libdl1.o"], [LIBOBJS="$LIBOBJS c/fake/libdl2.o"]))