curl/tests/server
Viktor Szakats c04504885d
src: fix potential macro confusion in cmake unity builds
Sources used `lib/curlx.h` with both `ENABLE_CURLX_PRINTF` set and unset
before including it.

In a cmake "unity" batch where the first included source had it unset,
the next sources did not get the macros requested with
`ENABLE_CURLX_PRINTF` because `lib/curl.x` had already been included
without them.

Fix it by by making the macros enabled permanently and globally for
internal sources, and dropping `ENABLE_CURLX_PRINTF`.

This came up while testing unity builds with smaller batches. The full,
default unity build where all `src` is bundled up in a single unit, was
not affected.

Fixes:
```
$ cmake -B build -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=15
$ make -C build
...
curl/src/tool_getparam.c: In function ‘getparameter’:
curl/src/tool_getparam.c:2409:11: error: implicit declaration of function ‘msnprintf’; did you mean ‘vsnprintf’? [-Wimplicit-function-declaration]
 2409 |           msnprintf(buffer, sizeof(buffer), "%" CURL_FORMAT_CURL_OFF_T "-",
      |           ^~~~~~~~~
      |           vsnprintf
curl/src/tool_getparam.c:2409:11: warning: nested extern declaration of ‘msnprintf’ [-Wnested-externs]
[...]
```

Reported-by: Daniel Stenberg
Bug: https://github.com/curl/curl/pull/14626#issuecomment-2301663491

Closes #14632
2024-08-22 10:45:04 +02:00
..
.gitignore tidy-up: mostly whitespace nits 2023-08-31 23:02:10 +00:00
base64.pl copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
CMakeLists.txt cmake: fix and tidy up c-ares builds, enable in more CI jobs 2024-08-15 09:44:52 +02:00
disabled.c tests: add SHA-512/256 unit test 2024-02-20 11:36:03 +01:00
fake_ntlm.c src: fix potential macro confusion in cmake unity builds 2024-08-22 10:45:04 +02:00
getpart.c src: fix potential macro confusion in cmake unity builds 2024-08-22 10:45:04 +02:00
getpart.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
Makefile.am tidy-up: delete Makefile.inc from EXTRA_DIST 2024-08-12 14:54:47 +02:00
Makefile.inc copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
mqttd.c src: fix potential macro confusion in cmake unity builds 2024-08-22 10:45:04 +02:00
resolve.c src: fix potential macro confusion in cmake unity builds 2024-08-22 10:45:04 +02:00
rtspd.c src: fix potential macro confusion in cmake unity builds 2024-08-22 10:45:04 +02:00
server_setup.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
server_sockaddr.h build: prefer USE_IPV6 macro internally (was: ENABLE_IPV6) 2024-04-13 08:33:26 +00:00
sockfilt.c src: fix potential macro confusion in cmake unity builds 2024-08-22 10:45:04 +02:00
socksd.c src: fix potential macro confusion in cmake unity builds 2024-08-22 10:45:04 +02:00
sws.c src: fix potential macro confusion in cmake unity builds 2024-08-22 10:45:04 +02:00
testpart.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tftp.h tests: tidy up types in server code 2024-05-13 11:16:26 +02:00
tftpd.c src: fix potential macro confusion in cmake unity builds 2024-08-22 10:45:04 +02:00
util.c src: fix potential macro confusion in cmake unity builds 2024-08-22 10:45:04 +02:00
util.h build: enable missing OpenSSF-recommended warnings, with fixes 2023-12-16 13:12:37 +00:00