From 29bcba9a9075265cefd967a1dfdbac50a6958245 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 24 Jan 2001 14:44:05 +0000 Subject: [PATCH] Ingo Ralf Blum's cygwin fixes --- CHANGES | 3 +++ lib/if2ip.c | 2 +- lib/url.c | 4 ++-- src/main.c | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index ff1053440..186654afd 100644 --- 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. diff --git a/lib/if2ip.c b/lib/if2ip.c index dc3138a01..87ead2b9e 100644 --- a/lib/if2ip.c +++ b/lib/if2ip.c @@ -32,7 +32,7 @@ #include #endif -#if ! defined(WIN32) && ! defined(__BEOS__) +#if ! defined(WIN32) && ! defined(__BEOS__) && !defined(__CYGWIN32__) #ifdef NEED_REENTRANT #define _REENTRANT diff --git a/lib/url.c b/lib/url.c index 06f18afff..dc825cce7 100644 --- 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! */ diff --git a/src/main.c b/src/main.c index 6016b3d57..2f3f1edc2 100644 --- a/src/main.c +++ b/src/main.c @@ -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 #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 */