mirror of
https://github.com/curl/curl.git
synced 2026-07-24 17:47:34 +03:00
tidy-up: OS names
Use these words and casing more consistently across text, comments and one curl tool output: AIX, ALPN, ANSI, BSD, Cygwin, Darwin, FreeBSD, GitHub, HP-UX, Linux, macOS, MS-DOS, MSYS, MinGW, NTLM, POSIX, Solaris, UNIX, Unix, Unicode, WINE, WebDAV, Win32, winbind, WinIDN, Windows, Windows CE, Winsock. Mostly OS names and a few more. Also a couple of other minor text fixups. Closes #14360
This commit is contained in:
parent
a4ad7dc5a3
commit
f81f351b9a
146 changed files with 355 additions and 358 deletions
|
|
@ -124,7 +124,7 @@ static void tcpnodelay(struct Curl_easy *data, curl_socket_t sockfd)
|
|||
}
|
||||
|
||||
#ifdef SO_NOSIGPIPE
|
||||
/* The preferred method on Mac OS X (10.2 and later) to prevent SIGPIPEs when
|
||||
/* The preferred method on macOS (10.2 and later) to prevent SIGPIPEs when
|
||||
sending data to a dead peer (instead of relying on the 4th argument to send
|
||||
being MSG_NOSIGNAL). Possibly also existing and in use on other BSD
|
||||
systems? */
|
||||
|
|
@ -235,7 +235,7 @@ tcpkeepalive(struct Curl_easy *data,
|
|||
sockfd, SOCKERRNO);
|
||||
}
|
||||
#elif defined(TCP_KEEPALIVE)
|
||||
/* Mac OS X style */
|
||||
/* macOS style */
|
||||
optval = curlx_sltosi(data->set.tcp_keepidle);
|
||||
KEEPALIVE_FACTOR(optval);
|
||||
if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE,
|
||||
|
|
@ -695,7 +695,7 @@ static CURLcode bindlocal(struct Curl_easy *data, struct connectdata *conn,
|
|||
else {
|
||||
/*
|
||||
* provided dev was no interface (or interfaces are not supported
|
||||
* e.g. solaris) no ip address and no domain we fail here
|
||||
* e.g. Solaris) no ip address and no domain we fail here
|
||||
*/
|
||||
done = -1;
|
||||
}
|
||||
|
|
@ -844,7 +844,7 @@ static bool verifyconnect(curl_socket_t sockfd, int *error)
|
|||
if(0 != getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (void *)&err, &errSize))
|
||||
err = SOCKERRNO;
|
||||
#ifdef _WIN32_WCE
|
||||
/* Old WinCE versions do not support SO_ERROR */
|
||||
/* Old Windows CE versions do not support SO_ERROR */
|
||||
if(WSAENOPROTOOPT == err) {
|
||||
SET_SOCKERRNO(0);
|
||||
err = 0;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
/* =================================================================== */
|
||||
/* Hand crafted config file for Mac OS 9 */
|
||||
/* =================================================================== */
|
||||
/* On Mac OS X you must run configure to generate curl_config.h file */
|
||||
/* On macOS you must run configure to generate curl_config.h file */
|
||||
/* =================================================================== */
|
||||
|
||||
#ifndef OS
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* ================================================================ */
|
||||
/* lib/config-win32ce.h - Hand crafted config file for windows ce */
|
||||
/* lib/config-win32ce.h - Hand crafted config file for Windows CE */
|
||||
/* ================================================================ */
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
|
@ -279,7 +279,7 @@
|
|||
#define PACKAGE "curl"
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
/* WinCE */
|
||||
/* Windows CE */
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
#ifndef UNICODE
|
||||
|
|
|
|||
|
|
@ -571,7 +571,7 @@ curl_dbg_getaddrinfo(const char *hostname,
|
|||
|
||||
#if defined(HAVE_GETADDRINFO) && defined(USE_RESOLVE_ON_IPS)
|
||||
/*
|
||||
* Work-arounds the sin6_port is always zero bug on iOS 9.3.2 and Mac OS X
|
||||
* Work-arounds the sin6_port is always zero bug on iOS 9.3.2 and macOS
|
||||
* 10.11.5.
|
||||
*/
|
||||
void Curl_addrinfo_set_port(struct Curl_addrinfo *addrinfo, int port)
|
||||
|
|
|
|||
|
|
@ -677,7 +677,7 @@ ${SIZEOF_TIME_T_CODE}
|
|||
/* Define if you want to enable POSIX threaded DNS lookup */
|
||||
#cmakedefine USE_THREADS_POSIX 1
|
||||
|
||||
/* Define if you want to enable WIN32 threaded DNS lookup */
|
||||
/* Define if you want to enable Win32 threaded DNS lookup */
|
||||
#cmakedefine USE_THREADS_WIN32 1
|
||||
|
||||
/* if GnuTLS is enabled */
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
/* default pattern matching function
|
||||
* =================================
|
||||
* Implemented with recursive backtracking, if you want to use Curl_fnmatch,
|
||||
* please note that there is not implemented UTF/UNICODE support.
|
||||
* please note that there is not implemented UTF/Unicode support.
|
||||
*
|
||||
* Implemented features:
|
||||
* '?' notation, does not match UTF characters
|
||||
|
|
|
|||
|
|
@ -39,12 +39,12 @@ char *curlx_convert_wchar_to_UTF8(const wchar_t *str_w);
|
|||
* Macros curlx_convert_UTF8_to_tchar(), curlx_convert_tchar_to_UTF8()
|
||||
* and curlx_unicodefree() main purpose is to minimize the number of
|
||||
* preprocessor conditional directives needed by code using these
|
||||
* to differentiate UNICODE from non-UNICODE builds.
|
||||
* to differentiate Unicode from non-Unicode builds.
|
||||
*
|
||||
* In the case of a non-UNICODE build the tchar strings are char strings that
|
||||
* In the case of a non-Unicode build the tchar strings are char strings that
|
||||
* are duplicated via strdup and remain in whatever the passed in encoding is,
|
||||
* which is assumed to be UTF-8 but may be other encoding. Therefore the
|
||||
* significance of the conversion functions is primarily for UNICODE builds.
|
||||
* significance of the conversion functions is primarily for Unicode builds.
|
||||
*
|
||||
* Allocated memory should be free'd with curlx_unicodefree().
|
||||
*
|
||||
|
|
|
|||
|
|
@ -534,13 +534,13 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_hash(const char *user, size_t userlen,
|
|||
/*
|
||||
* Curl_ntlm_core_mk_ntlmv2_resp()
|
||||
*
|
||||
* This creates the NTLMv2 response as set in the ntlm type-3 message.
|
||||
* This creates the NTLMv2 response as set in the NTLM type-3 message.
|
||||
*
|
||||
* Parameters:
|
||||
*
|
||||
* ntlmv2hash [in] - The ntlmv2 hash (16 bytes)
|
||||
* ntlmv2hash [in] - The NTLMv2 hash (16 bytes)
|
||||
* challenge_client [in] - The client nonce (8 bytes)
|
||||
* ntlm [in] - The ntlm data struct being used to read TargetInfo
|
||||
* ntlm [in] - The NTLM data struct being used to read TargetInfo
|
||||
and Server challenge received in the type-2 message
|
||||
* ntresp [out] - The address where a pointer to newly allocated
|
||||
* memory holding the NTLMv2 response.
|
||||
|
|
@ -629,11 +629,11 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash,
|
|||
/*
|
||||
* Curl_ntlm_core_mk_lmv2_resp()
|
||||
*
|
||||
* This creates the LMv2 response as used in the ntlm type-3 message.
|
||||
* This creates the LMv2 response as used in the NTLM type-3 message.
|
||||
*
|
||||
* Parameters:
|
||||
*
|
||||
* ntlmv2hash [in] - The ntlmv2 hash (16 bytes)
|
||||
* ntlmv2hash [in] - The NTLMv2 hash (16 bytes)
|
||||
* challenge_client [in] - The client nonce (8 bytes)
|
||||
* challenge_client [in] - The server challenge (8 bytes)
|
||||
* lmresp [out] - The LMv2 response (24 bytes)
|
||||
|
|
@ -657,7 +657,7 @@ CURLcode Curl_ntlm_core_mk_lmv2_resp(unsigned char *ntlmv2hash,
|
|||
if(result)
|
||||
return result;
|
||||
|
||||
/* Concatenate the HMAC MD5 output with the client nonce */
|
||||
/* Concatenate the HMAC MD5 output with the client nonce */
|
||||
memcpy(lmresp, hmac_output, 16);
|
||||
memcpy(lmresp + 16, challenge_client, 8);
|
||||
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@
|
|||
|
||||
/* curl uses its own printf() function internally. It understands the GNU
|
||||
* format. Use this format, so that is matches the GNU format attribute we
|
||||
* use with the mingw compiler, allowing it to verify them at compile-time.
|
||||
* use with the MinGW compiler, allowing it to verify them at compile-time.
|
||||
*/
|
||||
#ifdef __MINGW32__
|
||||
# undef CURL_FORMAT_CURL_OFF_T
|
||||
|
|
@ -444,7 +444,7 @@
|
|||
#endif
|
||||
|
||||
/*
|
||||
* Large file (>2Gb) support using WIN32 functions.
|
||||
* Large file (>2Gb) support using Win32 functions.
|
||||
*/
|
||||
|
||||
#ifdef USE_WIN32_LARGE_FILES
|
||||
|
|
@ -467,7 +467,7 @@
|
|||
#endif
|
||||
|
||||
/*
|
||||
* Small file (<2Gb) support using WIN32 functions.
|
||||
* Small file (<2Gb) support using Win32 functions.
|
||||
*/
|
||||
|
||||
#ifdef USE_WIN32_SMALL_FILES
|
||||
|
|
@ -816,7 +816,7 @@
|
|||
|
||||
#if defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H)
|
||||
# if defined(SOCKET) || defined(USE_WINSOCK)
|
||||
# error "WinSock and lwIP TCP/IP stack definitions shall not coexist!"
|
||||
# error "Winsock and lwIP TCP/IP stack definitions shall not coexist!"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
|
@ -854,7 +854,7 @@ Therefore we specify it explicitly. https://github.com/curl/curl/pull/258
|
|||
#define FOPEN_WRITETEXT "wt"
|
||||
#define FOPEN_APPENDTEXT "at"
|
||||
#elif defined(__CYGWIN__)
|
||||
/* Cygwin has specific behavior we need to address when WIN32 is not defined.
|
||||
/* Cygwin has specific behavior we need to address when _WIN32 is not defined.
|
||||
https://cygwin.com/cygwin-ug-net/using-textbinary.html
|
||||
For write we want our output to have line endings of LF and be compatible with
|
||||
other Cygwin utilities. For read we want to handle input that may have line
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ struct dohaddr {
|
|||
#define HTTPS_RR_CODE_IPV6 0x06
|
||||
|
||||
/*
|
||||
* These may need escaping when found within an alpn string
|
||||
* These may need escaping when found within an ALPN string
|
||||
* value.
|
||||
*/
|
||||
#define COMMA_CHAR ','
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ static CURLcode file_connect(struct Curl_easy *data, bool *done)
|
|||
* A leading slash in an AmigaDOS path denotes the parent
|
||||
* directory, and hence we block this as it is relative.
|
||||
* Absolute paths start with 'volumename:', so we check for
|
||||
* this first. Failing that, we treat the path as a real unix
|
||||
* this first. Failing that, we treat the path as a real Unix
|
||||
* path, but only if the application was compiled with -lunix.
|
||||
*/
|
||||
fd = -1;
|
||||
|
|
|
|||
|
|
@ -960,7 +960,7 @@ enum resolve_t Curl_resolv_timeout(struct Curl_easy *data,
|
|||
keep_copysig = TRUE; /* yes, we have a copy */
|
||||
sigact.sa_handler = alarmfunc;
|
||||
#ifdef SA_RESTART
|
||||
/* HPUX does not have SA_RESTART but defaults to that behavior! */
|
||||
/* HP-UX does not have SA_RESTART but defaults to that behavior! */
|
||||
sigact.sa_flags &= ~SA_RESTART;
|
||||
#endif
|
||||
/* now set the new struct */
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ struct Curl_dns_entry {
|
|||
size_t refcount;
|
||||
/* hostname port number that resolved to addr. */
|
||||
int hostport;
|
||||
/* hostname that resolved to addr. may be NULL (unix domain sockets). */
|
||||
/* hostname that resolved to addr. may be NULL (Unix domain sockets). */
|
||||
char hostname[1];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ bool Curl_ipvalid(struct Curl_easy *data, struct connectdata *conn)
|
|||
* detect which one this platform supports in the configure script and set up
|
||||
* the HAVE_GETHOSTBYNAME_R_3, HAVE_GETHOSTBYNAME_R_5 or
|
||||
* HAVE_GETHOSTBYNAME_R_6 defines accordingly. Note that HAVE_GETADDRBYNAME
|
||||
* has the corresponding rules. This is primarily on *nix. Note that some unix
|
||||
* has the corresponding rules. This is primarily on *nix. Note that some Unix
|
||||
* flavours have thread-safe versions of the plain gethostbyname() etc.
|
||||
*
|
||||
*/
|
||||
|
|
@ -221,7 +221,7 @@ struct Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname,
|
|||
|
||||
if(!h) /* failure */
|
||||
#elif defined(HAVE_GETHOSTBYNAME_R_3)
|
||||
/* AIX, Digital Unix/Tru64, HPUX 10, more? */
|
||||
/* AIX, Digital UNIX/Tru64, HP-UX 10, more? */
|
||||
|
||||
/* For AIX 4.3 or later, we do not use gethostbyname_r() at all, because of
|
||||
* the plain fact that it does not return unique full buffers on each
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ struct Curl_addrinfo *Curl_getaddrinfo(struct Curl_easy *data,
|
|||
#ifndef USE_RESOLVE_ON_IPS
|
||||
/*
|
||||
* The AI_NUMERICHOST must not be set to get synthesized IPv6 address from
|
||||
* an IPv4 address on iOS and Mac OS X.
|
||||
* an IPv4 address on iOS and macOS.
|
||||
*/
|
||||
if((1 == Curl_inet_pton(AF_INET, hostname, addrbuf)) ||
|
||||
(1 == Curl_inet_pton(AF_INET6, hostname, addrbuf))) {
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ CURLcode Curl_input_ntlm(struct Curl_easy *data,
|
|||
}
|
||||
|
||||
/*
|
||||
* This is for creating ntlm header output
|
||||
* This is for creating NTLM header output
|
||||
*/
|
||||
CURLcode Curl_output_ntlm(struct Curl_easy *data, bool proxy)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@
|
|||
|
||||
#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM)
|
||||
|
||||
/* this is for ntlm header input */
|
||||
/* this is for NTLM header input */
|
||||
CURLcode Curl_input_ntlm(struct Curl_easy *data, bool proxy,
|
||||
const char *header);
|
||||
|
||||
/* this is for creating ntlm header output */
|
||||
/* this is for creating NTLM header output */
|
||||
CURLcode Curl_output_ntlm(struct Curl_easy *data, bool proxy);
|
||||
|
||||
void Curl_http_auth_cleanup_ntlm(struct connectdata *conn);
|
||||
|
|
|
|||
|
|
@ -185,8 +185,8 @@ static char *inet_ntop6(const unsigned char *src, char *dst, size_t size)
|
|||
* Returns NULL on error and errno set with the specific
|
||||
* error, EAFNOSUPPORT or ENOSPC.
|
||||
*
|
||||
* On Windows we store the error in the thread errno, not in the winsock error
|
||||
* code. This is to avoid losing the actual last winsock error. When this
|
||||
* On Windows we store the error in the thread errno, not in the Winsock error
|
||||
* code. This is to avoid losing the actual last Winsock error. When this
|
||||
* function returns NULL, check errno not SOCKERRNO.
|
||||
*/
|
||||
char *Curl_inet_ntop(int af, const void *src, char *buf, size_t size)
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ static int inet_pton6(const char *src, unsigned char *dst);
|
|||
* -1 if some other error occurred (`dst' is untouched in this case, too)
|
||||
* notice:
|
||||
* On Windows we store the error in the thread errno, not
|
||||
* in the winsock error code. This is to avoid losing the
|
||||
* actual last winsock error. When this function returns
|
||||
* in the Winsock error code. This is to avoid losing the
|
||||
* actual last Winsock error. When this function returns
|
||||
* -1, check errno not SOCKERRNO.
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ static void _ldap_free_urldesc(LDAPURLDesc *ludp);
|
|||
#endif
|
||||
|
||||
#if defined(USE_WIN32_LDAP) && defined(ldap_err2string)
|
||||
/* Use ansi error strings in UNICODE builds */
|
||||
/* Use ANSI error strings in Unicode builds */
|
||||
#undef ldap_err2string
|
||||
#define ldap_err2string ldap_err2stringA
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1416,7 +1416,7 @@ static CURLMcode multi_wait(struct Curl_multi *multi,
|
|||
#endif
|
||||
int pollrc;
|
||||
#ifdef USE_WINSOCK
|
||||
if(cpfds.n) /* just pre-check with WinSock */
|
||||
if(cpfds.n) /* just pre-check with Winsock */
|
||||
pollrc = Curl_poll(cpfds.pfds, cpfds.n, 0);
|
||||
else
|
||||
pollrc = 0;
|
||||
|
|
@ -1436,7 +1436,7 @@ static CURLMcode multi_wait(struct Curl_multi *multi,
|
|||
WSAWaitForMultipleEvents(1, &multi->wsa_event, FALSE, (DWORD)timeout_ms,
|
||||
FALSE);
|
||||
}
|
||||
/* With WinSock, we have to run the following section unconditionally
|
||||
/* With Winsock, we have to run the following section unconditionally
|
||||
to call WSAEventSelect(fd, event, 0) on all the sockets */
|
||||
{
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -155,9 +155,9 @@ struct Curl_multi {
|
|||
curl_multi_timer_callback timer_cb;
|
||||
void *timer_userp;
|
||||
struct curltime timer_lastcall; /* the fixed time for the timeout for the
|
||||
previous callback */
|
||||
previous callback */
|
||||
#ifdef USE_WINSOCK
|
||||
WSAEVENT wsa_event; /* winsock event used for waits */
|
||||
WSAEVENT wsa_event; /* Winsock event used for waits */
|
||||
#else
|
||||
#ifdef ENABLE_WAKEUP
|
||||
curl_socket_t wakeup_pair[2]; /* eventfd()/pipe()/socketpair() used for
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ int curlx_nonblock(curl_socket_t sockfd, /* operate on this */
|
|||
int nonblock /* TRUE or FALSE */)
|
||||
{
|
||||
#if defined(HAVE_FCNTL_O_NONBLOCK)
|
||||
/* most recent unix versions */
|
||||
/* most recent Unix versions */
|
||||
int flags;
|
||||
flags = sfcntl(sockfd, F_GETFL, 0);
|
||||
if(flags < 0)
|
||||
|
|
@ -65,7 +65,7 @@ int curlx_nonblock(curl_socket_t sockfd, /* operate on this */
|
|||
|
||||
#elif defined(HAVE_IOCTL_FIONBIO)
|
||||
|
||||
/* older unix versions */
|
||||
/* older Unix versions */
|
||||
int flags = nonblock ? 1 : 0;
|
||||
return ioctl(sockfd, FIONBIO, &flags);
|
||||
|
||||
|
|
|
|||
14
lib/select.c
14
lib/select.c
|
|
@ -56,7 +56,7 @@
|
|||
* Internal function used for waiting a specific amount of ms
|
||||
* in Curl_socket_check() and Curl_poll() when no file descriptor
|
||||
* is provided to wait on, just being used to delay execution.
|
||||
* WinSock select() and poll() timeout mechanisms need a valid
|
||||
* Winsock select() and poll() timeout mechanisms need a valid
|
||||
* socket descriptor in a not null file descriptor set to work.
|
||||
* Waiting indefinitely with this function is not allowed, a
|
||||
* zero or negative timeout value will return immediately.
|
||||
|
|
@ -135,7 +135,7 @@ static int our_select(curl_socket_t maxfd, /* highest socket number */
|
|||
struct timeval *ptimeout;
|
||||
|
||||
#ifdef USE_WINSOCK
|
||||
/* WinSock select() cannot handle zero events. See the comment below. */
|
||||
/* Winsock select() cannot handle zero events. See the comment below. */
|
||||
if((!fds_read || fds_read->fd_count == 0) &&
|
||||
(!fds_write || fds_write->fd_count == 0) &&
|
||||
(!fds_err || fds_err->fd_count == 0)) {
|
||||
|
|
@ -147,7 +147,7 @@ static int our_select(curl_socket_t maxfd, /* highest socket number */
|
|||
ptimeout = curlx_mstotv(&pending_tv, timeout_ms);
|
||||
|
||||
#ifdef USE_WINSOCK
|
||||
/* WinSock select() must not be called with an fd_set that contains zero
|
||||
/* Winsock select() must not be called with an fd_set that contains zero
|
||||
fd flags, or it will return WSAEINVAL. But, it also cannot be called
|
||||
with no fd_sets at all! From the documentation:
|
||||
|
||||
|
|
@ -155,8 +155,8 @@ static int our_select(curl_socket_t maxfd, /* highest socket number */
|
|||
given as null. At least one must be non-null, and any non-null
|
||||
descriptor set must contain at least one handle to a socket.
|
||||
|
||||
It is unclear why WinSock does not just handle this for us instead of
|
||||
calling this an error. Luckily, with WinSock, we can _also_ ask how
|
||||
It is unclear why Winsock does not just handle this for us instead of
|
||||
calling this an error. Luckily, with Winsock, we can _also_ ask how
|
||||
many bits are set on an fd_set. So, let's just check it beforehand.
|
||||
*/
|
||||
return select((int)maxfd + 1,
|
||||
|
|
@ -361,8 +361,8 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, timediff_t timeout_ms)
|
|||
}
|
||||
|
||||
/*
|
||||
Note also that WinSock ignores the first argument, so we do not worry
|
||||
about the fact that maxfd is computed incorrectly with WinSock (since
|
||||
Note also that Winsock ignores the first argument, so we do not worry
|
||||
about the fact that maxfd is computed incorrectly with Winsock (since
|
||||
curl_socket_t is unsigned in such cases and thus -1 is the largest
|
||||
value).
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2165,7 +2165,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
|||
*/
|
||||
#ifdef USE_SSL
|
||||
if(Curl_ssl_supports(data, SSLSUPP_CA_PATH))
|
||||
/* This does not work on windows. */
|
||||
/* This does not work on Windows. */
|
||||
result = Curl_setstropt(&data->set.str[STRING_SSL_CAPATH],
|
||||
va_arg(param, char *));
|
||||
else
|
||||
|
|
@ -2180,7 +2180,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
|||
*/
|
||||
#ifdef USE_SSL
|
||||
if(Curl_ssl_supports(data, SSLSUPP_CA_PATH))
|
||||
/* This does not work on windows. */
|
||||
/* This does not work on Windows. */
|
||||
result = Curl_setstropt(&data->set.str[STRING_SSL_CAPATH_PROXY],
|
||||
va_arg(param, char *));
|
||||
else
|
||||
|
|
|
|||
|
|
@ -62,11 +62,11 @@
|
|||
#endif
|
||||
|
||||
/*
|
||||
* Include header files for windows builds before redefining anything.
|
||||
* Include header files for Windows builds before redefining anything.
|
||||
* Use this preprocessor block only to include or exclude windows.h,
|
||||
* winsock2.h or ws2tcpip.h. Any other windows thing belongs
|
||||
* winsock2.h or ws2tcpip.h. Any other Windows thing belongs
|
||||
* to any other further and independent block. Under Cygwin things work
|
||||
* just as under linux (e.g. <sys/socket.h>) and the winsock headers should
|
||||
* just as under Linux (e.g. <sys/socket.h>) and the Winsock headers should
|
||||
* never be included when __CYGWIN__ is defined.
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -924,7 +924,7 @@ static CURLcode smb_connection_state(struct Curl_easy *data, bool *done)
|
|||
|
||||
/*
|
||||
* Convert a timestamp from the Windows world (100 nsec units from 1 Jan 1601)
|
||||
* to Posix time. Cap the output to fit within a time_t.
|
||||
* to POSIX time. Cap the output to fit within a time_t.
|
||||
*/
|
||||
static void get_posix_time(time_t *out, curl_off_t timestamp)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ int Curl_pipe(curl_socket_t socks[2], bool nonblocking);
|
|||
#elif !defined(HAVE_SOCKETPAIR)
|
||||
#define SOCKETPAIR_FAMILY 0 /* not used */
|
||||
#else
|
||||
#error "unsupported unix domain and socketpair build combo"
|
||||
#error "unsupported Unix domain and socketpair build combo"
|
||||
#endif
|
||||
|
||||
#ifdef SOCK_CLOEXEC
|
||||
|
|
|
|||
|
|
@ -49,14 +49,14 @@ FREEADDRINFOEXW_FN Curl_FreeAddrInfoExW = NULL;
|
|||
GETADDRINFOEXCANCEL_FN Curl_GetAddrInfoExCancel = NULL;
|
||||
GETADDRINFOEXW_FN Curl_GetAddrInfoExW = NULL;
|
||||
|
||||
/* Curl_win32_init() performs win32 global initialization */
|
||||
/* Curl_win32_init() performs Win32 global initialization */
|
||||
CURLcode Curl_win32_init(long flags)
|
||||
{
|
||||
#ifdef USE_WINSOCK
|
||||
HMODULE ws2_32Dll;
|
||||
#endif
|
||||
/* CURL_GLOBAL_WIN32 controls the *optional* part of the initialization which
|
||||
is just for Winsock at the moment. Any required win32 initialization
|
||||
is just for Winsock at the moment. Any required Win32 initialization
|
||||
should take place after this block. */
|
||||
if(flags & CURL_GLOBAL_WIN32) {
|
||||
#ifdef USE_WINSOCK
|
||||
|
|
|
|||
|
|
@ -1342,7 +1342,7 @@ static CURLcode telnet_do(struct Curl_easy *data, bool *done)
|
|||
|
||||
#ifdef USE_WINSOCK
|
||||
/* We want to wait for both stdin and the socket. Since
|
||||
** the select() function in winsock only works on sockets
|
||||
** the select() function in Winsock only works on sockets
|
||||
** we have to use the WaitForMultipleObjects() call.
|
||||
*/
|
||||
|
||||
|
|
@ -1353,7 +1353,7 @@ static CURLcode telnet_do(struct Curl_easy *data, bool *done)
|
|||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
|
||||
/* Tell winsock what events we want to listen to */
|
||||
/* Tell Winsock what events we want to listen to */
|
||||
if(WSAEventSelect(sockfd, event_handle, FD_READ|FD_CLOSE) == SOCKET_ERROR) {
|
||||
WSACloseEvent(event_handle);
|
||||
return CURLE_OK;
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ struct curltime Curl_now(void)
|
|||
struct curltime Curl_now(void)
|
||||
{
|
||||
/*
|
||||
** Monotonic timer on Mac OS is provided by mach_absolute_time(), which
|
||||
** Monotonic timer on macOS is provided by mach_absolute_time(), which
|
||||
** returns time in Mach "absolute time units," which are platform-dependent.
|
||||
** To convert to nanoseconds, one must use conversion factors specified by
|
||||
** mach_timebase_info().
|
||||
|
|
|
|||
|
|
@ -2339,7 +2339,7 @@ static CURLcode parse_proxy_auth(struct Curl_easy *data,
|
|||
return result;
|
||||
}
|
||||
|
||||
/* create_conn helper to parse and init proxy values. to be called after unix
|
||||
/* create_conn helper to parse and init proxy values. to be called after Unix
|
||||
socket init but before any proxy vars are evaluated. */
|
||||
static CURLcode create_conn_helper_init_proxy(struct Curl_easy *data,
|
||||
struct connectdata *conn)
|
||||
|
|
@ -2406,7 +2406,7 @@ static CURLcode create_conn_helper_init_proxy(struct Curl_easy *data,
|
|||
Curl_safefree(no_proxy);
|
||||
|
||||
#ifdef USE_UNIX_SOCKETS
|
||||
/* For the time being do not mix proxy and unix domain sockets. See #1274 */
|
||||
/* For the time being do not mix proxy and Unix domain sockets. See #1274 */
|
||||
if(proxy && conn->unix_domain_socket) {
|
||||
free(proxy);
|
||||
proxy = NULL;
|
||||
|
|
@ -3338,7 +3338,7 @@ static CURLcode create_conn(struct Curl_easy *data,
|
|||
}
|
||||
#endif
|
||||
|
||||
/* After the unix socket init but before the proxy vars are used, parse and
|
||||
/* After the Unix socket init but before the proxy vars are used, parse and
|
||||
initialize the proxy vars */
|
||||
#ifndef CURL_DISABLE_PROXY
|
||||
result = create_conn_helper_init_proxy(data, conn);
|
||||
|
|
|
|||
|
|
@ -41,13 +41,13 @@
|
|||
#include "curl_memory.h"
|
||||
#include "memdebug.h"
|
||||
|
||||
/* MSDOS/Windows style drive prefix, eg c: in c:foo */
|
||||
/* MS-DOS/Windows style drive prefix, eg c: in c:foo */
|
||||
#define STARTS_WITH_DRIVE_PREFIX(str) \
|
||||
((('a' <= str[0] && str[0] <= 'z') || \
|
||||
('A' <= str[0] && str[0] <= 'Z')) && \
|
||||
(str[1] == ':'))
|
||||
|
||||
/* MSDOS/Windows style drive prefix, optionally with
|
||||
/* MS-DOS/Windows style drive prefix, optionally with
|
||||
* a '|' instead of ':', followed by a slash or NUL */
|
||||
#define STARTS_WITH_URL_DRIVE_PREFIX(str) \
|
||||
((('a' <= (str)[0] && (str)[0] <= 'z') || \
|
||||
|
|
@ -1121,7 +1121,7 @@ static CURLUcode parseurl(const char *url, CURLU *u, unsigned int flags)
|
|||
* This catches both "file:/c:" and "file:c:" */
|
||||
if(('/' == path[0] && STARTS_WITH_URL_DRIVE_PREFIX(&path[1])) ||
|
||||
STARTS_WITH_URL_DRIVE_PREFIX(path)) {
|
||||
/* File drive letters are only accepted in MSDOS/Windows */
|
||||
/* File drive letters are only accepted in MS-DOS/Windows */
|
||||
result = CURLUE_BAD_FILE_URL;
|
||||
goto fail;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ struct ssl_peer {
|
|||
};
|
||||
|
||||
struct ssl_primary_config {
|
||||
char *CApath; /* certificate dir (does not work on windows) */
|
||||
char *CApath; /* certificate dir (does not work on Windows) */
|
||||
char *CAfile; /* certificate to verify peer against */
|
||||
char *issuercert; /* optional issuer certificate filename */
|
||||
char *clientcert;
|
||||
|
|
@ -442,7 +442,7 @@ struct ntlmdata {
|
|||
unsigned int flags;
|
||||
unsigned char nonce[8];
|
||||
unsigned int target_info_len;
|
||||
void *target_info; /* TargetInfo received in the ntlm type-2 message */
|
||||
void *target_info; /* TargetInfo received in the NTLM type-2 message */
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
|
@ -1422,7 +1422,7 @@ enum dupstring {
|
|||
STRING_KEY, /* private key filename */
|
||||
STRING_KEY_PASSWD, /* plain text private key password */
|
||||
STRING_KEY_TYPE, /* format for private key (default: PEM) */
|
||||
STRING_SSL_CAPATH, /* CA directory name (does not work on windows) */
|
||||
STRING_SSL_CAPATH, /* CA directory name (does not work on Windows) */
|
||||
STRING_SSL_CAFILE, /* certificate file to verify peer against */
|
||||
STRING_SSL_PINNEDPUBLICKEY, /* public key file to verify peer against */
|
||||
STRING_SSL_CIPHER_LIST, /* list of ciphers to use */
|
||||
|
|
@ -1436,7 +1436,7 @@ enum dupstring {
|
|||
STRING_KEY_PROXY, /* private key filename */
|
||||
STRING_KEY_PASSWD_PROXY, /* plain text private key password */
|
||||
STRING_KEY_TYPE_PROXY, /* format for private key (default: PEM) */
|
||||
STRING_SSL_CAPATH_PROXY, /* CA directory name (does not work on windows) */
|
||||
STRING_SSL_CAPATH_PROXY, /* CA directory name (does not work on Windows) */
|
||||
STRING_SSL_CAFILE_PROXY, /* certificate file to verify peer against */
|
||||
STRING_SSL_PINNEDPUBLICKEY_PROXY, /* public key file to verify proxy */
|
||||
STRING_SSL_CIPHER_LIST_PROXY, /* list of ciphers to use */
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ struct OUR_OSVERSIONINFOEXW {
|
|||
/*
|
||||
* curlx_verify_windows_version()
|
||||
*
|
||||
* This is used to verify if we are running on a specific windows version.
|
||||
* This is used to verify if we are running on a specific Windows version.
|
||||
*
|
||||
* Parameters:
|
||||
*
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ typedef enum {
|
|||
PLATFORM_WINNT
|
||||
} PlatformIdentifier;
|
||||
|
||||
/* This is used to verify if we are running on a specific windows version */
|
||||
/* This is used to verify if we are running on a specific Windows version */
|
||||
bool curlx_verify_windows_version(const unsigned int majorVersion,
|
||||
const unsigned int minorVersion,
|
||||
const unsigned int buildVersion,
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* WIP, experimental: use recvmmsg() on linux
|
||||
/* WIP, experimental: use recvmmsg() on Linux
|
||||
* we have no configure check, yet
|
||||
* and also it is only available for _GNU_SOURCE, which
|
||||
* we do not use otherwise.
|
||||
|
|
@ -720,7 +720,7 @@ CURLcode Curl_conn_may_http3(struct Curl_easy *data,
|
|||
const struct connectdata *conn)
|
||||
{
|
||||
if(conn->transport == TRNSPRT_UNIX) {
|
||||
/* cannot do QUIC over a unix domain socket */
|
||||
/* cannot do QUIC over a Unix domain socket */
|
||||
return CURLE_QUIC_CONNECT_ERROR;
|
||||
}
|
||||
if(!(conn->handler->flags & PROTOPT_SSL)) {
|
||||
|
|
|
|||
|
|
@ -1786,7 +1786,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
}
|
||||
#if SIZEOF_TIME_T > SIZEOF_LONG
|
||||
if(date > 0xffffffff) {
|
||||
/* if 'long' cannot old >32bit, this date cannot be sent */
|
||||
/* if 'long' cannot old >32-bit, this date cannot be sent */
|
||||
failf(data, "date overflow");
|
||||
fail = TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1083,7 +1083,7 @@ schannel_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data)
|
|||
|
||||
#ifdef HAS_ALPN
|
||||
/* ALPN is only supported on Windows 8.1 / Server 2012 R2 and above.
|
||||
Also it does not seem to be supported for Wine, see curl bug #983. */
|
||||
Also it does not seem to be supported for WINE, see curl bug #983. */
|
||||
backend->use_alpn = connssl->alpn &&
|
||||
!GetProcAddress(GetModuleHandle(TEXT("ntdll")),
|
||||
"wine_get_version") &&
|
||||
|
|
@ -1099,7 +1099,7 @@ schannel_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data)
|
|||
* do it following a more manual process. */
|
||||
backend->use_manual_cred_validation = true;
|
||||
#else
|
||||
#error "compiler too old to support requisite manual cert verify for Win CE"
|
||||
#error "compiler too old to support Windows CE requisite manual cert verify"
|
||||
#endif
|
||||
#else
|
||||
#ifdef HAS_MANUAL_VERIFY_API
|
||||
|
|
@ -1242,7 +1242,7 @@ schannel_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data)
|
|||
https://msdn.microsoft.com/en-us/library/windows/desktop/aa375924.aspx
|
||||
|
||||
At the moment we do not pass inbuf unless we are using ALPN since we only
|
||||
use it for that, and Wine (for which we currently disable ALPN) is giving
|
||||
use it for that, and WINE (for which we currently disable ALPN) is giving
|
||||
us problems with inbuf regardless. https://github.com/curl/curl/issues/983
|
||||
*/
|
||||
sspi_status = s_pSecFn->InitializeSecurityContext(
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ static int is_cr_or_lf(char c)
|
|||
|
||||
/* Search the substring needle,needlelen into string haystack,haystacklen
|
||||
* Strings do not need to be terminated by a '\0'.
|
||||
* Similar of OSX/Linux memmem (not available on Visual Studio).
|
||||
* Similar of macOS/Linux memmem (not available on Visual Studio).
|
||||
* Return position of beginning of first occurrence or NULL if not found
|
||||
*/
|
||||
static const char *c_memmem(const void *haystack, size_t haystacklen,
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ static const uint16_t default_ciphers[] = {
|
|||
#define SECTRANSP_PINNEDPUBKEY_V1 1
|
||||
#endif
|
||||
|
||||
/* version 2 supports MacOSX 10.7+ */
|
||||
/* version 2 supports macOS 10.7+ */
|
||||
#if (!TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
|
||||
#define SECTRANSP_PINNEDPUBKEY_V2 1
|
||||
#endif
|
||||
|
|
@ -592,7 +592,7 @@ static OSStatus CopyIdentityFromPKCS12File(const char *cPath,
|
|||
cPassword, kCFStringEncodingUTF8) : NULL;
|
||||
CFDataRef pkcs_data = NULL;
|
||||
|
||||
/* We can import P12 files on iOS or OS X 10.7 or later: */
|
||||
/* We can import P12 files on iOS or macOS 10.7 or later: */
|
||||
/* These constants are documented as having first appeared in 10.6 but they
|
||||
raise linker errors when used on that cat for some reason. */
|
||||
#if CURL_BUILD_MAC_10_7 || CURL_BUILD_IOS
|
||||
|
|
@ -928,7 +928,7 @@ static SSLCipherSuite * sectransp_get_supported_ciphers(SSLContextRef ssl_ctx,
|
|||
/* There is a known bug in early versions of Mountain Lion where ST's ECC
|
||||
ciphers (cipher suite 0xC001 through 0xC032) simply do not work.
|
||||
Work around the problem here by disabling those ciphers if we are
|
||||
running in an affected version of OS X. */
|
||||
running in an affected version of macOS. */
|
||||
if(maj == 12 && min <= 3) {
|
||||
size_t i = 0, j = 0;
|
||||
for(; i < *len; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue