build: avoid overriding system open and stat symbols

Replace them by `curlx_open()` and `curlx_stat()`.

To make it obvious in the source code what is being executed.

Also:
- tests/server: stop overriding `open()` for test servers.
  This is critical for the call made from the signal handler.
  For other calls, it's an option to use `curlx_open()`, but
  doesn't look important enough to do it, following the path
  taken with `fopen()`.

Follow-up to 10bac43b87 #18774
Follow-up to 20142f5d06 #18634
Follow-up to bf7375ecc5 #18503

Closes #18776
This commit is contained in:
Viktor Szakats 2025-09-30 01:27:10 +02:00
parent 684f4cdd3e
commit 9678ff5b1b
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
31 changed files with 76 additions and 83 deletions

View file

@ -52,6 +52,7 @@ int main(void)
/* to get the file size */
#ifdef UNDER_CE
/* !checksrc! disable BANNEDFUNC 1 */
if(stat("debugit", &file_info) != 0) {
#else
if(fstat(fileno(fd), &file_info) != 0) {