]> granicus.if.org Git - curl/commitdiff
Remove redundant __CYGWIN__ symbol check
authorYang Tse <yangsita@gmail.com>
Wed, 11 Oct 2006 16:01:16 +0000 (16:01 +0000)
committerYang Tse <yangsita@gmail.com>
Wed, 11 Oct 2006 16:01:16 +0000 (16:01 +0000)
19 files changed:
ares/ares.h
lib/dict.c
lib/easy.c
lib/file.c
lib/ftp.c
lib/http.c
lib/strerror.c
lib/timeval.h
lib/transfer.c
lib/url.c
src/main.c
tests/libtest/first.c
tests/libtest/lib518.c
tests/server/resolve.c
tests/server/sockfilt.c
tests/server/sws.c
tests/server/tftpd.c
tests/server/util.c
tests/server/util.h

index f4d98c87d6456c7f133c5fe581925132bd515c5a..9414f9b7898367b7b506c01d3da8914ba91af03c 100644 (file)
@@ -31,7 +31,7 @@
   #include <netinet/in.h>
   #include <sys/socket.h>
   #include <tcp.h>
-#elif defined(WIN32) && !defined(__CYGWIN__)
+#elif defined(WIN32)
   #include <winsock2.h>
   #include <windows.h>
 #else
index b14426a2890ce27496cdc3a08470c2a99b2eb3f6..d6443f4b95ff0bc99d3284e0ea7f39640bb193eb 100644 (file)
@@ -38,7 +38,7 @@
 #include <sys/stat.h>
 #endif
 
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
 #include <time.h>
 #include <io.h>
 #else
index cd931b82cdb9e0175320157c4c871443d1eaa53f..a400f84f116e5eab7c9c61e0257152365c8be334 100644 (file)
@@ -40,7 +40,7 @@
 
 #include "strequal.h"
 
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
 #include <time.h>
 #include <io.h>
 #else
index 1d4356b8f71f32ef348f2e5ad51d6faded392ece..e9ed5b7f0d7885704442ff29efdb9cd336b7492f 100644 (file)
@@ -37,7 +37,7 @@
 #include <sys/stat.h>
 #endif
 
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
 #include <time.h>
 #include <io.h>
 #include <fcntl.h>
index b71167aa47d6716df46e030ea0fb999b59b167bf..2dcbb8809b1e18c57b5212c44da7afa00754fbb2 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -34,7 +34,7 @@
 #include <unistd.h>
 #endif
 
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
 
 #else /* probably some kind of unix */
 #ifdef HAVE_SYS_SOCKET_H
index 809f20ca91c130ddbe01be8f4a2b5be1a401f86d..596a380d7d442f577691aa1689d959f6da66a1b1 100644 (file)
@@ -37,7 +37,7 @@
 #include <sys/stat.h>
 #endif
 
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
 #include <time.h>
 #include <io.h>
 #else
index 0309e4ff7f480763bf564c80a6a0295f6fa0fb2d..5b01a2297aa03c5545db17d10fff1096f8a1c377 100644 (file)
@@ -382,7 +382,7 @@ curl_share_strerror(CURLSHcode error)
 #endif
 }
 
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
 
 /* This function handles most / all (?) Winsock errors cURL is able to produce.
  */
@@ -570,7 +570,7 @@ get_winsock_error (int err, char *buf, size_t len)
   buf [len-1] = '\0';
   return buf;
 }
-#endif   /* WIN32 && !__CYGWIN__ */
+#endif   /* WIN32 */
 
 /*
  * Our thread-safe and smart strerror() replacement.
@@ -595,7 +595,7 @@ const char *Curl_strerror(struct connectdata *conn, int err)
   max = sizeof(conn->syserr_buf)-1;
   *buf = '\0';
 
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
 
 #ifdef _WIN32_WCE
   buf[0]=0;
index f79f41c73fd288ec13c28fb9fa720fb334a9e89e..8ab7a44012b52cba73d863f0e10647ab95f7d3cb 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "setup.h"
 
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
 #include <time.h>
 #else
 #ifdef HAVE_SYS_TIME_H
index ded1d5573c6b76448da365359bc75df57c7690c7..6cd071dc10544a8641ed53159b9a58a2ba6e465f 100644 (file)
@@ -41,7 +41,7 @@
 #include "strtoofft.h"
 #include "strequal.h"
 
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
 #include <time.h>
 #include <io.h>
 #else
index fefab252f7c0bfc6eb1cc15f5287e9d04a93ac69..dee4b40b9f3128f1cc159b2a2e78b5978f2f444d 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -38,7 +38,7 @@
 #endif
 #include <errno.h>
 
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
 #include <time.h>
 #include <io.h>
 #else
@@ -165,9 +165,10 @@ static void signalPipeClose(struct curl_llist *pipe);
 #define MAX_PIPELINE_LENGTH 5
 
 #ifndef USE_ARES
-/* not for Win32, unless it is cygwin
-   not for ares builds */
-#if !defined(WIN32) || defined(__CYGWIN__)
+/* not for ares builds */
+
+#ifndef WIN32
+/* not for WIN32 builds */
 
 #ifndef RETSIGTYPE
 #define RETSIGTYPE void
@@ -187,8 +188,8 @@ RETSIGTYPE alarmfunc(int sig)
 #endif
   return;
 }
-#endif
 #endif /* SIGALRM */
+#endif /* WIN32 */
 #endif /* USE_ARES */
 
 void Curl_safefree(void *ptr)
index bb3839253401acd92232607fedbeb8cb83a84b60..171097af74c4748e42aba0077369883133f2c290 100644 (file)
@@ -3107,7 +3107,7 @@ static void free_config_fields(struct Configurable *config)
   curl_slist_free_all(config->headers);
 }
 
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
 
 /* Function to find CACert bundle on a Win32 platform using SearchPath.
  * (SearchPath is already declared via inclusions done in setup header file)
@@ -3322,7 +3322,7 @@ operate(struct Configurable *config, int argc, char *argv[])
   else
     allocuseragent = TRUE;
 
-  /* On WIN32 (non-cygwin), we can't set the path to curl-ca-bundle.crt
+  /* On WIN32 we can't set the path to curl-ca-bundle.crt
    * at compile time. So we look here for the file in two ways:
    * 1: look at the environment variable CURL_CA_BUNDLE for a path
    * 2: if #1 isn't found, use the windows API function SearchPath()
@@ -3350,7 +3350,7 @@ operate(struct Configurable *config, int argc, char *argv[])
 
     if(env)
       curl_free(env);
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
     else
       FindWin32CACert(config, "curl-ca-bundle.crt");
 #endif
index 8050537db7fa0dc4eb774f47fbc7373f1d434204..fda1a7fb590b21bc5519b4a6d0c415b744a02eed 100644 (file)
@@ -12,7 +12,7 @@ int test(char *url);
 int select_test (int num_fds, fd_set *rd, fd_set *wr, fd_set *exc,
                  struct timeval *tv)
 {
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
   /* Winsock doesn't like no socket set in 'rd', 'wr' or 'exc'. This is
    * case when 'num_fds <= 0. So sleep.
    */
index d0c2007742ea2dff910ca22363888ad22351cc9f..1c858ee35554a03e29a6acb3e8a50513297b3761 100644 (file)
@@ -32,7 +32,7 @@
 #define NUM_OPEN (FD_SETSIZE + 10)
 #define NUM_NEEDED (NUM_OPEN + 16)
 
-#if (defined(WIN32) || defined(_WIN32) || defined(MSDOS)) && !defined(__CYGWIN__)
+#if defined(WIN32) || defined(_WIN32) || defined(MSDOS)
 #define DEV_NULL "NUL"
 #else
 #define DEV_NULL "/dev/null"
index 98a3f4e0802806879e3b4f24ee4225866df6688d..b579d460e3e942b6824b859404da8b1999b45bcb 100644 (file)
@@ -112,7 +112,7 @@ int main(int argc, char *argv[])
     return 0;
   }
 
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
   win32_init();
   atexit(win32_cleanup);
 #endif
index 165ecf27a0a5cb506ae3da62214f3e9e53423174..bf60a2c64d3a0d3d2c0154d3f993437dadbfe628 100644 (file)
@@ -552,7 +552,7 @@ int main(int argc, char *argv[])
     }
   }
 
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
   win32_init();
   atexit(win32_cleanup);
 #else
index c2c681dfe94f99e175eb49f623fb094c0f1e962a..7f9091f4a9d5e79d6f897f53f3d8c4e367934f5f 100644 (file)
@@ -773,7 +773,7 @@ int main(int argc, char *argv[])
     }
   }
 
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
   win32_init();
   atexit(win32_cleanup);
 #else
index 5c3caf4f852b6f10b922665c1748c9575707c15c..c234dbf193b620a1b9a399f9afff4a9948893189 100644 (file)
@@ -458,7 +458,7 @@ int main(int argc, char **argv)
     }
   }
 
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
   win32_init();
   atexit(win32_cleanup);
 #endif
index 724cb851747bc8cde21da644656595ff73b06d5f..7bf8bdc82d72c2ea8ee6bcc542dd0b6e68957aa7 100644 (file)
@@ -65,7 +65,7 @@ const struct in6_addr in6addr_any = {{ IN6ADDR_ANY_INIT }};
  */
 int ourerrno(void)
 {
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
   return (int)GetLastError();
 #else
   return errno;
@@ -101,7 +101,7 @@ void logmsg(const char *msg, ...)
   }
 }
 
-#if defined(REAL_WIN32)
+#ifdef WIN32
 /* use instead of perror() on generic windows */
 void win32_perror (const char *msg)
 {
@@ -145,7 +145,7 @@ void win32_cleanup(void)
 {
   WSACleanup();
 }
-#endif  /* REAL_WIN32 */
+#endif  /* WIN32 */
 
 /* set by the main code to point to where the test dir is */
 const char *path=".";
index 30395fc4cc152d2ac04bef28ca50f897e3428f7e..acda121592ab0ad35c99ab284d299a06abed1ccf 100644 (file)
@@ -38,10 +38,9 @@ void logmsg(const char *msg, ...);
 /* global variable, where to find the 'data' dir */
 extern const char *path;
 
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
 #include <process.h>
 #include <fcntl.h>
-#define REAL_WIN32
 
 #define sleep(sec)   Sleep ((sec)*1000)
 
@@ -57,7 +56,7 @@ void win32_perror (const char *msg);
 
 void win32_init(void);
 void win32_cleanup(void);
-#endif  /* WIN32 && !__CYGWIN__ */
+#endif  /* WIN32 */
 
 /* returns the path name to the test case file */
 char *test2file(long testno);