From af3fe375b3db6583c72a74ecd53f94ce75c09d44 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 12 Mar 2025 09:03:45 +0100 Subject: [PATCH] src: remove final uses of Curl_ symbol prefixes in tool code Closes #16678 --- src/tool_binmode.h | 2 +- src/tool_filetime.h | 2 +- src/tool_main.c | 2 +- src/tool_operate.c | 9 ++++----- src/tool_setup.h | 4 ++++ 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/tool_binmode.h b/src/tool_binmode.h index 0c7e77c838..4da6fb73e1 100644 --- a/src/tool_binmode.h +++ b/src/tool_binmode.h @@ -33,7 +33,7 @@ # define CURL_SET_BINMODE(stream) (void)setmode(fileno(stream), O_BINARY) #endif #else -# define CURL_SET_BINMODE(stream) (void)stream; Curl_nop_stmt +# define CURL_SET_BINMODE(stream) (void)stream; tool_nop_stmt #endif #endif /* HEADER_CURL_TOOL_BINMODE_H */ diff --git a/src/tool_filetime.h b/src/tool_filetime.h index 205e5cee22..4830b218c3 100644 --- a/src/tool_filetime.h +++ b/src/tool_filetime.h @@ -35,7 +35,7 @@ int getfiletime(const char *filename, struct GlobalConfig *global, void setfiletime(curl_off_t filetime, const char *filename, struct GlobalConfig *global); #else -#define setfiletime(a,b,c) Curl_nop_stmt +#define setfiletime(a,b,c) tool_nop_stmt #endif /* defined(HAVE_UTIME) || defined(HAVE_UTIMES) || \ (defined(_WIN32) && (SIZEOF_CURL_OFF_T >= 8)) */ diff --git a/src/tool_main.c b/src/tool_main.c index a507de8e28..05a5a4fbdf 100644 --- a/src/tool_main.c +++ b/src/tool_main.c @@ -141,7 +141,7 @@ static void memory_tracking_init(void) } } #else -# define memory_tracking_init() Curl_nop_stmt +# define memory_tracking_init() tool_nop_stmt #endif /* diff --git a/src/tool_operate.c b/src/tool_operate.c index 5af47ca120..3a8d932973 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -908,11 +908,10 @@ static CURLcode config2setopts(struct GlobalConfig *global, my_setopt(curl, CURLOPT_WRITEFUNCTION, tool_write_cb); /* Note that if CURLOPT_READFUNCTION is fread (the default), then - * lib/telnet.c will Curl_poll() on the input file descriptor - * rather than calling the READFUNCTION at regular intervals. - * The circumstances in which it is preferable to enable this - * behavior, by omitting to set the READFUNCTION & READDATA options, - * have not been determined. + * lib/telnet.c will poll on the input file descriptor rather than calling + * the READFUNCTION at regular intervals. The circumstances in which it is + * preferable to enable this behavior, by omitting to set the READFUNCTION & + * READDATA options, have not been determined. */ my_setopt(curl, CURLOPT_READDATA, per); /* what call to read */ diff --git a/src/tool_setup.h b/src/tool_setup.h index 2acc6be180..404b447a42 100644 --- a/src/tool_setup.h +++ b/src/tool_setup.h @@ -68,6 +68,10 @@ extern FILE *tool_stderr; # include "tool_strdup.h" #endif +#ifndef tool_nop_stmt +#define tool_nop_stmt do { } while(0) +#endif + #ifdef _WIN32 # define CURL_STRICMP(p1, p2) _stricmp(p1, p2) #elif defined(HAVE_STRCASECMP) -- 2.47.3