From be991c81df212c53b0997d0dd5e3116e283e372e Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 9 Jun 1999 00:10:26 +0000 Subject: [PATCH] Add test for BeOS's closesocket --- configure | 25 +++++++++++++------------ configure.in | 1 + include/ac/socket.h | 5 +++++ include/portable.h.in | 3 +++ 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/configure b/configure index 96e7e028fd..eb1cb898bd 100755 --- a/configure +++ b/configure @@ -11240,6 +11240,7 @@ fi for ac_func in \ bcopy \ + closesocket \ endgrent \ endpwent \ flock \ @@ -11280,12 +11281,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11284: checking for $ac_func" >&5 +echo "configure:11285: 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:11313: \"$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 @@ -11336,12 +11337,12 @@ done for ac_func in getopt tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11340: checking for $ac_func" >&5 +echo "configure:11341: 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:11369: \"$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 @@ -11394,13 +11395,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:11398: checking declaration of sys_errlist" >&5 +echo "configure:11399: 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 < @@ -11410,7 +11411,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:11414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -11430,20 +11431,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:11434: checking existence of sys_errlist" >&5 +echo "configure:11435: 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:11447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11448: \"$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 5f24eff9a2..2b55c4e009 100644 --- a/configure.in +++ b/configure.in @@ -1635,6 +1635,7 @@ fi AC_CHECK_FUNCS( \ bcopy \ + closesocket \ endgrent \ endpwent \ flock \ diff --git a/include/ac/socket.h b/include/ac/socket.h index e640e6c8c2..5901442749 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -72,6 +72,7 @@ #elif MACOS # define tcp_close( s ) tcpclose( s ) + #elif DOS # ifdef PCNFS # define tcp_close( s ) close( s ) @@ -79,6 +80,10 @@ # ifdef NCSA # define tcp_close( s ) do { netclose( s ); netshut() } while(0) # endif /* NCSA */ + +#elif HAVE_CLOSESOCKET +# define tcp_close( s ) closesocket( s ) + #else # define tcp_close( s ) close( s ) #endif /* MACOS */ diff --git a/include/portable.h.in b/include/portable.h.in index eb85b867d6..ed7873738c 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -225,6 +225,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 ctime_r function. */ #undef HAVE_CTIME_R -- 2.39.5