Remove redundant __CYGWIN__ symbol check
This commit is contained in:
parent
943f0733bb
commit
e150150d9f
@ -31,7 +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) && !defined(__CYGWIN__)
|
#elif defined(WIN32)
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#else
|
#else
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
#include "strequal.h"
|
#include "strequal.h"
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#else
|
#else
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
|
|
||||||
#else /* probably some kind of unix */
|
#else /* probably some kind of unix */
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#else
|
#else
|
||||||
|
@ -382,7 +382,7 @@ curl_share_strerror(CURLSHcode error)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
|
|
||||||
/* This function handles most / all (?) Winsock errors cURL is able to produce.
|
/* This function handles most / all (?) Winsock errors cURL is able to produce.
|
||||||
*/
|
*/
|
||||||
@ -570,7 +570,7 @@ get_winsock_error (int err, char *buf, size_t len)
|
|||||||
buf [len-1] = '\0';
|
buf [len-1] = '\0';
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
#endif /* WIN32 && !__CYGWIN__ */
|
#endif /* WIN32 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Our thread-safe and smart strerror() replacement.
|
* Our thread-safe and smart strerror() replacement.
|
||||||
@ -595,7 +595,7 @@ const char *Curl_strerror(struct connectdata *conn, int err)
|
|||||||
max = sizeof(conn->syserr_buf)-1;
|
max = sizeof(conn->syserr_buf)-1;
|
||||||
*buf = '\0';
|
*buf = '\0';
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
|
|
||||||
#ifdef _WIN32_WCE
|
#ifdef _WIN32_WCE
|
||||||
buf[0]=0;
|
buf[0]=0;
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include "setup.h"
|
#include "setup.h"
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_SYS_TIME_H
|
#ifdef HAVE_SYS_TIME_H
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
#include "strtoofft.h"
|
#include "strtoofft.h"
|
||||||
#include "strequal.h"
|
#include "strequal.h"
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#else
|
#else
|
||||||
|
11
lib/url.c
11
lib/url.c
@ -38,7 +38,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#else
|
#else
|
||||||
@ -165,9 +165,10 @@ static void signalPipeClose(struct curl_llist *pipe);
|
|||||||
#define MAX_PIPELINE_LENGTH 5
|
#define MAX_PIPELINE_LENGTH 5
|
||||||
|
|
||||||
#ifndef USE_ARES
|
#ifndef USE_ARES
|
||||||
/* not for Win32, unless it is cygwin
|
/* not for ares builds */
|
||||||
not for ares builds */
|
|
||||||
#if !defined(WIN32) || defined(__CYGWIN__)
|
#ifndef WIN32
|
||||||
|
/* not for WIN32 builds */
|
||||||
|
|
||||||
#ifndef RETSIGTYPE
|
#ifndef RETSIGTYPE
|
||||||
#define RETSIGTYPE void
|
#define RETSIGTYPE void
|
||||||
@ -187,8 +188,8 @@ RETSIGTYPE alarmfunc(int sig)
|
|||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif /* SIGALRM */
|
#endif /* SIGALRM */
|
||||||
|
#endif /* WIN32 */
|
||||||
#endif /* USE_ARES */
|
#endif /* USE_ARES */
|
||||||
|
|
||||||
void Curl_safefree(void *ptr)
|
void Curl_safefree(void *ptr)
|
||||||
|
@ -3107,7 +3107,7 @@ static void free_config_fields(struct Configurable *config)
|
|||||||
curl_slist_free_all(config->headers);
|
curl_slist_free_all(config->headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
|
|
||||||
/* Function to find CACert bundle on a Win32 platform using SearchPath.
|
/* Function to find CACert bundle on a Win32 platform using SearchPath.
|
||||||
* (SearchPath is already declared via inclusions done in setup header file)
|
* (SearchPath is already declared via inclusions done in setup header file)
|
||||||
@ -3322,7 +3322,7 @@ operate(struct Configurable *config, int argc, char *argv[])
|
|||||||
else
|
else
|
||||||
allocuseragent = TRUE;
|
allocuseragent = TRUE;
|
||||||
|
|
||||||
/* On WIN32 (non-cygwin), we can't set the path to curl-ca-bundle.crt
|
/* On WIN32 we can't set the path to curl-ca-bundle.crt
|
||||||
* at compile time. So we look here for the file in two ways:
|
* at compile time. So we look here for the file in two ways:
|
||||||
* 1: look at the environment variable CURL_CA_BUNDLE for a path
|
* 1: look at the environment variable CURL_CA_BUNDLE for a path
|
||||||
* 2: if #1 isn't found, use the windows API function SearchPath()
|
* 2: if #1 isn't found, use the windows API function SearchPath()
|
||||||
@ -3350,7 +3350,7 @@ operate(struct Configurable *config, int argc, char *argv[])
|
|||||||
|
|
||||||
if(env)
|
if(env)
|
||||||
curl_free(env);
|
curl_free(env);
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
else
|
else
|
||||||
FindWin32CACert(config, "curl-ca-bundle.crt");
|
FindWin32CACert(config, "curl-ca-bundle.crt");
|
||||||
#endif
|
#endif
|
||||||
|
@ -12,7 +12,7 @@ int test(char *url);
|
|||||||
int select_test (int num_fds, fd_set *rd, fd_set *wr, fd_set *exc,
|
int select_test (int num_fds, fd_set *rd, fd_set *wr, fd_set *exc,
|
||||||
struct timeval *tv)
|
struct timeval *tv)
|
||||||
{
|
{
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
/* Winsock doesn't like no socket set in 'rd', 'wr' or 'exc'. This is
|
/* Winsock doesn't like no socket set in 'rd', 'wr' or 'exc'. This is
|
||||||
* case when 'num_fds <= 0. So sleep.
|
* case when 'num_fds <= 0. So sleep.
|
||||||
*/
|
*/
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#define NUM_OPEN (FD_SETSIZE + 10)
|
#define NUM_OPEN (FD_SETSIZE + 10)
|
||||||
#define NUM_NEEDED (NUM_OPEN + 16)
|
#define NUM_NEEDED (NUM_OPEN + 16)
|
||||||
|
|
||||||
#if (defined(WIN32) || defined(_WIN32) || defined(MSDOS)) && !defined(__CYGWIN__)
|
#if defined(WIN32) || defined(_WIN32) || defined(MSDOS)
|
||||||
#define DEV_NULL "NUL"
|
#define DEV_NULL "NUL"
|
||||||
#else
|
#else
|
||||||
#define DEV_NULL "/dev/null"
|
#define DEV_NULL "/dev/null"
|
||||||
|
@ -112,7 +112,7 @@ int main(int argc, char *argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
win32_init();
|
win32_init();
|
||||||
atexit(win32_cleanup);
|
atexit(win32_cleanup);
|
||||||
#endif
|
#endif
|
||||||
|
@ -552,7 +552,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
win32_init();
|
win32_init();
|
||||||
atexit(win32_cleanup);
|
atexit(win32_cleanup);
|
||||||
#else
|
#else
|
||||||
|
@ -773,7 +773,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
win32_init();
|
win32_init();
|
||||||
atexit(win32_cleanup);
|
atexit(win32_cleanup);
|
||||||
#else
|
#else
|
||||||
|
@ -458,7 +458,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
win32_init();
|
win32_init();
|
||||||
atexit(win32_cleanup);
|
atexit(win32_cleanup);
|
||||||
#endif
|
#endif
|
||||||
|
@ -65,7 +65,7 @@ const struct in6_addr in6addr_any = {{ IN6ADDR_ANY_INIT }};
|
|||||||
*/
|
*/
|
||||||
int ourerrno(void)
|
int ourerrno(void)
|
||||||
{
|
{
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
return (int)GetLastError();
|
return (int)GetLastError();
|
||||||
#else
|
#else
|
||||||
return errno;
|
return errno;
|
||||||
@ -101,7 +101,7 @@ void logmsg(const char *msg, ...)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(REAL_WIN32)
|
#ifdef WIN32
|
||||||
/* use instead of perror() on generic windows */
|
/* use instead of perror() on generic windows */
|
||||||
void win32_perror (const char *msg)
|
void win32_perror (const char *msg)
|
||||||
{
|
{
|
||||||
@ -145,7 +145,7 @@ void win32_cleanup(void)
|
|||||||
{
|
{
|
||||||
WSACleanup();
|
WSACleanup();
|
||||||
}
|
}
|
||||||
#endif /* REAL_WIN32 */
|
#endif /* WIN32 */
|
||||||
|
|
||||||
/* set by the main code to point to where the test dir is */
|
/* set by the main code to point to where the test dir is */
|
||||||
const char *path=".";
|
const char *path=".";
|
||||||
|
@ -38,10 +38,9 @@ void logmsg(const char *msg, ...);
|
|||||||
/* global variable, where to find the 'data' dir */
|
/* global variable, where to find the 'data' dir */
|
||||||
extern const char *path;
|
extern const char *path;
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#ifdef WIN32
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#define REAL_WIN32
|
|
||||||
|
|
||||||
#define sleep(sec) Sleep ((sec)*1000)
|
#define sleep(sec) Sleep ((sec)*1000)
|
||||||
|
|
||||||
@ -57,7 +56,7 @@ void win32_perror (const char *msg);
|
|||||||
|
|
||||||
void win32_init(void);
|
void win32_init(void);
|
||||||
void win32_cleanup(void);
|
void win32_cleanup(void);
|
||||||
#endif /* WIN32 && !__CYGWIN__ */
|
#endif /* WIN32 */
|
||||||
|
|
||||||
/* returns the path name to the test case file */
|
/* returns the path name to the test case file */
|
||||||
char *test2file(long testno);
|
char *test2file(long testno);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user