curl/lib/curlx
Viktor Szakats 969351bb1e
windows: fix CreateFile() calls to support long filenames
It makes them work in Schannel's CA bundle loader, and curl tool's
set/get file timestamp operations (e.g. in `-R`/`--remote-time`). Also
to match file open operations, that already support long filenames.

E.g. when using `--remote-time`, fixing:
```
Warning: Failed to set filetime 1741363917 on outfile: CreateFile failed:
Warning: GetLastError 0x00000003
```

The special long filename logic is necessary to support Windows releases
prior to Windows 10 v1607. With the latter, it's possible to opt-in to
this behavior via a manifest setting. Note that Windows itself also needs
to opt-in to support this. Finally note that curl itself needs passing
`--globoff` to let long filenames through, pending #20044 and #20046.

Refs:
https://learn.microsoft.com/windows/win32/api/fileapi/nf-fileapi-createfilea
https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation

Ref: #8361
Inspired by: #19286
Inspired-by: Mathesh V
Closes #19286
Closes #20040
2025-12-20 14:16:42 +01:00
..
base64.c build: drop duplicate include curl/curl.h and others 2025-12-19 10:58:11 +01:00
base64.h curlx_base64_encode: use uint8_t* for input 2025-11-27 14:35:01 +01:00
binmode.h lib: make CURLX_SET_BINMODE() and use it 2025-06-19 15:57:37 +02:00
curlx.h curlx: limit use of system allocators to the minimum possible 2025-12-05 15:32:59 +01:00
dynbuf.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
dynbuf.h build: drop duplicate include curl/curl.h and others 2025-12-19 10:58:11 +01:00
fopen.c windows: fix CreateFile() calls to support long filenames 2025-12-20 14:16:42 +01:00
fopen.h windows: fix CreateFile() calls to support long filenames 2025-12-20 14:16:42 +01:00
inet_ntop.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
inet_ntop.h lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
inet_pton.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
inet_pton.h lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
multibyte.c curlx: limit use of system allocators to the minimum possible 2025-12-05 15:32:59 +01:00
multibyte.h tidy-up: avoid (()), clang-format fixes and more 2025-12-05 16:07:03 +01:00
nonblock.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
nonblock.h build: drop duplicate include curl/curl.h and others 2025-12-19 10:58:11 +01:00
snprintf.h curlx: replace sprintf with snprintf 2025-11-25 11:11:06 +01:00
strerr.c build: drop duplicate include curl/curl.h and others 2025-12-19 10:58:11 +01:00
strerr.h curlx: move Curl_strerror, use in src and tests, ban strerror globally 2025-10-06 09:44:23 +02:00
strparse.c build: drop duplicate include curl/curl.h and others 2025-12-19 10:58:11 +01:00
strparse.h tidy-up: avoid (()), clang-format fixes and more 2025-12-05 16:07:03 +01:00
timediff.c build: drop duplicate include curl/curl.h and others 2025-12-19 10:58:11 +01:00
timediff.h curlx: move into to curlx/ 2025-05-07 11:01:15 +02:00
timeval.c build: drop duplicate include curl/curl.h and others 2025-12-19 10:58:11 +01:00
timeval.h time-keeping: keep timestamp in multi, always update 2025-12-18 22:10:06 +01:00
version_win32.c build: drop duplicate include curl/curl.h and others 2025-12-19 10:58:11 +01:00
version_win32.h curlx: move version_win32.[ch] to curlx/ 2025-05-08 17:09:32 +02:00
wait.c build: drop duplicate include curl/curl.h and others 2025-12-19 10:58:11 +01:00
wait.h lib: make curlx_wait_ms() and use it 2025-06-19 15:57:37 +02:00
warnless.c build: drop duplicate include curl/curl.h and others 2025-12-19 10:58:11 +01:00
warnless.h build: drop duplicate include curl/curl.h and others 2025-12-19 10:58:11 +01:00
winapi.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
winapi.h windows: use native error code types more 2025-10-06 12:12:44 +02:00