curl-curl/lib/curlx
Viktor Szakats 20142f5d06
build: avoid overriding system symbols for fopen functions
By introducing wrappers for them in the curlx namespace:
`curlx_fopen()`, `curlx_fdopen()`, `curlx_fclose()`.

The undefine/redefine/`(function)()` methods broke on systems
implementing these functions as macros. E.g. AIX 32-bit's `fopen()`.

Also:
- rename `lib/fopen.*` to `lib/curl_fopen.*` (for `Curl_fopen()`)
  to make room for the newly added `curlx/fopen.h`.
- curlx: move file-related functions from `multibyte.c` to `fopen.c`.
- tests/server: stop using the curl-specific `fopen()` implementation
  on Windows. Unicode isn't used by runtests, and it isn't critical to
  run tests on longs path. It can be re-enabled if this becomes
  necessary, or if the wrapper receives a feature that's critical for
  test servers.

Reported-by: Andrew Kirillov
Bug: https://github.com/curl/curl/issues/18510#issuecomment-3274393640

Follow-up to bf7375ecc5 #18503
Follow-up to 9863599d69 #18502
Follow-up to 3bb5e58c10 #17827

Closes #18634
2025-09-30 01:10:36 +02:00
..
.checksrc checksrc: reduce exceptions, apply again to curlx 2025-06-27 17:33:35 +02:00
base64.c base64: accept zero length argument to base64_encode 2025-09-19 22:57:20 +02:00
base64.h mime: reuse the base64 string from the base64 code 2025-05-10 23:01:14 +02:00
binmode.h lib: make CURLX_SET_BINMODE() and use it 2025-06-19 15:57:37 +02:00
curlx.h build: avoid overriding system symbols for fopen functions 2025-09-30 01:10:36 +02:00
dynbuf.c dynbuf: assert on curlx_dyn_addf use with just "%s" 2025-08-06 08:32:07 +02:00
dynbuf.h curl_setup: use SIZE_MAX instead of SIZE_T_MAX 2025-08-29 09:45:06 +02:00
fopen.c build: avoid overriding system symbols for fopen functions 2025-09-30 01:10:36 +02:00
fopen.h build: avoid overriding system symbols for fopen functions 2025-09-30 01:10:36 +02:00
inet_ntop.c GHA/checksrc: expand spellcheck, fix issues found 2025-07-21 16:09:01 +02:00
inet_ntop.h inet_pton, inet_ntop: drop declarations when unused 2025-07-28 01:51:55 +02:00
inet_pton.c curlx: move curlx_inet_pton 2025-05-09 13:45:24 +02:00
inet_pton.h inet_pton, inet_ntop: drop declarations when unused 2025-07-28 01:51:55 +02:00
multibyte.c build: avoid overriding system symbols for fopen functions 2025-09-30 01:10:36 +02:00
multibyte.h tidy-up: more whitespace/indent, comments 2025-07-25 11:47:51 +02:00
nonblock.c tidy-up: prefer ifdef/ifndef for single checks 2025-07-27 22:35:17 +02:00
nonblock.h curlx: move nonblock.[ch] into curlx/ 2025-05-08 13:22:02 +02:00
strparse.c curl_setup: use SIZE_MAX instead of SIZE_T_MAX 2025-08-29 09:45:06 +02:00
strparse.h tidy-up: whitespace 2025-07-11 13:32:54 +02:00
timediff.c
timediff.h
timeval.c tidy-up: move literal to the right side of comparisons 2025-07-27 22:35:17 +02:00
timeval.h
version_win32.c tidy-up: miscellaneous 2025-09-27 12:59:07 +02:00
version_win32.h curlx: move version_win32.[ch] to curlx/ 2025-05-08 17:09:32 +02:00
wait.c tidy-up: prefer ifdef/ifndef for single checks 2025-07-27 22:35:17 +02:00
wait.h lib: make curlx_wait_ms() and use it 2025-06-19 15:57:37 +02:00
warnless.c curl_setup: use SIZE_MAX instead of SIZE_T_MAX 2025-08-29 09:45:06 +02:00
warnless.h warnless: drop parts of the read/write preprocessor hack (Windows) 2025-06-19 17:09:43 +02:00
winapi.c windows: fix to preserve error code in curlx_winapi_strerror() 2025-05-09 15:56:07 +02:00
winapi.h curlx: add curlx_winapi_ functions 2025-05-09 10:45:36 +02:00