Cleanup windows header includes. Where aplicable, inclusion of
windows.h winsock.h winsock2.h ws2tcpip.h is done in setup.h
This commit is contained in:
Родитель
8a3280a2de
Коммит
d6c5d24af3
|
@ -31,10 +31,7 @@
|
|||
#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
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
port build */
|
||||
|
||||
#ifndef NETWARE
|
||||
#include <windows.h>
|
||||
#include <process.h> /* for the _getpid() proto */
|
||||
#endif /* !NETWARE */
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -45,11 +45,7 @@
|
|||
|
||||
#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
|
||||
|
|
|
@ -83,7 +83,6 @@
|
|||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#define EINPROGRESS WSAEINPROGRESS
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#define EISCONN WSAEISCONN
|
||||
|
|
|
@ -27,10 +27,6 @@
|
|||
#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';
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include <errno.h>
|
||||
|
||||
#if defined(WIN32)
|
||||
# include <windows.h>
|
||||
# include <malloc.h>
|
||||
# include <winldap.h>
|
||||
#endif
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#ifndef HAVE_GETTIMEOFDAY
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
|
||||
static int gettimeofday(struct timeval *tp, void *nothing)
|
||||
|
|
|
@ -27,9 +27,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#ifdef HAVE_PWD_H
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
|
|
|
@ -47,10 +47,6 @@
|
|||
|
||||
#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
|
||||
|
|
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче