diff --git a/CHANGES b/CHANGES index bdca20044..b0877cbef 100644 --- a/CHANGES +++ b/CHANGES @@ -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 #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 +#include +#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 +#endif + +#ifndef _WIN32_WCE +#include +#endif +#ifndef __WATCOMC__ +#include +#endif +#include +#endif + +#ifdef __BEOS__ +#include +#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 -#include -#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 -#endif - -#ifndef _WIN32_WCE -#include -#endif -#ifndef __WATCOMC__ -#include -#endif -#include -#endif - #ifndef curl_socket_typedef /* socket typedef */ #ifdef WIN32 @@ -1241,10 +1245,6 @@ typedef enum { CURL_TIMECOND_LAST } curl_TimeCond; -#ifdef __BEOS__ -#include -#endif - /* curl_strequal() and curl_strnequal() are subject for removal in a future libcurl, see lib/README.curlx for details */