diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-01-02 22:23:27 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-01-02 22:23:27 +0000 |
commit | 193d33fd4a4267c327e95cddc7d92103f187e2a3 (patch) | |
tree | 7c09c1f6bbe0da8c1708413482fae392f50b0f4b | |
parent | a46b40b7fdf567250451b984b977f5e03c716d5e (diff) |
I removed the socklen_t use from the public curl/curl.h header and instead
made it an unsigned int. The type was only used in the curl_sockaddr struct
definition (only used by the curl_opensocket_callback). On all platforms I
could find information about, socklen_t is 32 unsigned bits large so I don't
think this will break the API or ABI. The main reason for this change is of
course for all the platforms that don't have a socklen_t definition in their
headers to build fine again. Providing our own configure magic and custom
definition of socklen_t on those systems proved to work but was a lot of
cruft, code and extra magic needed - when this very small change of type seems
harmless and still solves the missing socklen_t problem.
-rw-r--r-- | CHANGES | 11 | ||||
-rw-r--r-- | RELEASE-NOTES | 2 | ||||
-rw-r--r-- | include/curl/curl.h | 21 |
3 files changed, 15 insertions, 19 deletions
@@ -7,6 +7,17 @@ Changelog Daniel S (2 Jan 2008) +- I removed the socklen_t use from the public curl/curl.h header and instead + made it an unsigned int. The type was only used in the curl_sockaddr struct + definition (only used by the curl_opensocket_callback). On all platforms I + could find information about, socklen_t is 32 unsigned bits large so I don't + think this will break the API or ABI. The main reason for this change is of + course for all the platforms that don't have a socklen_t definition in their + headers to build fine again. Providing our own configure magic and custom + definition of socklen_t on those systems proved to work but was a lot of + cruft, code and extra magic needed - when this very small change of type + seems harmless and still solves the missing socklen_t problem. + - Richard Atterer brought a patch that added support for SOCKS4a proxies, which is an inofficial PROXY4 variant that sends the hostname to the proxy instead of the resolved address (which is already supported by SOCKS5). diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 68ad0fbc8..e17dcb94a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -29,7 +29,6 @@ This release includes the following bugfixes: o SSL connections with NSS done with the multi-interface o setting a share no longer activates cookies o Negotiate now works on auth and proxy simultanouesly - o curl.h now includes a socklen_t definition for Win32 API build targets o support HTTP Digest nonces up to 1023 letters o resumed ftp upload no longer requires the read callback to return full buffers @@ -42,6 +41,7 @@ This release includes the following bugfixes: o SSL session ID cache memory leak o bad connection re-use check with environment variable-activated proxy use o --libcurl now generates a return statement as well + o socklen_t is no longer used in the public includes This release includes the following known bugs: diff --git a/include/curl/curl.h b/include/curl/curl.h index a4140af76..396a0e0f2 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -86,23 +86,6 @@ extern "C" { typedef void CURL; /* - * Windows build targets have socklen_t definition in - * ws2tcpip.h but some versions of ws2tcpip.h do not - * have the definition. It seems that when the socklen_t - * definition is missing from ws2tcpip.h the definition - * for INET_ADDRSTRLEN is also missing, and that when one - * definition is present the other one also is available. - */ - -#if defined(WIN32) && !defined(HAVE_SOCKLEN_T) -# if ( defined(_MSC_VER) && !defined(INET_ADDRSTRLEN) ) || \ - (!defined(_MSC_VER) && !defined(_WS2TCPIP_H_) && !defined(_WS2TCPIP_H) ) -# define socklen_t int -# define HAVE_SOCKLEN_T -# endif -#endif - -/* * Decorate exportable functions for Win32 DLL linking. * This avoids using a .def file for building libcurl.dll. */ @@ -274,7 +257,9 @@ struct curl_sockaddr { int family; int socktype; int protocol; - socklen_t addrlen; + unsigned int addrlen; /* addrlen was a socklen_t type before 7.17.2 but it + turned really ugly and painful on the systems that + lack this type */ struct sockaddr addr; }; |