Changelog
+Daniel (8 June 2006)
+- Brian Dessent fixed the code for cygwin in three distinct ways:
+
+ The first modifies {lib,src}/setup.h to not include the winsock headers
+ under Cygwin. This fixes the reported build problem. Cygwin attempts as
+ much as possible to emulate a posix environment under Windows. This means
+ that WIN32 is *not* #defined and (to the extent possible) everything is done
+ as it would be on a *ix type system. Thus <sys/socket.h> is the proper
+ include, and even though winsock2.h is present, including it just introduces
+ a whole bunch of incompatible socket API stuff.
+
+ The second is a patch I've included in the Cygwin binary packages for a
+ while. It skips two unnecessary library checks (-lwinmm and -lgdi32). The
+ checks are innocuous and they do succeed, but they pollute LIBS with
+ unnecessary stuff which gets recorded as such in the libcurl.la file, which
+ brings them into the build of any libcurl-downstream. As far as I know
+ these libs are really only necessary for mingw, so alternatively they could
+ be designed to only run if $host matches *-*-mingw* but I took the safer
+ route of skipping them for *-*-cygwin*.
+
+ The third patch replaces all uses of the ancient and obsolete __CYGWIN32__
+ with __CYGWIN__. Ref: <http://cygwin.com/ml/cygwin/2003-09/msg01520.html>.
+
Daniel (7 June 2006)
- Mikael Sennerholm provided a patch that added NTLM2 session response support
to libcurl. The 21 NTLM test cases were again modified to comply...
This release includes the following bugfixes:
+ o builds fine on cygwin
o md5-sess with Digest authentication
o dict with letters such as space in a word
o dict with url-encoded words in the URL
o improved NTLM functionality
o following redirects with more than one question mark in source URL
o fixed debug build crash with -d
- o TFTP works on more systems
o generates a fine AIX Toolbox RPM spec
o treat FTP AUTH failures properly
o TFTP transfers could trash data
Dan Fandrich, Ilja van Sprundel, David McCreedy, Tor Arntsen, Xavier Bouchoux,
David Byron, Michele Bini, Ates Goral, Katie Wang, Robson Braga Araujo,
Ale Vesely, Paul Querna, Gisle Vanem, Mark Eichin, Roland Blom, Andreas
- Ntaflos, David Shaw, Michael Wallner, Olaf Stüben, Mikael Sennerholm
+ Ntaflos, David Shaw, Michael Wallner, Olaf Stüben, Mikael Sennerholm,
+ Brian Dessent
Thanks! (and sorry if I forgot to mention someone)
dnl Check for the presence of the winmm library.
dnl **********************************************************************
-AC_MSG_CHECKING([for timeGetTime in winmm])
-my_ac_save_LIBS=$LIBS
-LIBS="-lwinmm $LIBS"
-AC_TRY_LINK([#include <windef.h>
- #include <mmsystem.h>
- ],
- [timeGetTime();],
- [ dnl worked!
- AC_MSG_RESULT([yes])
- ],
- [ dnl failed, restore LIBS
- LIBS=$my_ac_save_LIBS
- AC_MSG_RESULT(no)]
- )
+case $host in
+ *-*-cygwin*)
+ dnl Under Cygwin, winmm exists but is not needed as WIN32 is not #defined
+ dnl and gettimeofday() will be used regardless of the outcome of this test.
+ dnl Skip this test, otherwise -lwinmm will be needlessly added to LIBS
+ dnl (and recorded as such in the .la file, potentially affecting downstream
+ dnl clients of the library.)
+ ;;
+ *)
+ AC_MSG_CHECKING([for timeGetTime in winmm])
+ my_ac_save_LIBS=$LIBS
+ LIBS="-lwinmm $LIBS"
+ AC_TRY_LINK([#include <windef.h>
+ #include <mmsystem.h>
+ ],
+ [timeGetTime();],
+ [ dnl worked!
+ AC_MSG_RESULT([yes])
+ ],
+ [ dnl failed, restore LIBS
+ LIBS=$my_ac_save_LIBS
+ AC_MSG_RESULT(no)]
+ )
+ ;;
+esac
dnl **********************************************************************
dnl Checks for IPv6
fi
dnl This is for Msys/Mingw
- AC_MSG_CHECKING([for gdi32])
- my_ac_save_LIBS=$LIBS
- LIBS="-lgdi32 $LIBS"
- AC_TRY_LINK([#include <windef.h>
- #include <wingdi.h>],
- [GdiFlush();],
- [ dnl worked!
- AC_MSG_RESULT([yes])],
- [ dnl failed, restore LIBS
- LIBS=$my_ac_save_LIBS
- AC_MSG_RESULT(no)]
- )
+ case $host in
+ *-*-cygwin*)
+ dnl Under Cygwin this is extraneous and causes an unnecessary -lgdi32
+ dnl to be added to LIBS and recorded in the .la file.
+ ;;
+ *)
+ AC_MSG_CHECKING([for gdi32])
+ my_ac_save_LIBS=$LIBS
+ LIBS="-lgdi32 $LIBS"
+ AC_TRY_LINK([#include <windef.h>
+ #include <wingdi.h>],
+ [GdiFlush();],
+ [ dnl worked!
+ AC_MSG_RESULT([yes])],
+ [ dnl failed, restore LIBS
+ LIBS=$my_ac_save_LIBS
+ AC_MSG_RESULT(no)]
+ )
+ ;;
+ esac
AC_CHECK_LIB(crypto, CRYPTO_lock,[
HAVECRYPTO="yes"
#include "if2ip.h"
-#if !defined(WIN32) && !defined(__BEOS__) && !defined(__CYGWIN32__) && \
+#if !defined(WIN32) && !defined(__BEOS__) && !defined(__CYGWIN__) && \
!defined(__riscos__) && !defined(__INTERIX) && !defined(NETWARE) && \
!defined(_AMIGASF)
* Include header files for windows builds before redefining anything.
* Use this preproessor block only to include or exclude windows.h,
* winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
- * to any other further and independant block.
+ * to any other further and independant block. Under Cygwin things work
+ * just as under linux (e.g. <sys/socket.h>) and the winsock headers should
+ * never be included.
*/
-#ifdef HAVE_WINDOWS_H
+#if defined(HAVE_WINDOWS_H) && !defined(__CYGWIN__)
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
#ifndef USE_ARES
/* not for Win32, unless it is cygwin
not for ares builds */
-#if !defined(WIN32) || defined(__CYGWIN32__)
+#if !defined(WIN32) || defined(__CYGWIN__)
#ifndef RETSIGTYPE
#define RETSIGTYPE void
curl_slist_free_all(config->headers);
}
-#if defined(WIN32) && !defined(__CYGWIN32__)
+#if defined(WIN32) && !defined(__CYGWIN__)
/* Function to find CACert bundle on a Win32 platform using SearchPath.
* (SearchPath is already declared via inclusions done in setup header file)
if(env)
curl_free(env);
-#if defined(WIN32) && !defined(__CYGWIN32__)
+#if defined(WIN32) && !defined(__CYGWIN__)
else
FindWin32CACert(config, "curl-ca-bundle.crt");
#endif
* Include header files for windows builds before redefining anything.
* Use this preproessor block only to include or exclude windows.h,
* winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
- * to any other further and independant block.
+ * to any other further and independant block. Under Cygwin things work
+ * just as under linux (e.g. <sys/socket.h>) and the winsock headers should
+ * never be included.
*/
-#ifdef HAVE_WINDOWS_H
+#if defined(HAVE_WINDOWS_H) && !defined(__CYGWIN__)
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif