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:
Viktor Szakats 2025-11-21 20:36:26 +01:00
parent 56f2479c14
commit 3887069c66
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
25 changed files with 25 additions and 25 deletions

View file

@ -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"