aboutsummaryrefslogtreecommitdiff
path: root/src/setup.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2005-12-16 20:55:07 +0000
committerYang Tse <yangsita@gmail.com>2005-12-16 20:55:07 +0000
commite105d5c28f3f6c7034a8da2682bbc662ad6c15e1 (patch)
treeace47dc7dd2070e741f26d324cc64dc56c48980e /src/setup.h
parentd6ffb4c177615e766268bd4ab3afc9cef77aa7c9 (diff)
'Fix' windows builds
Diffstat (limited to 'src/setup.h')
-rw-r--r--src/setup.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/setup.h b/src/setup.h
index 01823157c..4cc41dd87 100644
--- a/src/setup.h
+++ b/src/setup.h
@@ -60,6 +60,34 @@
#include "../lib/setup.h"
#endif
+
+/*
+ * 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.
+ */
+
+#ifdef WIN32
+# ifdef HAVE_WINDOWS_H
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
+# include <windows.h>
+# ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+# ifdef HAVE_WS2TCPIP_H
+# include <ws2tcpip.h>
+# endif
+# else
+# ifdef HAVE_WINSOCK_H
+# include <winsock.h>
+# endif
+# endif
+# endif
+#endif
+
+
#include <stdio.h>
#ifdef __TANDEM