mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 07:38:49 -05:00
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:
parent
8a3280a2de
commit
d6c5d24af3
@ -31,10 +31,7 @@
|
|||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <tcp.h>
|
#include <tcp.h>
|
||||||
#elif defined(WIN32)
|
#elif !defined(WIN32)
|
||||||
#include <winsock2.h>
|
|
||||||
#include <windows.h>
|
|
||||||
#else
|
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
port build */
|
port build */
|
||||||
|
|
||||||
#ifndef NETWARE
|
#ifndef NETWARE
|
||||||
#include <windows.h>
|
|
||||||
#include <process.h> /* for the _getpid() proto */
|
#include <process.h> /* for the _getpid() proto */
|
||||||
#endif /* !NETWARE */
|
#endif /* !NETWARE */
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -45,11 +45,7 @@
|
|||||||
|
|
||||||
#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) || \
|
#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) || \
|
||||||
defined(__MINGW32__)
|
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
|
#else
|
||||||
|
|
||||||
/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
|
/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
|
||||||
|
@ -83,7 +83,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <windows.h>
|
|
||||||
#define EINPROGRESS WSAEINPROGRESS
|
#define EINPROGRESS WSAEINPROGRESS
|
||||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||||
#define EISCONN WSAEISCONN
|
#define EISCONN WSAEISCONN
|
||||||
|
@ -27,10 +27,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
#include <unixlib.h>
|
#include <unixlib.h>
|
||||||
#endif
|
#endif
|
||||||
@ -47,7 +43,6 @@ char *GetEnv(const char *variable)
|
|||||||
return NULL;
|
return NULL;
|
||||||
#else
|
#else
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
/* This shit requires windows.h (HUGE) to be included */
|
|
||||||
char env[MAX_PATH]; /* MAX_PATH is from windef.h */
|
char env[MAX_PATH]; /* MAX_PATH is from windef.h */
|
||||||
char *temp = getenv(variable);
|
char *temp = getenv(variable);
|
||||||
env[0] = '\0';
|
env[0] = '\0';
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
# include <windows.h>
|
|
||||||
# include <malloc.h>
|
# include <malloc.h>
|
||||||
# include <winldap.h>
|
# include <winldap.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
#ifndef HAVE_GETTIMEOFDAY
|
#ifndef HAVE_GETTIMEOFDAY
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <windows.h>
|
|
||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
|
|
||||||
static int gettimeofday(struct timeval *tp, void *nothing)
|
static int gettimeofday(struct timeval *tp, void *nothing)
|
||||||
|
@ -27,9 +27,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PWD_H
|
#ifdef HAVE_PWD_H
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -47,10 +47,6 @@
|
|||||||
|
|
||||||
#define CURLseparator "--_curl_--"
|
#define CURLseparator "--_curl_--"
|
||||||
|
|
||||||
#if defined(WIN32)&&!defined(__CYGWIN32__)
|
|
||||||
#include <winsock2.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __NOVELL_LIBC__
|
#ifdef __NOVELL_LIBC__
|
||||||
#include <screen.h>
|
#include <screen.h>
|
||||||
#endif
|
#endif
|
||||||
@ -2380,7 +2376,7 @@ static void parseconfig(const char *filename,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Get the filename of our executable. GetModuleFileName is
|
/* 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.
|
* We assume that we are using the ASCII version here.
|
||||||
*/
|
*/
|
||||||
int n = GetModuleFileName(0, filebuffer, sizeof(filebuffer));
|
int n = GetModuleFileName(0, filebuffer, sizeof(filebuffer));
|
||||||
@ -3114,7 +3110,7 @@ static void free_config_fields(struct Configurable *config)
|
|||||||
#if defined(WIN32) && !defined(__CYGWIN32__)
|
#if defined(WIN32) && !defined(__CYGWIN32__)
|
||||||
|
|
||||||
/* Function to find CACert bundle on a Win32 platform using SearchPath.
|
/* 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!)
|
* (Use the ASCII version instead of the unicode one!)
|
||||||
* The order of the directories it searches is:
|
* The order of the directories it searches is:
|
||||||
* 1. application's directory
|
* 1. application's directory
|
||||||
|
@ -39,8 +39,6 @@ void logmsg(const char *msg, ...);
|
|||||||
extern const char *path;
|
extern const char *path;
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||||
#include <windows.h>
|
|
||||||
#include <winsock2.h>
|
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
|
|
||||||
#define sleep(sec) Sleep ((sec)*1000)
|
#define sleep(sec) Sleep ((sec)*1000)
|
||||||
|
Loading…
Reference in New Issue
Block a user