mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
lib: rename internal header share.h to curl_share.h to avoid collision
Windows CRTs have a `share.h`. Before this patch when trying to
`#include <share.h>` it, the compiler picked up curl's internal
`lib/share.h` instead. Rename it to avoid this issue.
CRT `share.h` has constants necessary for using safe open CRT functions.
Also rename `lib/share.c` to keep matching the header.
Ref: https://learn.microsoft.com/cpp/c-runtime-library/sharing-constants
Ref: 625f2c1644 #16949 #16991
Cherry-picked from #19643
Closes #19676
This commit is contained in:
parent
56f2479c14
commit
3887069c66
@ -172,6 +172,7 @@ LIB_CFILES = \
|
||||
curl_rtmp.c \
|
||||
curl_sasl.c \
|
||||
curl_sha512_256.c \
|
||||
curl_share.c \
|
||||
curl_sspi.c \
|
||||
curl_threads.c \
|
||||
curl_trc.c \
|
||||
@ -242,7 +243,6 @@ LIB_CFILES = \
|
||||
sendf.c \
|
||||
setopt.c \
|
||||
sha256.c \
|
||||
share.c \
|
||||
slist.c \
|
||||
smb.c \
|
||||
smtp.c \
|
||||
@ -311,6 +311,7 @@ LIB_HFILES = \
|
||||
curl_setup_once.h \
|
||||
curl_sha256.h \
|
||||
curl_sha512_256.h \
|
||||
curl_share.h \
|
||||
curl_sspi.h \
|
||||
curl_threads.h \
|
||||
curl_trc.h \
|
||||
@ -376,7 +377,6 @@ LIB_HFILES = \
|
||||
setup-os400.h \
|
||||
setup-vms.h \
|
||||
setup-win32.h \
|
||||
share.h \
|
||||
sigpipe.h \
|
||||
slist.h \
|
||||
smb.h \
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
#include "sendf.h"
|
||||
#include "hostip.h"
|
||||
#include "hash.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "url.h"
|
||||
#include "multiif.h"
|
||||
#include "curlx/inet_pton.h"
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
#include "hash.h"
|
||||
#include "multiif.h"
|
||||
#include "select.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "url.h"
|
||||
#include "curl_memory.h"
|
||||
/* The last #include file should be: */
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
#include "sendf.h"
|
||||
#include "hostip.h"
|
||||
#include "hash.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "url.h"
|
||||
#include "multiif.h"
|
||||
#include "curl_threads.h"
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
#include "conncache.h"
|
||||
#include "multihandle.h"
|
||||
#include "rand.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "strdup.h"
|
||||
#include "system_win32.h"
|
||||
#include "curlx/version_win32.h"
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
#include "conncache.h"
|
||||
#include "http_negotiate.h"
|
||||
#include "http_ntlm.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "sigpipe.h"
|
||||
#include "connect.h"
|
||||
#include "select.h"
|
||||
|
||||
@ -72,7 +72,7 @@
|
||||
#include "curlx/warnless.h"
|
||||
#include "conncache.h"
|
||||
#include "multihandle.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "http_proxy.h"
|
||||
#include "socks.h"
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
#include "psl.h"
|
||||
#include "sendf.h"
|
||||
#include "slist.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "strcase.h"
|
||||
#include "curl_fopen.h"
|
||||
#include "curl_get_line.h"
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
#include <curl/curl.h>
|
||||
#include "urldata.h"
|
||||
#include "connect.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "psl.h"
|
||||
#include "vtls/vtls.h"
|
||||
#include "vtls/vtls_scache.h"
|
||||
@ -33,7 +33,7 @@
|
||||
#include "sendf.h"
|
||||
#include "multiif.h"
|
||||
#include "url.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "curlx/base64.h"
|
||||
#include "connect.h"
|
||||
#include "strdup.h"
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
#include "url.h"
|
||||
#include "getinfo.h"
|
||||
#include "hostip.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "strdup.h"
|
||||
#include "progress.h"
|
||||
#include "easyif.h"
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
#include "hostip.h"
|
||||
#include "hash.h"
|
||||
#include "rand.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "url.h"
|
||||
#include "curlx/inet_ntop.h"
|
||||
#include "curlx/inet_pton.h"
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
#include "sendf.h"
|
||||
#include "hostip.h"
|
||||
#include "hash.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "url.h"
|
||||
|
||||
/* The last 2 #include files should be in this order */
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
#include "sendf.h"
|
||||
#include "hostip.h"
|
||||
#include "hash.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "url.h"
|
||||
#include "curlx/inet_pton.h"
|
||||
#include "connect.h"
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
#include "sendf.h"
|
||||
#include "parsedate.h"
|
||||
#include "rename.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "strdup.h"
|
||||
#include "curlx/strparse.h"
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
#include "http_aws_sigv4.h"
|
||||
#include "url.h"
|
||||
#include "urlapi-int.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "hostip.h"
|
||||
#include "dynhds.h"
|
||||
#include "http.h"
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
#include "connect.h"
|
||||
#include "progress.h"
|
||||
#include "easyif.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "psl.h"
|
||||
#include "multiif.h"
|
||||
#include "multi_ev.h"
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
#ifdef USE_LIBPSL
|
||||
|
||||
#include "psl.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
|
||||
/* The last 2 #include files should be in this order */
|
||||
#include "curl_memory.h"
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
#include "progress.h"
|
||||
#include "content_encoding.h"
|
||||
#include "strcase.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "vtls/vtls.h"
|
||||
#include "curlx/warnless.h"
|
||||
#include "sendf.h"
|
||||
|
||||
@ -81,7 +81,7 @@
|
||||
#include "cookie.h"
|
||||
#include "strcase.h"
|
||||
#include "escape.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
#include "content_encoding.h"
|
||||
#include "http_digest.h"
|
||||
#include "http_negotiate.h"
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
#include "../strcase.h"
|
||||
#include "../url.h"
|
||||
#include "../progress.h"
|
||||
#include "../share.h"
|
||||
#include "../curl_share.h"
|
||||
#include "../multiif.h"
|
||||
#include "../curlx/fopen.h"
|
||||
#include "../curlx/timeval.h"
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
#include "../strcase.h"
|
||||
#include "../url.h"
|
||||
#include "../llist.h"
|
||||
#include "../share.h"
|
||||
#include "../curl_share.h"
|
||||
#include "../curl_trc.h"
|
||||
#include "../curl_sha256.h"
|
||||
#include "../rand.h"
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "urldata.h"
|
||||
#include "connect.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
|
||||
#include "memdebug.h" /* LAST include file */
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "urldata.h"
|
||||
#include "connect.h"
|
||||
#include "share.h"
|
||||
#include "curl_share.h"
|
||||
|
||||
#include "memdebug.h" /* LAST include file */
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user