summaryrefslogtreecommitdiff
path: root/setup.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2006-07-05 23:10:38 +0000
committerYang Tse <yangsita@gmail.com>2006-07-05 23:10:38 +0000
commit413a37e4097584848743b6504fe994fe9101813b (patch)
treee880ce4758fe553d43a31818260637cecc37cf81 /setup.h
parent3e2f91b95f5f34cf5861ec34e3361428eb3aa39e (diff)
downloadc-ares-413a37e4097584848743b6504fe994fe9101813b.tar.gz
c-ares-413a37e4097584848743b6504fe994fe9101813b.tar.bz2
c-ares-413a37e4097584848743b6504fe994fe9101813b.zip
Prevent definition of HAVE_WINxxx_H symbols and avoid inclusion of Windows headers when compiled with Cygwin in POSIX emulation mode.
Diffstat (limited to 'setup.h')
-rw-r--r--setup.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/setup.h b/setup.h
index 4426141..c6ec261 100644
--- a/setup.h
+++ b/setup.h
@@ -43,10 +43,12 @@
* Include header files for windows builds before redefining anything.
* Use this preproessor block only to include or exclude windows.h,
* winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
- * to any other further and independant block.
+ * to any other further and independant block. Under Cygwin things work
+ * just as under linux (e.g. <sys/socket.h>) and the winsock headers should
+ * never be included when __CYGWIN__ is defined.
*/
-#ifdef HAVE_WINDOWS_H
+#if defined(HAVE_WINDOWS_H) && !defined(__CYGWIN__)
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif