From 60a8fcf4b03685867340ad79008e3ee587544abc Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 16 Sep 2004 20:34:27 +0000 Subject: [PATCH] Avoid using socklen_t. --- configure | 63 -------------------------------------------- configure.ac | 2 +- dlls/wininet/internet.h | 2 +- dlls/wininet/netconnection.c | 2 +- include/config.h.in | 3 --- include/wine/port.h | 3 --- 6 files changed, 3 insertions(+), 72 deletions(-) diff --git a/configure b/configure index 524f4fb626e..8ebffe5194c 100755 --- a/configure +++ b/configure @@ -17542,69 +17542,6 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 -if test "${ac_cv_type_socklen_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((socklen_t *) 0) - return 0; -if (sizeof (socklen_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_socklen_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_socklen_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 -echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 -if test $ac_cv_type_socklen_t = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_SOCKLEN_T 1 -_ACEOF - - -fi echo "$as_me:$LINENO: checking for long long" >&5 echo $ECHO_N "checking for long long... $ECHO_C" >&6 if test "${ac_cv_type_long_long+set}" = set; then diff --git a/configure.ac b/configure.ac index fdfc6d56b75..8625ae35fa7 100644 --- a/configure.ac +++ b/configure.ac @@ -1268,7 +1268,7 @@ dnl **** Check for types **** AC_C_CONST AC_C_INLINE -AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t, socklen_t, long long, fsblkcnt_t, fsfilcnt_t]) +AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t, long long, fsblkcnt_t, fsfilcnt_t]) AC_CACHE_CHECK([whether linux/input.h is for real], wine_cv_linux_input_h, diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h index e3eebd26e0d..e36010992bb 100644 --- a/dlls/wininet/internet.h +++ b/dlls/wininet/internet.h @@ -460,7 +460,7 @@ BOOL NETCON_create(WININET_NETCONNECTION *connection, int domain, int type, int protocol); BOOL NETCON_close(WININET_NETCONNECTION *connection); BOOL NETCON_connect(WININET_NETCONNECTION *connection, const struct sockaddr *serv_addr, - socklen_t addrlen); + unsigned int addrlen); BOOL NETCON_send(WININET_NETCONNECTION *connection, const void *msg, size_t len, int flags, int *sent /* out */); BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int flags, diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c index 4b055d3f567..d042b70abe2 100644 --- a/dlls/wininet/netconnection.c +++ b/dlls/wininet/netconnection.c @@ -253,7 +253,7 @@ BOOL NETCON_close(WININET_NETCONNECTION *connection) * Basically calls 'connect()' unless we should use SSL */ BOOL NETCON_connect(WININET_NETCONNECTION *connection, const struct sockaddr *serv_addr, - socklen_t addrlen) + unsigned int addrlen) { if (!NETCON_connected(connection)) return FALSE; if (!connection->useSSL) diff --git a/include/config.h.in b/include/config.h.in index 8143a621e82..c0d43d7e72b 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -527,9 +527,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SOCKET_H -/* Define to 1 if the system has the type `socklen_t'. */ -#undef HAVE_SOCKLEN_T - /* Define to 1 if you have the header file. */ #undef HAVE_SOUNDCARD_H diff --git a/include/wine/port.h b/include/wine/port.h index 73288de614f..b4b1a26c440 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -61,9 +61,6 @@ typedef int pid_t; #ifndef HAVE_SIZE_T typedef unsigned int size_t; #endif -#ifndef HAVE_SOCKLEN_T -typedef unsigned int socklen_t; -#endif #ifndef HAVE_SSIZE_T typedef int ssize_t; #endif -- 2.11.4.GIT