]> granicus.if.org Git - curl/commitdiff
Cleanup windows header includes. Where aplicable, inclusion of
authorYang Tse <yangsita@gmail.com>
Sun, 18 Dec 2005 15:36:14 +0000 (15:36 +0000)
committerYang Tse <yangsita@gmail.com>
Sun, 18 Dec 2005 15:36:14 +0000 (15:36 +0000)
windows.h winsock.h winsock2.h ws2tcpip.h is done in setup.h

ares/ares.h
ares/nameser.h
include/curl/multi.h
lib/connect.c
lib/getenv.c
lib/ldap.c
lib/timeval.c
src/homedir.c
src/main.c
tests/server/util.h

index 7f76112f7141bff9ebac0fa2a3b71f59fc31dd63..695f8aafbcc43815aa61cda7523e62882e5c38c0 100644 (file)
   #include <netinet/in.h>
   #include <sys/socket.h>
   #include <tcp.h>
-#elif defined(WIN32)
-  #include <winsock2.h>
-  #include <windows.h>
-#else
+#elif !defined(WIN32)
   #include <netinet/in.h>
   #include <sys/socket.h>
 #endif
index 7127c26402a40a0bce9bfe7c9b24d6cf320d34f4..0ccbfd1c0327396cac00cef561fcfeef509f59a1 100644 (file)
@@ -7,7 +7,6 @@
    port build */
 
 #ifndef NETWARE
-#include <windows.h>
 #include <process.h> /* for the _getpid() proto */
 #endif  /* !NETWARE */
 #include <sys/types.h>
index 96c2763eff807643e4d9c033839a17a5b93739d0..35cf348852b9140ed8248ff8ecf42a07651e2fda 100644 (file)
 
 #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) || \
   defined(__MINGW32__)
-#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H))
-/* The check above prevents the winsock2 inclusion if winsock.h already was
-   included, since they can't co-exist without problems */
-#include <winsock2.h>
-#endif
+
 #else
 
 /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
index 42c0ea6e7346377f27768a0a6d1e4f3bacbad2de..2fb08d628e51b4a304c3287b73b716b7d721477a 100644 (file)
@@ -83,7 +83,6 @@
 #endif
 
 #ifdef WIN32
-#include <windows.h>
 #define EINPROGRESS WSAEINPROGRESS
 #define EWOULDBLOCK WSAEWOULDBLOCK
 #define EISCONN     WSAEISCONN
index fbf37a992a98969e4f31a035ac565f610fcef92b..46b3375d92e99df0a17a7788aa455e2475db4181 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef WIN32
-#include <windows.h>
-#endif
-
 #ifdef VMS
 #include <unixlib.h>
 #endif
@@ -47,7 +43,6 @@ char *GetEnv(const char *variable)
   return NULL;
 #else
 #ifdef WIN32
-  /* This shit requires windows.h (HUGE) to be included */
   char env[MAX_PATH]; /* MAX_PATH is from windef.h */
   char *temp = getenv(variable);
   env[0] = '\0';
index 9c877e19fc60a461e4ab8f2485c7dbf1517d188f..d71b513f82d8e1e82cd0c3d87f62f118b46886f9 100644 (file)
@@ -39,7 +39,6 @@
 #include <errno.h>
 
 #if defined(WIN32)
-# include <windows.h>
 # include <malloc.h>
 # include <winldap.h>
 #endif
index ce866ca825400b513a3b3e87f23a2c0abf904f37..11f3d7a065423f9076e97fe669f79d9898b0d977 100644 (file)
@@ -26,7 +26,6 @@
 #ifndef HAVE_GETTIMEOFDAY
 
 #ifdef WIN32
-#include <windows.h>
 #include <mmsystem.h>
 
 static int gettimeofday(struct timeval *tp, void *nothing)
index e9b6db3beda2fb4ea570d4e724e4b0b239db1d60..f27aa6924e0eb27ec926b995ea91d7ff8d9f20be 100644 (file)
@@ -27,9 +27,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef WIN32
-#include <windows.h>
-#endif
 #ifdef HAVE_PWD_H
 #include <pwd.h>
 #endif
index a9a0c30fcc3c8709905d083ecd5c0c973c82ddf5..51e3413fbff9e90484e5c1018ac4cc4c69e70a35 100644 (file)
 
 #define CURLseparator   "--_curl_--"
 
-#if defined(WIN32)&&!defined(__CYGWIN32__)
-#include <winsock2.h>
-#endif
-
 #ifdef __NOVELL_LIBC__
 #include <screen.h>
 #endif
@@ -2380,7 +2376,7 @@ static void parseconfig(const char *filename,
         }
         else {
           /* Get the filename of our executable. GetModuleFileName is
-           * defined in windows.h, which is #included into libcurl.
+           * already declared via inclusions done in setup header file.
            * We assume that we are using the ASCII version here.
            */
           int n = GetModuleFileName(0, filebuffer, sizeof(filebuffer));
@@ -3114,7 +3110,7 @@ static void free_config_fields(struct Configurable *config)
 #if defined(WIN32) && !defined(__CYGWIN32__)
 
 /* Function to find CACert bundle on a Win32 platform using SearchPath.
- * (SearchPath is defined in windows.h, which is #included into libcurl)
+ * (SearchPath is already declared via inclusions done in setup header file)
  * (Use the ASCII version instead of the unicode one!)
  * The order of the directories it searches is:
  *  1. application's directory
index 357b49cc93fada22fdc85c4a4d7560164bf44319..de33462cfb3ff094cebdb8af6e925b0bf967d186 100644 (file)
@@ -39,8 +39,6 @@ void logmsg(const char *msg, ...);
 extern const char *path;
 
 #if defined(WIN32) && !defined(__CYGWIN__)
-#include <windows.h>
-#include <winsock2.h>
 #include <process.h>
 
 #define sleep(sec)   Sleep ((sec)*1000)