Commit ff28f54d authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Add configure support for 'socklen_t' as provided by Hallvard.

parent 47be141f
......@@ -253,6 +253,9 @@
/* define this if sig_atomic_t isn't defined in signal.h */
#undef sig_atomic_t
/* define this if socklen_t isn't defined in sys/types.h or sys/socket.h */
#undef socklen_t
/* These are defined in ldap_features.h */
/*
LDAP_API_FEATURE_X_OPENLDAP_REENTRANT
......
......@@ -745,6 +745,24 @@ AC_DEFUN(OL_TYPE_SIG_ATOMIC_T,
])dnl
dnl
dnl ====================================================================
dnl Define socklen_t if not defined in signal.h
AC_DEFUN(OL_TYPE_SOCKLEN_T,
[AC_CACHE_CHECK(for socklen_t, ol_cv_type_socklen_t,
[AC_TRY_COMPILE([
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET
#include <sys/socket.h>
#endif
], [socklen_t len;],
ol_cv_type_socklen_t=yes, ol_cv_type_socklen_t=no)])
if test $ol_cv_type_socklen_t = no; then
AC_DEFINE(socklen_t, int)
fi
])dnl
dnl
dnl ====================================================================
dnl check no of arguments for ctime_r
AC_DEFUN(OL_FUNC_CTIME_R_NARGS,
[AC_CACHE_CHECK(number of arguments of ctime_r, ol_cv_func_ctime_r_nargs,
......
This diff is collapsed.
......@@ -1670,6 +1670,7 @@ AM_TYPE_PTRDIFF_T
AC_TYPE_SIGNAL
OL_TYPE_SIG_ATOMIC_T
AC_TYPE_SIZE_T
OL_TYPE_SOCKLEN_T
AC_STRUCT_ST_BLKSIZE
AC_HEADER_TIME
AC_STRUCT_TM
......
......@@ -227,6 +227,9 @@
/* define this if sig_atomic_t isn't defined in signal.h */
#undef sig_atomic_t
/* define this if socklen_t isn't defined in sys/types.h or sys/socket.h */
#undef socklen_t
/* These are defined in ldap_features.h */
/*
LDAP_API_FEATURE_X_OPENLDAP_REENTRANT
......
......@@ -302,6 +302,9 @@ typedef char * caddr_t;
/* define this if sig_atomic_t isn't defined in signal.h */
/* #undef sig_atomic_t */
/* define this if socklen_t isn't defined in sys/types.h or sys/socket.h */
#define socklen_t int
/* These are defined in ldap_features.h */
/*
LDAP_API_FEATURE_X_OPENLDAP_REENTRANT
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment