curl-curl/tests/server
Viktor Szakats 1e7d0bafc6
curlx/fopen: replace open CRT functions their with _s counterparts (Windows)
- `_wopen`        -> `_wsopen_s`
- `_open`, `open` -> `_sopen_s`
- `_wfopen`       -> `_wfopen_s`
- `fopen`         -> `fopen_s`
- `_wfreopen`     -> `_wfreopen_s`
- `freopen`       -> `freopen_s`

For better error handling and for using the CRT functions recommended
via warnings suppressed by `_CRT_SECURE_NO_WARNINGS`.

Also:
- add missing `freopen_s()` prototype when building with mingw-w64 <5.
  a5d824654c/
- tests/server: replace `open()` in the signal handler with `_sopen_s()`
  on Windows.
- tests/server: reduce scope of a checksrc exception to a single line.
- checksrc: ban replaced functions.

Refs:
https://learn.microsoft.com/cpp/c-runtime-library/reference/open-wopen
https://learn.microsoft.com/cpp/c-runtime-library/reference/sopen-s-wsopen-s
https://learn.microsoft.com/cpp/c-runtime-library/reference/freopen-wfreopen
https://learn.microsoft.com/cpp/c-runtime-library/reference/fopen-wfopen
https://learn.microsoft.com/cpp/c-runtime-library/reference/fopen-s-wfopen-s
https://learn.microsoft.com/cpp/c-runtime-library/reference/freopen-s-wfreopen-s

Closes #19643
2025-11-25 03:44:22 +01:00
..
.checksrc curlx/fopen: replace open CRT functions their with _s counterparts (Windows) 2025-11-25 03:44:22 +01: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 tests/server: use curlx file open/close functions 2025-11-25 01:46:06 +01:00
first.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
first.h badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
getpart.c badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
Makefile.am build: tidy up compiler definition for tests 2025-07-28 12:43:01 +02:00
Makefile.inc tests/server: drop pointless memory allocation overrides 2025-10-08 12:53:49 +02:00
mqttd.c tests/server: use curlx file open/close functions 2025-11-25 01:46:06 +01:00
resolve.c badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
rtspd.c tests/server: use curlx file open/close functions 2025-11-25 01:46:06 +01:00
sockfilt.c badwords: add more contractions, fix fallouts 2025-11-17 19:29:15 +01:00
socksd.c tests/server: use curlx file open/close functions 2025-11-25 01:46:06 +01:00
sws.c tests/server: use curlx file open/close functions 2025-11-25 01:46:06 +01:00
tftpd.c tests/server: use curlx file open/close functions 2025-11-25 01:46:06 +01:00
util.c curlx/fopen: replace open CRT functions their with _s counterparts (Windows) 2025-11-25 03:44:22 +01:00