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

@ -165,7 +165,7 @@ jobs:
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '!19 !1233', config: '--enable-debug --disable-threaded-resolver --disable-proxy' } - { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '!19 !1233', config: '--enable-debug --disable-threaded-resolver --disable-proxy' }
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '!19 !504 !704 !705 !1233', config: '--enable-debug --disable-threaded-resolver' } - { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '!19 !504 !704 !705 !1233', config: '--enable-debug --disable-threaded-resolver' }
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '!19 !504 !704 !705 !1233', config: '' } - { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '!19 !504 !704 !705 !1233', config: '' }
- { build: 'autotools', sys: 'mingw64', env: 'x86_64' , tflags: 'skiprun' , config: '--enable-debug --disable-threaded-resolver --enable-static=no' } - { build: 'autotools', sys: 'mingw64', env: 'x86_64' , tflags: 'skiprun' , config: '--enable-debug --disable-threaded-resolver --disable-curldebug --enable-static=no' }
# FIXME: WebSockets test results ignored due to frequent failures on native Windows: # FIXME: WebSockets test results ignored due to frequent failures on native Windows:
- { build: 'cmake' , sys: 'mingw64', env: 'x86_64' , tflags: '!TFTP ~2301 ~2302' , config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON', type: 'Debug' } - { build: 'cmake' , sys: 'mingw64', env: 'x86_64' , tflags: '!TFTP ~2301 ~2302' , config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON', type: 'Debug' }
- { build: 'cmake' , sys: 'mingw64', env: 'x86_64' , tflags: 'skiprun' , config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DENABLE_CURLDEBUG=ON', type: 'Release' } - { build: 'cmake' , sys: 'mingw64', env: 'x86_64' , tflags: 'skiprun' , config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DENABLE_CURLDEBUG=ON', type: 'Release' }

View File

@ -26,9 +26,10 @@ include(CheckCSourceCompiles)
option(CURL_HIDDEN_SYMBOLS "Set to ON to hide libcurl internal symbols (=hide all symbols that aren't officially external)." ON) option(CURL_HIDDEN_SYMBOLS "Set to ON to hide libcurl internal symbols (=hide all symbols that aren't officially external)." ON)
mark_as_advanced(CURL_HIDDEN_SYMBOLS) mark_as_advanced(CURL_HIDDEN_SYMBOLS)
if(WIN32 AND ENABLE_CURLDEBUG) if(WIN32 AND (ENABLE_DEBUG OR ENABLE_CURLDEBUG))
# We need to export internal debug functions (e.g. curl_dbg_*), so disable # We need to export internal debug functions,
# symbol hiding for debug builds. # e.g. curl_easy_perform_ev() or curl_dbg_*(),
# so disable symbol hiding for debug builds and for memory tracking.
set(CURL_HIDDEN_SYMBOLS OFF) set(CURL_HIDDEN_SYMBOLS OFF)
endif() endif()

View File

@ -100,6 +100,17 @@ environment:
SCHANNEL: 'ON' SCHANNEL: 'ON'
ENABLE_UNICODE: 'ON' ENABLE_UNICODE: 'ON'
HTTP_ONLY: 'OFF' HTTP_ONLY: 'OFF'
- job_name: 'CMake, VS2022, Release, x64, Schannel, Shared, Unicode, DEBUGBULID, no-CURLDEBUG, Build-only'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
BUILD_SYSTEM: CMake
PRJ_GEN: 'Visual Studio 17 2022'
TARGET: '-A x64'
PRJ_CFG: Release
SCHANNEL: 'ON'
ENABLE_UNICODE: 'ON'
HTTP_ONLY: 'OFF'
SHARED: 'ON'
CURLDEBUG: 'OFF'
- job_name: 'CMake, VS2022, Debug, x64, no SSL, Static, Build-only' - job_name: 'CMake, VS2022, Debug, x64, no SSL, Static, Build-only'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
BUILD_SYSTEM: CMake BUILD_SYSTEM: CMake

View File

@ -44,6 +44,7 @@ AM_MAINTAINER_MODE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
CURL_CHECK_OPTION_DEBUG CURL_CHECK_OPTION_DEBUG
AM_CONDITIONAL(DEBUGBUILD, test x$want_debug = xyes)
CURL_CHECK_OPTION_OPTIMIZE CURL_CHECK_OPTION_OPTIMIZE
CURL_CHECK_OPTION_WARNINGS CURL_CHECK_OPTION_WARNINGS
CURL_CHECK_OPTION_WERROR CURL_CHECK_OPTION_WERROR
@ -549,7 +550,6 @@ CURL_CHECK_COMPILER_PROTOTYPE_MISMATCH
CURL_CHECK_COMPILER_SYMBOL_HIDING CURL_CHECK_COMPILER_SYMBOL_HIDING
CURL_CHECK_CURLDEBUG CURL_CHECK_CURLDEBUG
AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes)
supports_unittests=yes supports_unittests=yes
# cross-compilation of unit tests static library/programs fails when # cross-compilation of unit tests static library/programs fails when

View File

@ -35,7 +35,7 @@ CS_ = $(CS_0)
checksrc: checksrc:
$(CHECKSRC)@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(top_srcdir)/include/curl $(pkginclude_HEADERS) $(CHECKSRC)@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(top_srcdir)/include/curl $(pkginclude_HEADERS)
if CURLDEBUG if DEBUGBUILD
# for debug builds, we scan the sources on all regular make invokes # for debug builds, we scan the sources on all regular make invokes
all-local: checksrc all-local: checksrc
endif endif

View File

@ -126,7 +126,7 @@ checksrc:
-W$(srcdir)/curl_config.h $(srcdir)/*.[ch] $(srcdir)/vauth/*.[ch] \ -W$(srcdir)/curl_config.h $(srcdir)/*.[ch] $(srcdir)/vauth/*.[ch] \
$(srcdir)/vtls/*.[ch] $(srcdir)/vquic/*.[ch] $(srcdir)/vssh/*.[ch]) $(srcdir)/vtls/*.[ch] $(srcdir)/vquic/*.[ch] $(srcdir)/vssh/*.[ch])
if CURLDEBUG if DEBUGBUILD
# for debug builds, we scan the sources on all regular make invokes # for debug builds, we scan the sources on all regular make invokes
all-local: checksrc all-local: checksrc
endif endif

View File

@ -718,7 +718,7 @@ CURLcode Curl_conn_send(struct Curl_easy *data, int sockindex,
DEBUGASSERT(data); DEBUGASSERT(data);
DEBUGASSERT(data->conn); DEBUGASSERT(data->conn);
conn = data->conn; conn = data->conn;
#ifdef CURLDEBUG #ifdef DEBUGBUILD
{ {
/* Allow debug builds to override this logic to force short sends /* Allow debug builds to override this logic to force short sends
*/ */

View File

@ -50,7 +50,7 @@ struct conncache {
#define BUNDLE_UNKNOWN 0 /* initial value */ #define BUNDLE_UNKNOWN 0 /* initial value */
#define BUNDLE_MULTIPLEX 2 #define BUNDLE_MULTIPLEX 2
#ifdef CURLDEBUG #ifdef DEBUGBUILD
/* the debug versions of these macros make extra certain that the lock is /* the debug versions of these macros make extra certain that the lock is
never doubly locked or unlocked */ never doubly locked or unlocked */
#define CONNCACHE_LOCK(x) \ #define CONNCACHE_LOCK(x) \

View File

@ -191,7 +191,7 @@ doh_write_cb(const void *contents, size_t size, size_t nmemb, void *userp)
return realsize; return realsize;
} }
#if defined(USE_HTTPSRR) && defined(CURLDEBUG) #if defined(USE_HTTPSRR) && defined(DEBUGBUILD)
static void local_print_buf(struct Curl_easy *data, static void local_print_buf(struct Curl_easy *data,
const char *prefix, const char *prefix,
unsigned char *buf, size_t len) unsigned char *buf, size_t len)
@ -285,7 +285,7 @@ static CURLcode dohprobe(struct Curl_easy *data,
ERROR_CHECK_SETOPT(CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS); ERROR_CHECK_SETOPT(CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
ERROR_CHECK_SETOPT(CURLOPT_PIPEWAIT, 1L); ERROR_CHECK_SETOPT(CURLOPT_PIPEWAIT, 1L);
#endif #endif
#ifndef CURLDEBUG #ifndef DEBUGBUILD
/* enforce HTTPS if not debug */ /* enforce HTTPS if not debug */
ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTPS); ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
#else #else
@ -870,7 +870,7 @@ static void showdoh(struct Curl_easy *data,
} }
#ifdef USE_HTTPSRR #ifdef USE_HTTPSRR
for(i = 0; i < d->numhttps_rrs; i++) { for(i = 0; i < d->numhttps_rrs; i++) {
# ifdef CURLDEBUG # ifdef DEBUGBUILD
local_print_buf(data, "DoH HTTPS", local_print_buf(data, "DoH HTTPS",
d->https_rrs[i].val, d->https_rrs[i].len); d->https_rrs[i].val, d->https_rrs[i].len);
# else # else
@ -1143,7 +1143,7 @@ err:
return CURLE_BAD_CONTENT_ENCODING; return CURLE_BAD_CONTENT_ENCODING;
} }
#ifdef CURLDEBUG #ifdef DEBUGBUILD
static CURLcode test_alpn_escapes(void) static CURLcode test_alpn_escapes(void)
{ {
/* we'll use an example from draft-ietf-dnsop-svcb, figure 10 */ /* we'll use an example from draft-ietf-dnsop-svcb, figure 10 */
@ -1176,7 +1176,7 @@ static CURLcode Curl_doh_decode_httpsrr(unsigned char *rrval, size_t len,
struct Curl_https_rrinfo *lhrr = NULL; struct Curl_https_rrinfo *lhrr = NULL;
char *dnsname = NULL; char *dnsname = NULL;
#ifdef CURLDEBUG #ifdef DEBUGBUILD
/* a few tests of escaping, shouldn't be here but ok for now */ /* a few tests of escaping, shouldn't be here but ok for now */
if(test_alpn_escapes() != CURLE_OK) if(test_alpn_escapes() != CURLE_OK)
return CURLE_OUT_OF_MEMORY; return CURLE_OUT_OF_MEMORY;
@ -1244,7 +1244,7 @@ err:
return CURLE_OUT_OF_MEMORY; return CURLE_OUT_OF_MEMORY;
} }
# ifdef CURLDEBUG # ifdef DEBUGBUILD
static void local_print_httpsrr(struct Curl_easy *data, static void local_print_httpsrr(struct Curl_easy *data,
struct Curl_https_rrinfo *hrr) struct Curl_https_rrinfo *hrr)
{ {
@ -1382,7 +1382,7 @@ CURLcode Curl_doh_is_resolved(struct Curl_easy *data,
return result; return result;
} }
infof(data, "Some HTTPS RR to process"); infof(data, "Some HTTPS RR to process");
# ifdef CURLDEBUG # ifdef DEBUGBUILD
local_print_httpsrr(data, hrr); local_print_httpsrr(data, hrr);
# endif # endif
(*dnsp)->hinfo = hrr; (*dnsp)->hinfo = hrr;

View File

@ -374,7 +374,7 @@ struct Curl_easy *curl_easy_init(void)
return data; return data;
} }
#ifdef CURLDEBUG #ifdef DEBUGBUILD
struct socketmonitor { struct socketmonitor {
struct socketmonitor *next; /* the next node in the list or NULL */ struct socketmonitor *next; /* the next node in the list or NULL */
@ -655,7 +655,7 @@ static CURLcode easy_events(struct Curl_multi *multi)
return wait_or_timeout(multi, &evs); return wait_or_timeout(multi, &evs);
} }
#else /* CURLDEBUG */ #else /* DEBUGBUILD */
/* when not built with debug, this function doesn't exist */ /* when not built with debug, this function doesn't exist */
#define easy_events(x) CURLE_NOT_BUILT_IN #define easy_events(x) CURLE_NOT_BUILT_IN
#endif #endif
@ -788,7 +788,7 @@ CURLcode curl_easy_perform(struct Curl_easy *data)
return easy_perform(data, FALSE); return easy_perform(data, FALSE);
} }
#ifdef CURLDEBUG #ifdef DEBUGBUILD
/* /*
* curl_easy_perform_ev() is the external interface that performs a blocking * curl_easy_perform_ev() is the external interface that performs a blocking
* transfer using the event-based API internally. * transfer using the event-based API internally.

View File

@ -34,7 +34,7 @@ CURLcode Curl_senddata(struct Curl_easy *data, const void *buffer,
CURLcode Curl_connect_only_attach(struct Curl_easy *data); CURLcode Curl_connect_only_attach(struct Curl_easy *data);
#endif #endif
#ifdef CURLDEBUG #ifdef DEBUGBUILD
CURL_EXTERN CURLcode curl_easy_perform_ev(struct Curl_easy *easy); CURL_EXTERN CURLcode curl_easy_perform_ev(struct Curl_easy *easy);
#endif #endif

View File

@ -2849,7 +2849,7 @@ CURLcode Curl_http_header(struct Curl_easy *data,
#ifndef CURL_DISABLE_ALTSVC #ifndef CURL_DISABLE_ALTSVC
v = (data->asi && v = (data->asi &&
((data->conn->handler->flags & PROTOPT_SSL) || ((data->conn->handler->flags & PROTOPT_SSL) ||
#ifdef CURLDEBUG #ifdef DEBUGBUILD
/* allow debug builds to circumvent the HTTPS restriction */ /* allow debug builds to circumvent the HTTPS restriction */
getenv("CURL_ALTSVC_HTTP") getenv("CURL_ALTSVC_HTTP")
#else #else
@ -3116,7 +3116,7 @@ CURLcode Curl_http_header(struct Curl_easy *data,
/* If enabled, the header is incoming and this is over HTTPS */ /* If enabled, the header is incoming and this is over HTTPS */
v = (data->hsts && v = (data->hsts &&
((conn->handler->flags & PROTOPT_SSL) || ((conn->handler->flags & PROTOPT_SSL) ||
#ifdef CURLDEBUG #ifdef DEBUGBUILD
/* allow debug builds to circumvent the HTTPS restriction */ /* allow debug builds to circumvent the HTTPS restriction */
getenv("CURL_HSTS_HTTP") getenv("CURL_HSTS_HTTP")
#else #else

View File

@ -585,7 +585,7 @@ static size_t mqtt_decode_len(unsigned char *buf,
return len; return len;
} }
#ifdef CURLDEBUG #ifdef DEBUGBUILD
static const char *statenames[]={ static const char *statenames[]={
"MQTT_FIRST", "MQTT_FIRST",
"MQTT_REMAINING_LENGTH", "MQTT_REMAINING_LENGTH",
@ -606,7 +606,7 @@ static void mqstate(struct Curl_easy *data,
{ {
struct connectdata *conn = data->conn; struct connectdata *conn = data->conn;
struct mqtt_conn *mqtt = &conn->proto.mqtt; struct mqtt_conn *mqtt = &conn->proto.mqtt;
#ifdef CURLDEBUG #ifdef DEBUGBUILD
infof(data, "%s (from %s) (next is %s)", infof(data, "%s (from %s) (next is %s)",
statenames[state], statenames[state],
statenames[mqtt->state], statenames[mqtt->state],

View File

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

View File

@ -187,7 +187,7 @@ static CURLcode xfer_send(struct Curl_easy *data,
CURLcode result = CURLE_OK; CURLcode result = CURLE_OK;
*pnwritten = 0; *pnwritten = 0;
#ifdef CURLDEBUG #ifdef DEBUGBUILD
{ {
/* Allow debug builds to override this logic to force short initial /* Allow debug builds to override this logic to force short initial
sends sends

View File

@ -3028,7 +3028,7 @@ static CURLcode parse_connect_to_slist(struct Curl_easy *data,
#ifndef CURL_DISABLE_ALTSVC #ifndef CURL_DISABLE_ALTSVC
if(data->asi && !host && (port == -1) && if(data->asi && !host && (port == -1) &&
((conn->handler->protocol == CURLPROTO_HTTPS) || ((conn->handler->protocol == CURLPROTO_HTTPS) ||
#ifdef CURLDEBUG #ifdef DEBUGBUILD
/* allow debug builds to circumvent the HTTPS restriction */ /* allow debug builds to circumvent the HTTPS restriction */
getenv("CURL_ALTSVC_HTTP") getenv("CURL_ALTSVC_HTTP")
#else #else

View File

@ -1375,7 +1375,7 @@ struct UrlState {
unsigned char select_bits; /* != 0 -> bitmask of socket events for this unsigned char select_bits; /* != 0 -> bitmask of socket events for this
transfer overriding anything the socket may transfer overriding anything the socket may
report */ report */
#ifdef CURLDEBUG #ifdef DEBUGBUILD
BIT(conncache_lock); BIT(conncache_lock);
#endif #endif
/* when curl_easy_perform() is called, the multi handle is "owned" by /* when curl_easy_perform() is called, the multi handle is "owned" by

View File

@ -145,7 +145,7 @@ checksrc:
$(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \ $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \
-W$(srcdir)/tool_hugehelp.c $(srcdir)/*.[ch]) -W$(srcdir)/tool_hugehelp.c $(srcdir)/*.[ch])
if CURLDEBUG if DEBUGBUILD
# for debug builds, we scan the sources on all regular make invokes # for debug builds, we scan the sources on all regular make invokes
all-local: checksrc all-local: checksrc
endif endif

View File

@ -323,7 +323,7 @@ struct GlobalConfig {
bool styled_output; /* enable fancy output style detection */ bool styled_output; /* enable fancy output style detection */
long ms_per_transfer; /* start next transfer after (at least) this long ms_per_transfer; /* start next transfer after (at least) this
many milliseconds */ many milliseconds */
#ifdef CURLDEBUG #ifdef DEBUGBUILD
bool test_event_based; bool test_event_based;
#endif #endif
bool parallel; bool parallel;

View File

@ -1825,7 +1825,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
config->sasl_ir = toggle; config->sasl_ir = toggle;
break; break;
case C_TEST_EVENT: /* --test-event */ case C_TEST_EVENT: /* --test-event */
#ifdef CURLDEBUG #ifdef DEBUGBUILD
global->test_event_based = toggle; global->test_event_based = toggle;
#else #else
warnf(global, "--test-event is ignored unless a debug build"); warnf(global, "--test-event is ignored unless a debug build");

View File

@ -83,14 +83,12 @@
#include "tool_progress.h" #include "tool_progress.h"
#include "tool_ipfs.h" #include "tool_ipfs.h"
#include "dynbuf.h" #include "dynbuf.h"
#ifdef DEBUGBUILD
#include "easyif.h" /* for libcurl's debug-only curl_easy_perform_ev() */
#endif
#include "memdebug.h" /* keep this as LAST include */ #include "memdebug.h" /* keep this as LAST include */
#ifdef CURLDEBUG
/* libcurl's debug builds provide an extra function */
CURLcode curl_easy_perform_ev(CURL *easy);
#endif
#ifndef O_BINARY #ifndef O_BINARY
/* since O_BINARY as used in bitmasks, setting it to zero makes it usable in /* since O_BINARY as used in bitmasks, setting it to zero makes it usable in
source code but yet it doesn't ruin anything */ source code but yet it doesn't ruin anything */
@ -1315,7 +1313,7 @@ static CURLcode single_transfer(struct GlobalConfig *global,
my_setopt(curl, CURLOPT_SEEKFUNCTION, tool_seek_cb); my_setopt(curl, CURLOPT_SEEKFUNCTION, tool_seek_cb);
{ {
#ifdef CURLDEBUG #ifdef DEBUGBUILD
char *env = getenv("CURL_BUFFERSIZE"); char *env = getenv("CURL_BUFFERSIZE");
if(env) { if(env) {
long size = strtol(env, NULL, 10); long size = strtol(env, NULL, 10);
@ -1647,7 +1645,7 @@ static CURLcode single_transfer(struct GlobalConfig *global,
* must do the same thing as classic: * must do the same thing as classic:
* --cert <filename>:<password> --cert-type p12 * --cert <filename>:<password> --cert-type p12
* but is designed to test blob */ * but is designed to test blob */
#if defined(CURLDEBUG) || defined(DEBUGBUILD) #ifdef DEBUGBUILD
if(config->cert && (strlen(config->cert) > 8) && if(config->cert && (strlen(config->cert) > 8) &&
(memcmp(config->cert, "loadmem=",8) == 0)) { (memcmp(config->cert, "loadmem=",8) == 0)) {
FILE *fInCert = fopen(config->cert + 8, "rb"); FILE *fInCert = fopen(config->cert + 8, "rb");
@ -1690,7 +1688,7 @@ static CURLcode single_transfer(struct GlobalConfig *global,
config->proxy_cert_type); config->proxy_cert_type);
#if defined(CURLDEBUG) || defined(DEBUGBUILD) #ifdef DEBUGBUILD
if(config->key && (strlen(config->key) > 8) && if(config->key && (strlen(config->key) > 8) &&
(memcmp(config->key, "loadmem=",8) == 0)) { (memcmp(config->key, "loadmem=",8) == 0)) {
FILE *fInCert = fopen(config->key + 8, "rb"); FILE *fInCert = fopen(config->key + 8, "rb");
@ -2484,7 +2482,7 @@ static CURLcode serial_transfers(struct GlobalConfig *global,
break; break;
} }
start = tvnow(); start = tvnow();
#ifdef CURLDEBUG #ifdef DEBUGBUILD
if(global->test_event_based) if(global->test_event_based)
result = curl_easy_perform_ev(per->curl); result = curl_easy_perform_ev(per->curl);
else else

View File

@ -162,7 +162,7 @@ checksrc:
(cd server && $(MAKE) checksrc) (cd server && $(MAKE) checksrc)
(cd http && $(MAKE) checksrc) (cd http && $(MAKE) checksrc)
if CURLDEBUG if DEBUGBUILD
# for debug builds, we scan the sources on all regular make invokes # for debug builds, we scan the sources on all regular make invokes
all-local: checksrc all-local: checksrc
endif endif

View File

@ -134,7 +134,7 @@ CS_ = $(CS_0)
checksrc: checksrc:
$(CHECKSRC)@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) $(srcdir)/*.[ch] $(CHECKSRC)@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) $(srcdir)/*.[ch]
if CURLDEBUG if DEBUGBUILD
# for debug builds, we scan the sources on all regular make invokes # for debug builds, we scan the sources on all regular make invokes
all-local: checksrc all-local: checksrc
endif endif

View File

@ -59,7 +59,7 @@ CS_ = $(CS_0)
checksrc: checksrc:
$(CHECKSRC)@PERL@ $(top_srcdir)/scripts/checksrc.pl $(srcdir)/*.[ch] $(CHECKSRC)@PERL@ $(top_srcdir)/scripts/checksrc.pl $(srcdir)/*.[ch]
if CURLDEBUG if DEBUGBUILD
# for debug builds, we scan the sources on all regular make invokes # for debug builds, we scan the sources on all regular make invokes
all-local: checksrc all-local: checksrc
endif endif