warnless: drop parts of the read/write preprocessor hack (Windows)

The `#undef` hack is no longer necessary after changing the redifitions
to not map back to the original symbols.

This makes it unnecessary to repeat the redefinitions after compiling
`warnless.c` itself (in unity mode).

Which in turns makes it unnecessary to include `warnless.h` again, to
trigger such redefinition.

This also means that `read`/`write` are now redefined on Windows from
the first inclusion of `warnless.h`.

Also:
- tests/server: drop a repeat `warnless.h` include, that is unnecessary
  after this patch.
- tests/unit: drop repeat `warnless.h` include.
- tests/libtest: drop repeat `warnless.h` includes.
- tests/libtest: formatting.

Follow-up to 2f312a14da #17619
Follow-up to 84338c4de2 #12331
Follow-up to 6239146e93

Closes #17673
This commit is contained in:
Viktor Szakats 2025-06-19 14:41:34 +02:00
parent 6c1a7541fb
commit 0042770157
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
97 changed files with 20 additions and 96 deletions

View file

@ -102,7 +102,6 @@
#endif
#include <curlx.h> /* from the private lib dir */
#include "warnless.h" /* for read() */
/* include memdebug.h last */
#include <memdebug.h>