#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
#include <sys/stat.h>
#endif
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
#include <time.h>
#include <io.h>
#else
#include "strequal.h"
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
#include <time.h>
#include <io.h>
#else
#include <sys/stat.h>
#endif
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
#include <time.h>
#include <io.h>
#include <fcntl.h>
#include <unistd.h>
#endif
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
#else /* probably some kind of unix */
#ifdef HAVE_SYS_SOCKET_H
#include <sys/stat.h>
#endif
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
#include <time.h>
#include <io.h>
#else
#endif
}
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
/* This function handles most / all (?) Winsock errors cURL is able to produce.
*/
buf [len-1] = '\0';
return buf;
}
-#endif /* WIN32 && !__CYGWIN__ */
+#endif /* WIN32 */
/*
* Our thread-safe and smart strerror() replacement.
max = sizeof(conn->syserr_buf)-1;
*buf = '\0';
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
#ifdef _WIN32_WCE
buf[0]=0;
#include "setup.h"
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include "strtoofft.h"
#include "strequal.h"
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
#include <time.h>
#include <io.h>
#else
#endif
#include <errno.h>
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
#include <time.h>
#include <io.h>
#else
#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
#endif
return;
}
-#endif
#endif /* SIGALRM */
+#endif /* WIN32 */
#endif /* USE_ARES */
void Curl_safefree(void *ptr)
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)
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()
if(env)
curl_free(env);
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
else
FindWin32CACert(config, "curl-ca-bundle.crt");
#endif
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.
*/
#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"
return 0;
}
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
win32_init();
atexit(win32_cleanup);
#endif
}
}
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
win32_init();
atexit(win32_cleanup);
#else
}
}
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
win32_init();
atexit(win32_cleanup);
#else
}
}
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
win32_init();
atexit(win32_cleanup);
#endif
*/
int ourerrno(void)
{
-#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef WIN32
return (int)GetLastError();
#else
return errno;
}
}
-#if defined(REAL_WIN32)
+#ifdef WIN32
/* use instead of perror() on generic windows */
void win32_perror (const char *msg)
{
{
WSACleanup();
}
-#endif /* REAL_WIN32 */
+#endif /* WIN32 */
/* set by the main code to point to where the test dir is */
const char *path=".";
/* 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)
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);