diff options
author | Yang Tse <yangsita@gmail.com> | 2007-11-06 17:18:27 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2007-11-06 17:18:27 +0000 |
commit | 775b60fa09c335451e01fef9d7e327afbb0dff8f (patch) | |
tree | ccceb939b523bec0123d8afece33ee6878df21ff | |
parent | 66e4d391d3040df1e8d810f134adb02a4e5b8a20 (diff) |
Bug report #1824894 (http://curl.haxx.se/bug/view.cgi?id=1824894) pointed
out a problem in curl.h when building C++ apps with MSVC. To fix it, the
inclusion of header files in curl.h is moved outside of the C++ extern "C"
linkage block.
-rw-r--r-- | CHANGES | 6 | ||||
-rw-r--r-- | RELEASE-NOTES | 1 | ||||
-rw-r--r-- | include/curl/curl.h | 74 |
3 files changed, 44 insertions, 37 deletions
@@ -6,6 +6,12 @@ Changelog +Yang Tse (6 Nov 2007) +- Bug report #1824894 (http://curl.haxx.se/bug/view.cgi?id=1824894) pointed + out a problem in curl.h when building C++ apps with MSVC. To fix it, the + inclusion of header files in curl.h is moved outside of the C++ extern "C" + linkage block. + Daniel S (1 Nov 2007) - Toby Peterson patched a memory problem in the command line tool that happened when a user had a home dir as an empty string. curl would then do diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f24e647e6..633c6f8cb 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -17,6 +17,7 @@ This release includes the following bugfixes: o curl-config --features and --protocols show the correct output when built with NSS, and also when SCP, SFTP and libz are not available o free problem in the curl tool for users with empty home dir + o curl.h version 7.17.1 problem when building C++ apps with MSVC This release includes the following known bugs: diff --git a/include/curl/curl.h b/include/curl/curl.h index 6a7a71963..a29476017 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -41,12 +41,48 @@ # include <time.h> #endif /* defined (vms) */ -typedef void CURL; +#if defined(_WIN32) && !defined(WIN32) +/* Chris Lewis mentioned that he doesn't get WIN32 defined, only _WIN32 so we + make this adjustment to catch this. */ +#define WIN32 1 +#endif + +#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) && \ + !defined(__CYGWIN__) || defined(__MINGW32__) +#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H)) +/* The check above prevents the winsock2 inclusion if winsock.h already was + included, since they can't co-exist without problems */ +#include <winsock2.h> +#include <ws2tcpip.h> +#endif +#else + +/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish + libc5-based Linux systems. Only include it on system that are known to + require it! */ +#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || defined(__minix) +#include <sys/select.h> +#endif + +#ifndef _WIN32_WCE +#include <sys/socket.h> +#endif +#ifndef __WATCOMC__ +#include <sys/time.h> +#endif +#include <sys/types.h> +#endif + +#ifdef __BEOS__ +#include <support/SupportDefs.h> +#endif #ifdef __cplusplus extern "C" { #endif +typedef void CURL; + /* * Decorate exportable functions for Win32 DLL linking. * This avoids using a .def file for building libcurl.dll. @@ -139,38 +175,6 @@ extern "C" { #undef FILESIZEBITS #endif -#if defined(_WIN32) && !defined(WIN32) -/* Chris Lewis mentioned that he doesn't get WIN32 defined, only _WIN32 so we - make this adjustment to catch this. */ -#define WIN32 1 -#endif - -#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) && \ - !defined(__CYGWIN__) || defined(__MINGW32__) -#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H)) -/* The check above prevents the winsock2 inclusion if winsock.h already was - included, since they can't co-exist without problems */ -#include <winsock2.h> -#include <ws2tcpip.h> -#endif -#else - -/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish - libc5-based Linux systems. Only include it on system that are known to - require it! */ -#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || defined(__minix) -#include <sys/select.h> -#endif - -#ifndef _WIN32_WCE -#include <sys/socket.h> -#endif -#ifndef __WATCOMC__ -#include <sys/time.h> -#endif -#include <sys/types.h> -#endif - #ifndef curl_socket_typedef /* socket typedef */ #ifdef WIN32 @@ -1241,10 +1245,6 @@ typedef enum { CURL_TIMECOND_LAST } curl_TimeCond; -#ifdef __BEOS__ -#include <support/SupportDefs.h> -#endif - /* curl_strequal() and curl_strnequal() are subject for removal in a future libcurl, see lib/README.curlx for details */ |