curl-curl/tests/server
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 build: avoid overriding system symbols for fopen functions 2025-09-30 01:10:36 +02:00
.gitignore tests: always make bundles, adapt build and tests 2025-06-14 21:08:23 +02:00
CMakeLists.txt build: tidy up compiler definition for tests 2025-07-28 12:43:01 +02:00
dnsd.c hostip: cache negative name resolves 2025-08-05 08:05:31 +02:00
first.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
first.h build: tidy up compiler definition for tests 2025-07-28 12:43:01 +02:00
getpart.c GHA/checksrc: expand spellcheck, fix issues found 2025-07-21 16:09:01 +02:00
Makefile.am build: tidy up compiler definition for tests 2025-07-28 12:43:01 +02:00
Makefile.inc build: avoid overriding system symbols for fopen functions 2025-09-30 01:10:36 +02:00
memptr.c windows: drop redundant curl_wcsdup_callback callback 2025-07-08 13:33:38 +02:00
mqttd.c tidy-up: prefer ifdef/ifndef for single checks 2025-07-27 22:35:17 +02:00
resolve.c tidy-up: prefer ifdef/ifndef for single checks 2025-07-27 22:35:17 +02:00
rtspd.c build: disable TCP_NODELAY for emscripten 2025-08-05 00:34:24 +02:00
sockfilt.c tidy-up: update MS links, allow long URLs via checksrc 2025-09-20 11:49:23 +02:00
socksd.c tidy-up: prefer ifdef/ifndef for single checks 2025-07-27 22:35:17 +02:00
sws.c sws: fix checking sscanf() return value 2025-09-16 13:34:51 +02:00
tftpd.c tidy-up: prefer ifdef/ifndef for single checks 2025-07-27 22:35:17 +02:00
util.c tests/server: drop unsafe open() override in signal handler (Windows) 2025-09-30 01:10:35 +02:00