Skip to content
Snippets Groups Projects
Commit 5a6c8966 authored by Yang Tse's avatar Yang Tse
Browse files

Cygwin preprocessor adjustments

parent 7c574572
No related branches found
No related tags found
No related merge requests found
......@@ -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)
{
#ifdef WIN32
#if defined(WIN32) && !defined(__CYGWIN__)
/* Winsock doesn't like no socket set in 'rd', 'wr' or 'exc'. This is
* case when 'num_fds <= 0. So sleep.
*/
......
......@@ -32,7 +32,7 @@
#define NUM_OPEN (FD_SETSIZE + 10)
#define NUM_NEEDED (NUM_OPEN + 16)
#if defined(WIN32) || defined(_WIN32) || defined(MSDOS)
#if (defined(WIN32) || defined(_WIN32) || defined(MSDOS)) && !defined(__CYGWIN__)
#define DEV_NULL "NUL"
#else
#define DEV_NULL "/dev/null"
......
......@@ -112,7 +112,7 @@ int main(int argc, char *argv[])
return 0;
}
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
#if defined(WIN32) && !defined(__CYGWIN__)
win32_init();
atexit(win32_cleanup);
#endif
......
......@@ -552,7 +552,7 @@ int main(int argc, char *argv[])
}
}
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
#if defined(WIN32) && !defined(__CYGWIN__)
win32_init();
atexit(win32_cleanup);
#else
......
......@@ -773,7 +773,7 @@ int main(int argc, char *argv[])
}
}
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
#if defined(WIN32) && !defined(__CYGWIN__)
win32_init();
atexit(win32_cleanup);
#else
......
......@@ -458,7 +458,7 @@ int main(int argc, char **argv)
}
}
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
#if defined(WIN32) && !defined(__CYGWIN__)
win32_init();
atexit(win32_cleanup);
#endif
......
......@@ -61,7 +61,7 @@
*/
int ourerrno(void)
{
#ifdef WIN32
#if defined(WIN32) && !defined(__CYGWIN__)
return (int)GetLastError();
#else
return errno;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment