Ingo Ralf Blum's cygwin fixes
authorDaniel Stenberg <daniel@haxx.se>
Wed, 24 Jan 2001 14:44:05 +0000 (14:44 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 24 Jan 2001 14:44:05 +0000 (14:44 +0000)
CHANGES
lib/if2ip.c
lib/url.c
src/main.c

diff --git a/CHANGES b/CHANGES
index ff10534..186654a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,9 @@
 
                                History of Changes
 Daniel (24 January 2001)
+- Ingo Ralf Blum submitted a series of patches required to get curl to compile
+  properly with cygwin.
+
 - Robert Weaver posted a fix for the win32 section of the curl_getenv() code
   that corrected a potential memory leak.
 
index dc3138a..87ead2b 100644 (file)
@@ -32,7 +32,7 @@
 #include <unistd.h>
 #endif
 
-#if ! defined(WIN32) && ! defined(__BEOS__)
+#if ! defined(WIN32) && ! defined(__BEOS__) && !defined(__CYGWIN32__)
 
 #ifdef NEED_REENTRANT
 #define _REENTRANT
index 06f18af..dc825cc 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -533,7 +533,7 @@ CURLcode curl_setopt(CURL *curl, CURLoption option, ...)
   return CURLE_OK;
 }
 
-#ifndef WIN32
+#if !defined(WIN32)||defined(__CYGWIN32__)
 #ifndef RETSIGTYPE
 #define RETSIGTYPE void
 #endif
@@ -1306,7 +1306,7 @@ static CURLcode _connect(CURL *curl, CURLconnect **in_connect)
   conn->serv_addr.sin_family = conn->hp->h_addrtype;
   conn->serv_addr.sin_port = htons(data->port);
 
-#ifndef WIN32 
+#if !defined(WIN32)||defined(__CYGWIN32__)
   /* We don't generally like checking for OS-versions, we should make this
      HAVE_XXXX based, although at the moment I don't have a decent test for
      this! */
index 6016b3d..2f3f1ed 100644 (file)
@@ -48,7 +48,7 @@
 /* This is now designed to have its own local setup.h */
 #include "setup.h"
 
-#ifdef WIN32
+#if defined(WIN32)&&!defined(__CYGWIN32__)
 #include <winsock.h>
 #endif
 
@@ -1713,7 +1713,7 @@ operate(struct Configurable *config, int argc, char *argv[])
       if(!config->errors)
         config->errors = stderr;
 
-#ifdef WIN32
+#if defined(WIN32) && !defined(__CYGWIN32__)
       if(!outfile && !(config->conf & CONF_GETTEXT)) {
         /* We get the output to stdout and we have not got the ASCII/text flag,
            then set stdout to be binary */