curl/tests
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.
  https://sourceforge.net/p/mingw-w64/mingw-w64/ci/a5d824654cdc57f6eac1bb581b078986f3eb6856/
- 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
..
certs badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
cmake lib: stop overriding system printf symbols 2025-10-06 20:57:59 +02:00
data ratelimit: redesign 2025-11-24 23:34:05 +01:00
http ratelimit: redesign 2025-11-24 23:34:05 +01:00
libtest build: add build-level CURL_DISABLE_TYPECHECK options 2025-11-21 13:48:35 +01:00
server curlx/fopen: replace open CRT functions their with _s counterparts (Windows) 2025-11-25 03:44:22 +01:00
tunit tool_getparam: verify that a file exists for some options 2025-11-18 11:37:08 +01:00
unit lib: rename internal header share.h to curl_share.h to avoid collision 2025-11-25 00:26:50 +01:00
.gitignore tidy-up: .gitignore lines mostly 2025-01-27 20:59:46 +01:00
allversions.pm badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
appveyor.pm tidy-up: whitespace (more in Perl) 2025-07-12 08:59:44 +02:00
azure.pm runtests: fix quoting in Appveyor and Azure test integration 2023-04-22 11:50:03 -07:00
CMakeLists.txt tests: replace remaining CR bytes with the new macro %CR 2025-11-06 20:45:45 +01:00
config.in copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
configurehelp.pm.in build: use configurehelp.pm.in with autotools and cmake 2024-09-21 12:21:14 +02:00
devtest.pl badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
dictserver.py badwords: add more contractions, fix fallouts 2025-11-17 19:29:15 +01:00
directories.pm scripts: fix perl indentation, whitespace, semicolons 2025-04-29 19:35:55 +02:00
ech_combos.py tidy-up: miscellaneous 2025-11-17 13:32:43 +01:00
ech_tests.sh badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
ftpserver.pl badwords: add more contractions, fix fallouts 2025-11-17 19:29:15 +01:00
getpart.pm badwords: add more contractions, fix fallouts 2025-11-17 19:29:15 +01:00
globalconfig.pm runtests: add -m=seconds to override test curl command timeout 2025-11-19 22:04:52 +01:00
http-server.pl tidy-up: miscellaneous 2025-11-17 13:32:43 +01:00
http2-server.pl tidy-up: miscellaneous 2025-11-17 13:32:43 +01:00
http3-server.pl tidy-up: miscellaneous 2025-11-17 13:32:43 +01:00
Makefile.am badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
memanalyze.pl memdebug: produce stack trace dump with libbacktrace 2025-11-24 11:58:18 +01:00
negtelnetserver.py badwords: add more contractions, fix fallouts 2025-11-17 19:29:15 +01:00
nghttpx.conf copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
pathhelp.pm badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
processhelp.pm badwords: add more contractions, fix fallouts 2025-11-17 19:29:15 +01:00
requirements.txt GHA: bump the pip-dependencies group across 2 directories with 3 updates 2025-11-02 17:10:39 +01:00
rtspserver.pl tidy-up: miscellaneous 2025-11-17 13:32:43 +01:00
runner.pm runtests: add -m=seconds to override test curl command timeout 2025-11-19 22:04:52 +01:00
runtests.pl runtests: add -m=seconds to override test curl command timeout 2025-11-19 22:04:52 +01:00
secureserver.pl tidy-up: miscellaneous 2025-11-17 13:32:43 +01:00
serverhelp.pm badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
servers.pm badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
smbserver.py badwords: add more contractions, fix fallouts 2025-11-17 19:29:15 +01:00
sshhelp.pm runtests: fix test key format for libssh2 WinCNG (and others) 2025-03-23 20:26:26 +01:00
sshserver.pl tidy-up: miscellaneous 2025-11-17 13:32:43 +01:00
test745.pl badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
test971.pl badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
test1119.pl badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
test1132.pl badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
test1135.pl badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
test1139.pl badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
test1140.pl badwords: re-sync with curl-www, fix issues found 2025-11-12 00:53:44 +01:00
test1165.pl build: add build-level CURL_DISABLE_TYPECHECK options 2025-11-21 13:48:35 +01:00
test1167.pl badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
test1173.pl badwords: add more contractions, fix fallouts 2025-11-17 19:29:15 +01:00
test1175.pl badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
test1177.pl NTLM_WB: drop support 2024-04-08 13:58:58 +02:00
test1222.pl badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
test1275.pl scripts: enable strict warnings in Perl where missing, fix fallouts 2025-07-27 22:35:18 +02:00
test1276.pl scripts: enable strict warnings in Perl where missing, fix fallouts 2025-07-27 22:35:18 +02:00
test1477.pl badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
test1486.pl badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
test1488.pl badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
test1544.pl scripts: fix perl indentation, whitespace, semicolons 2025-04-29 19:35:55 +02:00
test1707.pl scripts: enable strict warnings in Perl where missing, fix fallouts 2025-07-27 22:35:18 +02:00
testcurl.pl badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
testutil.pm tests/data: more XML-compliance via %LT and %GT macros in email addresses 2025-11-18 18:57:53 +01:00
tftpserver.pl tidy-up: miscellaneous 2025-11-17 13:32:43 +01:00
util.py badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
valgrind.pm tests/valgrind.pm: fix warnings with no valgrind report to show 2024-09-20 15:40:07 +02:00
valgrind.supp hyper: drop support 2024-12-21 11:33:05 +01:00