lots of mods getting windows to build under cygwin without visual studio.
[feisty_meow.git] / nucleus / library / application / windoze_helper.h
index a02b29653f8782bf96ffa20f34abff536cee86b0..3da874538d22c3ca89f5b4442d54cd7313e15854 100644 (file)
 // gnarly headers that are needed for certain types of compilation...
 
 //unix headers not needed in here for new purpose of file.
-#ifdef __UNIX__
+#ifndef _MSC_VER
   #include <unistd.h>
+  #ifdef __GNU_WINDOWS__
+    #include <sys/unistd.h>
+  #endif
 #endif
 #ifndef NO_XWINDOWS
   #ifdef __XWINDOWS__
   #ifndef STRICT
     #define STRICT
   #endif
+  // winsock support...
+  #undef FD_SETSIZE
+  #define FD_SETSIZE 1000
+    // if you don't set this, you can only select on a default of 64 sockets.
+  #include <winsock2.h>
   // windows headers...
   #define _WINSOCKAPI_  // make windows.h happy about winsock.
   #ifndef _AFXDLL
     #include <afx.h>
     #include <afxwin.h>
   #endif
-  // winsock support...
-  #undef FD_SETSIZE
-  #define FD_SETSIZE 1000
-    // if you don't set this, you can only select on a default of 64 sockets.
-  #include <winsock2.h>
 #endif
 
 // forward.