build: untangle CURLDEBUG and DEBUGBUILD macros

`CURLDEBUG` is meant to enable memory tracking, but in a bunch of cases,
it was protecting debug features that were supposed to be guarded with
`DEBUGBUILD`.

Replace these uses with `DEBUGBUILD`.

This leaves `CURLDEBUG` uses solely for its intended  purpose: to enable
the memory tracking debug feature.

Also:
- autotools: rely on `DEBUGBUILD` to enable `checksrc`.
  Instead of `CURLDEBUG`, which worked in most cases because debug
  builds enable `CURLDEBUG` by default, but it's not accurate.
- include `lib/easyif.h` instead of keeping a copy of a declaration.
- add CI test jobs for the build issues discovered.

Ref: https://github.com/curl/curl/pull/13694#issuecomment-2120311894
Closes #13718
This commit is contained in:
Viktor Szakats 2024-05-20 14:21:05 +02:00
parent 53b4dfe405
commit 59dc9f7e69
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
24 changed files with 53 additions and 43 deletions

View file

@ -105,7 +105,7 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd)
static unsigned int randseed;
static bool seeded = FALSE;
#ifdef CURLDEBUG
#ifdef DEBUGBUILD
char *force_entropy = getenv("CURL_ENTROPY");
if(force_entropy) {
if(!seeded) {