From: Kurt Zeilenga Date: Sun, 27 Jun 1999 00:34:43 +0000 (+0000) Subject: Added closesocket detection/use for BeOS (ITS#195) X-Git-Tag: OPENLDAP_REL_ENG_1_2_4~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5762b884ca3b868bc3c718da2a8ae241e658a02;p=thirdparty%2Fopenldap.git Added closesocket detection/use for BeOS (ITS#195) --- diff --git a/CHANGES b/CHANGES index e5e3c3550b..cd5e5014d7 100644 --- a/CHANGES +++ b/CHANGES @@ -2,12 +2,12 @@ OpenLDAP Change Log Changes included in OpenLDAP 1.2 Release Engineering CVS Tag: OPENLDAP_REL_ENG_1_2 - Added the mdbm to the ldbm backends (memory mapped dbm). + Added the MDBM to the ldbm backends (memory mapped dbm) Updated README to require BerkeleyDB 2.7.5 - Added #define _SGI_MP_SOURCE to enable per-thread errno in - IRIX Build environment - Added sys/select.h detection. + Added closesocket detection/use of BeOS (ITS#195) + Added IRIX #define _SGI_MP_SOURCE for enable per-thread errno + Added sys/select.h detection Changes included in OpenLDAP 1.2.3 CVS Tag: OPENLDAP_REL_ENG_1_2_3 diff --git a/configure b/configure index 5253870515..7401701ca6 100755 --- a/configure +++ b/configure @@ -8835,6 +8835,7 @@ fi for ac_func in \ bcopy \ + closesocket \ flock \ getdtablesize \ gethostname \ @@ -8864,12 +8865,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8868: checking for $ac_func" >&5 +echo "configure:8869: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8920,12 +8921,12 @@ done for ac_func in getopt strdup tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8924: checking for $ac_func" >&5 +echo "configure:8925: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8978,13 +8979,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:8982: checking declaration of sys_errlist" >&5 +echo "configure:8983: checking declaration of sys_errlist" >&5 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -8994,7 +8995,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:8998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -9015,20 +9016,20 @@ if test $ol_cv_dcl_sys_errlist = no ; then EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:9019: checking existence of sys_errlist" >&5 +echo "configure:9020: checking existence of sys_errlist" >&5 if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:9032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 85cfa9d71b..cdb10207aa 100644 --- a/configure.in +++ b/configure.in @@ -1362,6 +1362,7 @@ fi AC_CHECK_FUNCS( \ bcopy \ + closesocket \ flock \ getdtablesize \ gethostname \ diff --git a/include/ac/socket.h b/include/ac/socket.h index ad11cec8d7..2ee4405016 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -60,23 +60,25 @@ #define MAXHOSTNAMELEN 64 #endif -#ifdef MACOS -#define tcp_close( s ) tcpclose( s ) -#else /* MACOS */ -#ifdef DOS -#ifdef PCNFS -#define tcp_close( s ) close( s ) -#endif /* PCNFS */ -#ifdef NCSA -#define tcp_close( s ) netclose( s ); netshut() -#endif /* NCSA */ -#ifdef WINSOCK -#define tcp_close( s ) closesocket( s ); -#endif /* WINSOCK */ -#else /* DOS */ -#define tcp_close( s ) close( s ) -#endif /* DOS */ -#endif /* MACOS */ +#ifdef HAVE_CLOSESOCKET +# define tcp_close( s ) closesocket( s ) +#elif defined( MACOS ) +# define tcp_close( s ) tcpclose( s ) +#elif defined( DOS ) + +# ifdef PCNFS +# define tcp_close( s ) close( s ) +# endif /* PCNFS */ +# ifdef NCSA +# define tcp_close( s ) netclose( s ); netshut() +# endif /* NCSA */ +# ifdef WINSOCK +# define tcp_close( s ) closesocket( s ) +# endif /* WINSOCK */ + +#else +# define tcp_close( s ) close( s ) +#endif #if !defined(__alpha) || defined(VMS) #define AC_HTONL( l ) htonl( l ) diff --git a/include/portable.h.in b/include/portable.h.in index e0103b67fa..ae2e17dd2a 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -211,6 +211,9 @@ /* Define if you have the bcopy function. */ #undef HAVE_BCOPY +/* Define if you have the closesocket function. */ +#undef HAVE_CLOSESOCKET + /* Define if you have the flock function. */ #undef HAVE_FLOCK