From 4cf43508e8e60d0d8acef1beecb0f76040609543 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 19 Jan 2026 12:53:40 +0100 Subject: [PATCH 1/4] CI: show curl tool and libcurl sizes To see how they change throughout code and/or build changes. Also: - improve `file` output. - tidy-ups. Closes #20355 --- .github/workflows/http3-linux.yml | 5 ++++- .github/workflows/linux.yml | 5 ++++- .github/workflows/macos.yml | 14 +++++++++++--- .github/workflows/non-native.yml | 8 ++++++-- .github/workflows/windows.yml | 16 +++++++++++----- appveyor.sh | 4 +++- 6 files changed, 39 insertions(+), 13 deletions(-) diff --git a/.github/workflows/http3-linux.yml b/.github/workflows/http3-linux.yml index 181ba34303c0..a473623727fa 100644 --- a/.github/workflows/http3-linux.yml +++ b/.github/workflows/http3-linux.yml @@ -671,7 +671,10 @@ jobs: fi - name: 'curl -V' - run: bld/src/curl --disable -V + run: | + find . -type f \( -name curl -o -name '*.so.*' -o -name '*.a' \) -print0 | xargs -0 file -- + find . -type f \( -name curl -o -name '*.so.*' -o -name '*.a' \) -print0 | xargs -0 stat -c '%10s bytes: %n' -- + bld/src/curl --disable -V - name: 'build tests' if: ${{ !contains(matrix.build.install_steps, 'skipall') }} diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 565f9295a5a7..65bba5ea96de 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -813,7 +813,10 @@ jobs: - name: 'curl -V' if: ${{ matrix.build.make-custom-target != 'tidy' }} - run: bld/src/curl --disable -V + run: | + find . -type f \( -name curl -o -name '*.so.*' -o -name '*.a' \) -print0 | xargs -0 file -- + find . -type f \( -name curl -o -name '*.so.*' -o -name '*.a' \) -print0 | xargs -0 stat -c '%10s bytes: %n' -- + bld/src/curl --disable -V - name: 'curl install' run: | diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9ad31ff62947..054ba48245b3 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -182,7 +182,9 @@ jobs: fi - name: 'curl info' - run: find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -exec file -- '{}' \; + run: | + find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 file -- + find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 stat -f '%10z bytes: %N' -- - name: 'build tests' run: | @@ -462,7 +464,10 @@ jobs: fi - name: 'curl -V' - run: bld/src/curl --disable --version + run: | + find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 file -- + find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 stat -f '%10z bytes: %N' -- + bld/src/curl --disable --version - name: 'curl install' run: | @@ -696,4 +701,7 @@ jobs: fi - name: 'curl -V' - run: bld/src/curl --disable --version + run: | + find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 file -- + find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 stat -f '%10z bytes: %N' -- + bld/src/curl --disable --version diff --git a/.github/workflows/non-native.yml b/.github/workflows/non-native.yml index 6c0bae1dc4c5..5ac2c863ab88 100644 --- a/.github/workflows/non-native.yml +++ b/.github/workflows/non-native.yml @@ -308,7 +308,9 @@ jobs: fi - name: 'curl info' - run: find . -type f \( -name curl -o -name '*.so' -o -name '*.a' \) -exec file -- '{}' \; + run: | + find . -type f \( -name curl -o -name '*.so.*' -o -name '*.a' \) -print0 | xargs -0 file -- + find . -type f \( -name curl -o -name '*.so.*' -o -name '*.a' \) -print0 | xargs -0 stat -c '%10s bytes: %n' -- - name: 'build tests' run: | @@ -412,7 +414,9 @@ jobs: fi - name: 'curl info' - run: find . \( -name '*.exe' -o -name '*.a' \) -exec file '{}' \; + run: | + find . \( -name '*.exe' -o -name '*.a' \) -print0 | xargs -0 file -- + find . \( -name '*.exe' -o -name '*.a' \) -print0 | xargs -0 stat -c '%10s bytes: %n' -- - name: 'build tests' if: ${{ matrix.build == 'cmake' }} # skip for autotools to save time diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 48de62739d83..2e1818f8c848 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -129,7 +129,8 @@ jobs: timeout-minutes: 1 run: | PATH=/usr/bin - find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \; + find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -print0 | grep -z curl | xargs -0 file -- + find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -print0 | grep -z curl | xargs -0 stat -c '%10s bytes: %n' -- if [ "${MATRIX_BUILD}" = 'cmake' ]; then PATH="$PWD/bld/lib:$PATH" fi @@ -335,7 +336,8 @@ jobs: # avoid libtool's curl.exe wrapper for shared builds mv bld/src/.libs/curl.exe bld/src/curl.exe || true fi - find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \; + find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -print0 | grep -z curl | xargs -0 file -- + find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -print0 | grep -z curl | xargs -0 stat -c '%10s bytes: %n' -- if [ "${MATRIX_TEST}" != 'uwp' ]; then # curl: error initializing curl library bld/src/curl.exe --disable --version fi @@ -550,7 +552,8 @@ jobs: - name: 'curl -V' timeout-minutes: 1 run: | - /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \; + /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -print0 | grep -z curl | xargs -0 file -- + /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -print0 | grep -z curl | xargs -0 stat -c '%10s bytes: %n' -- PATH="$PWD/bld/lib:$PATH" bld/src/curl.exe --disable --version @@ -667,7 +670,9 @@ jobs: fi - name: 'curl info' - run: find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \; + run: | + find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -print0 | grep -z curl | xargs -0 file -- + find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -print0 | grep -z curl | xargs -0 stat -c '%10s bytes: %n' -- - name: 'build tests' if: ${{ matrix.build == 'cmake' && matrix.compiler != 'clang-tidy' }} # Save time by skipping this for autotools and clang-tidy @@ -909,7 +914,8 @@ jobs: - name: 'curl -V' timeout-minutes: 1 run: | - /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file -- '{}' \; + /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -print0 | grep -z curl | xargs -0 file -- + /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -print0 | grep -z curl | xargs -0 stat -c '%10s bytes: %n' -- if [ "${MATRIX_PLAT}" != 'uwp' ]; then # Missing: ucrtbased.dll, VCRUNTIME140D.dll, VCRUNTIME140D_APP.dll PATH="$PWD/bld/lib/${MATRIX_TYPE}:$PATH" "bld/src/${MATRIX_TYPE}/curl.exe" --disable --version diff --git a/appveyor.sh b/appveyor.sh index 1a8df9ff8abc..26adeb32e149 100644 --- a/appveyor.sh +++ b/appveyor.sh @@ -115,7 +115,9 @@ elif [ "${BUILD_SYSTEM}" = 'VisualStudioSolution' ]; then curl="build/${platdir}/${VC_VERSION}/${PRJ_CFG}/curl${binsuffix}.exe" fi -find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file -- '{}' \; +find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -print0 | grep -z curl | xargs -0 file -- +find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -print0 | grep -z curl | xargs -0 stat -c '%10s bytes: %n' -- + if [ -z "${SKIP_RUN:-}" ]; then "${curl}" --disable --version else From b8ba798d18ba9bff5f38fd66ca3402a90e257938 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 19 Jan 2026 16:23:03 +0100 Subject: [PATCH 2/4] GHA/non-native: fix size/file listing for Android shared lib Follow-up to 4cf43508e8e60d0d8acef1beecb0f76040609543 #20355 --- .github/workflows/non-native.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/non-native.yml b/.github/workflows/non-native.yml index 5ac2c863ab88..c9c1240119a0 100644 --- a/.github/workflows/non-native.yml +++ b/.github/workflows/non-native.yml @@ -309,8 +309,8 @@ jobs: - name: 'curl info' run: | - find . -type f \( -name curl -o -name '*.so.*' -o -name '*.a' \) -print0 | xargs -0 file -- - find . -type f \( -name curl -o -name '*.so.*' -o -name '*.a' \) -print0 | xargs -0 stat -c '%10s bytes: %n' -- + find . -type f \( -name curl -o -name '*.so' -o -name '*.a' \) -print0 | xargs -0 file -- + find . -type f \( -name curl -o -name '*.so' -o -name '*.a' \) -print0 | xargs -0 stat -c '%10s bytes: %n' -- - name: 'build tests' run: | From 0002184015c559d7dacb6cbbcd08a0b0b34eb985 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 19 Jan 2026 16:01:57 +0100 Subject: [PATCH 3/4] imap: simplify imap_is_bchar() with strchr() Closes #20358 --- lib/imap.c | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/lib/imap.c b/lib/imap.c index 7eb688074098..3a73521ac6ed 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -1677,40 +1677,9 @@ static void imap_easy_reset(struct IMAP *imap) */ static bool imap_is_bchar(char ch) { - /* Performing the alnum check with this macro is faster because of ASCII + /* Performing the alnum check first with macro is faster because of ASCII arithmetic */ - if(ISALNUM(ch)) - return TRUE; - - switch(ch) { - /* bchar */ - case ':': - case '@': - case '/': - /* bchar -> achar */ - case '&': - case '=': - /* bchar -> achar -> uchar -> unreserved (without alphanumeric) */ - case '-': - case '.': - case '_': - case '~': - /* bchar -> achar -> uchar -> sub-delims-sh */ - case '!': - case '$': - case '\'': - case '(': - case ')': - case '*': - case '+': - case ',': - /* bchar -> achar -> uchar -> pct-encoded */ - case '%': /* HEXDIG chars are already included above */ - return TRUE; - - default: - return FALSE; - } + return ch && (ISALNUM(ch) || strchr(":@/&=-._~!$\'()*+,%", ch)); } /*********************************************************************** From 2d5a063121202acaa23bb77975b2739bec4551ce Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 15 Jan 2026 14:04:05 +0100 Subject: [PATCH 4/4] build: merge TrackMemory (`CURLDEBUG`) into debug-enabled option Drop separate `TrackMemory` (aka `CURLDEBUG`) debug feature. After recent changes (thread-safety, 193cb00ce9b47e75d42157c650cc3de3fd96d35d, and updates leading up to it), `TrackMemory` is unlikely to cause build or runtime issues. To simplify builds and debug options, enable `TrackMemory` unconditionally for debug-enabled (aka `DEBUGBUILD`) builds. Before this patch, this was already the default, with an option to disable it, or enable it in non-debug-enabled builds. Note, in practice these two debug options already went hand in hand. It was not possible to toggle them separately for a long time due to bugs, before 59dc9f7e69c399102e9ebe3670360ef52706ff23 (2024-05-28) fixed it. This patch also removes/deprecates separate knobs and feature flags for `TrackMemory`: - autotools: `--enable-curldebug`/`--disable-curldebug` - cmake: `-DENABLE_CURLDEBUG=ON`/`OFF` - C macro: `CURLDEBUG` - libcurl: `CURL_VERSION_CURLDEBUG` symbol deprecated in favor of `CURL_VERSION_DEBUG`. They always return the same value after this patch. Also: - drop `TrackMemory` from `curl -V` output. - rename internal `CURLDEBUG` macro to `CURL_MEMDEBUG` internally. To avoid confusion with `DEBUGBUILD`, but to keep guarding `TrackMemory`-related internals for readability. - runtests: bind `TrackMemory` to debug feature. Keep it a separate test feature requirement, for clarity. - CI: drop test builds for combinations of the two options. - GHA/linux: no longer disable TrackMemory in the TSAN job. Ref: https://github.com/curl/curl/pull/20328#issuecomment-3754528407 Closes #20331 --- .github/workflows/linux.yml | 2 +- .github/workflows/windows.yml | 4 +-- CMake/CurlSymbolHiding.cmake | 2 +- CMakeLists.txt | 11 ++----- appveyor.sh | 1 - appveyor.yml | 14 ++------- configure.ac | 10 ------ docs/INSTALL-CMAKE.md | 3 +- docs/cmdline-opts/version.md | 3 -- docs/libcurl/curl_version_info.md | 15 ++++----- docs/libcurl/symbols-in-versions | 2 +- docs/tests/TEST-SUITE.md | 2 +- include/curl/curl.h | 3 +- lib/Makefile.am | 3 -- lib/curl_addrinfo.c | 8 ++--- lib/curl_addrinfo.h | 4 +-- lib/curl_setup.h | 16 ++++++---- lib/curlx/fopen.c | 2 +- lib/curlx/fopen.h | 2 +- lib/fake_addrinfo.h | 4 +-- lib/libcurl.rc | 2 +- lib/memdebug.c | 4 +-- lib/version.c | 7 +++-- m4/curl-confopts.m4 | 51 ------------------------------- projects/OS400/curl.inc.in | 2 +- src/Makefile.am | 3 -- src/curl.rc | 2 +- src/curlinfo.c | 2 +- src/tool_libinfo.c | 1 - src/tool_main.c | 2 +- tests/libtest/Makefile.am | 3 -- tests/libtest/first.c | 2 +- tests/runtests.pl | 6 ++-- tests/tunit/Makefile.am | 3 -- tests/unit/Makefile.am | 3 -- 35 files changed, 58 insertions(+), 146 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 65bba5ea96de..a5cbd27bb03e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -338,7 +338,7 @@ jobs: CFLAGS: -fsanitize=thread -g LDFLAGS: -fsanitize=thread CC: clang - generate: -DOPENSSL_ROOT_DIR=/home/runner/openssl -DENABLE_DEBUG=ON -DENABLE_CURLDEBUG=OFF + generate: -DOPENSSL_ROOT_DIR=/home/runner/openssl -DENABLE_DEBUG=ON - name: 'memory-sanitizer' install_packages: clang diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 2e1818f8c848..8f10faf62f9c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -200,7 +200,7 @@ jobs: - { build: 'cmake' , sys: 'msys' , env: 'x86_64' , tflags: '' , config: '-DENABLE_DEBUG=ON -DENABLE_THREADED_RESOLVER=OFF', install: 'openssl-devel libssh2-devel', name: 'default' } - { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '' , config: '--with-openssl', install: 'openssl-devel libssh2-devel', name: 'default R' } # MinGW - - { build: 'autotools', sys: 'mingw64' , env: 'x86_64' , tflags: 'skiprun' , config: '--enable-debug --with-openssl --disable-threaded-resolver --disable-curldebug --enable-static --without-zlib', install: 'mingw-w64-x86_64-openssl mingw-w64-x86_64-libssh2', name: 'default' } + - { build: 'autotools', sys: 'mingw64' , env: 'x86_64' , tflags: 'skiprun' , config: '--enable-debug --with-openssl --disable-threaded-resolver --enable-static --without-zlib', install: 'mingw-w64-x86_64-openssl mingw-w64-x86_64-libssh2', name: 'default' } - { build: 'autotools', sys: 'mingw64' , env: 'x86_64' , tflags: '' , config: '--enable-debug --with-openssl --enable-windows-unicode --enable-ares --enable-static --disable-shared --enable-ca-native', install: 'mingw-w64-x86_64-c-ares mingw-w64-x86_64-openssl mingw-w64-x86_64-nghttp3 mingw-w64-x86_64-libssh2', name: 'c-ares U' } - { build: 'cmake' , sys: 'mingw64' , env: 'x86_64' , tflags: '--min=1650', config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DENABLE_ARES=ON', install: 'mingw-w64-x86_64-c-ares mingw-w64-x86_64-libssh2', type: 'Debug', name: 'schannel c-ares U' } # MinGW torture @@ -211,7 +211,7 @@ jobs: # Windows. Do not use this component till there is a fix for these. # https://github.com/curl/curl-for-win/blob/3951808deb04df9489ee17430f236ed54436f81a/libssh.sh#L6-L8 - { build: 'cmake' , sys: 'clang64' , env: 'clang-x86_64' , tflags: '' , config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_GNUTLS=ON -DENABLE_UNICODE=OFF -DUSE_NGTCP2=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON', install: 'mingw-w64-clang-x86_64-gnutls mingw-w64-clang-x86_64-nghttp3 mingw-w64-clang-x86_64-ngtcp2 mingw-w64-clang-x86_64-libssh', type: 'Debug', name: 'gnutls libssh' } - - { build: 'cmake' , sys: 'clangarm64', env: 'clang-aarch64', tflags: 'skiprun' , config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DENABLE_CURLDEBUG=ON', install: 'mingw-w64-clang-aarch64-libssh2', type: 'Release', name: 'schannel R TrackMemory', image: 'windows-11-arm' } + - { build: 'cmake' , sys: 'clangarm64', env: 'clang-aarch64', tflags: 'skiprun' , config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON', install: 'mingw-w64-clang-aarch64-libssh2', type: 'Release', name: 'schannel R', image: 'windows-11-arm' } - { build: 'cmake' , sys: 'clang64' , env: 'clang-x86_64' , tflags: 'skiprun' , config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_OPENSSL=ON -DENABLE_UNICODE=OFF -DUSE_NGTCP2=ON', install: 'mingw-w64-clang-x86_64-openssl mingw-w64-clang-x86_64-nghttp3 mingw-w64-clang-x86_64-ngtcp2 mingw-w64-clang-x86_64-libssh2', type: 'Release', name: 'openssl', chkprefill: '_chkprefill' } - { build: 'cmake' , sys: 'ucrt64' , env: 'ucrt-x86_64' , tflags: 'skiprun' , config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_OPENSSL=ON', install: 'mingw-w64-ucrt-x86_64-openssl mingw-w64-ucrt-x86_64-libssh2', type: 'Release', test: 'uwp', name: 'schannel' } # { build: 'autotools', sys: 'ucrt64' , env: 'ucrt-x86_64' , tflags: 'skiprun' , config: '--without-debug --with-schannel --disable-static', install: 'mingw-w64-ucrt-x86_64-libssh2', type: 'Release', test: 'uwp', name: 'schannel' } diff --git a/CMake/CurlSymbolHiding.cmake b/CMake/CurlSymbolHiding.cmake index 2576a1aff36f..51a2d94de13a 100644 --- a/CMake/CurlSymbolHiding.cmake +++ b/CMake/CurlSymbolHiding.cmake @@ -24,7 +24,7 @@ option(CURL_HIDDEN_SYMBOLS "Hide libcurl internal symbols (=hide all symbols that are not officially external)" ON) mark_as_advanced(CURL_HIDDEN_SYMBOLS) -if(WIN32 AND (ENABLE_DEBUG OR ENABLE_CURLDEBUG)) +if(WIN32 AND ENABLE_DEBUG) # We need to export internal debug functions, # e.g. curl_easy_perform_ev() or curl_dbg_*(), # so disable symbol hiding for debug builds and for memory tracking. diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c5ecccb97de..c5bdd99e8d69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -253,15 +253,11 @@ option(ENABLE_DEBUG "Enable curl debug features (for developing curl itself)" OF if(ENABLE_DEBUG) message(WARNING "This curl build is Debug-enabled and insecure, do not use in production.") endif() -option(ENABLE_CURLDEBUG "Enable TrackMemory debug feature" ${ENABLE_DEBUG}) set(CURL_DEBUG_MACROS "") if(ENABLE_DEBUG) list(APPEND CURL_DEBUG_MACROS "DEBUGBUILD") endif() -if(ENABLE_CURLDEBUG) - list(APPEND CURL_DEBUG_MACROS "CURLDEBUG") -endif() option(CURL_CLANG_TIDY "Run the build through clang-tidy" OFF) if(CURL_CLANG_TIDY) @@ -1260,10 +1256,10 @@ if(CURL_USE_GSSAPI) endif() # libbacktrace -option(CURL_USE_LIBBACKTRACE "Use libbacktrace. Requires build with TrackMemory and DWARF debug information." OFF) +option(CURL_USE_LIBBACKTRACE "Use libbacktrace. Requires debug-enabled build and DWARF debug information." OFF) if(CURL_USE_LIBBACKTRACE) - if(NOT ENABLE_CURLDEBUG) - message(FATAL_ERROR "libbacktrace requires TrackMemory enabled") + if(NOT ENABLE_DEBUG) + message(FATAL_ERROR "libbacktrace requires debug-enabled build for TrackMemory") endif() if(NOT CMAKE_BUILD_TYPE MATCHES "(Debug|RelWithDebInfo)") message(FATAL_ERROR "libbacktrace requires debug information") @@ -1981,7 +1977,6 @@ curl_add_if("HTTPS-proxy" NOT CURL_DISABLE_PROXY AND _ssl_enabled AND (USE_OPE curl_add_if("Unicode" ENABLE_UNICODE) curl_add_if("threadsafe" HAVE_ATOMIC OR (USE_THREADS_POSIX AND HAVE_PTHREAD_H) OR WIN32) curl_add_if("Debug" ENABLE_DEBUG) -curl_add_if("TrackMemory" ENABLE_CURLDEBUG) curl_add_if("ECH" _ssl_enabled AND HAVE_ECH) curl_add_if("HTTPSRR" _ssl_enabled AND USE_HTTPSRR) curl_add_if("PSL" USE_LIBPSL) diff --git a/appveyor.sh b/appveyor.sh index 26adeb32e149..a5af2ef3088b 100644 --- a/appveyor.sh +++ b/appveyor.sh @@ -67,7 +67,6 @@ if [ "${BUILD_SYSTEM}" = 'CMake' ]; then [[ "${TARGET}" = *'ARM64'* ]] && SKIP_RUN='ARM64 architecture' [ -n "${TOOLSET:-}" ] && options+=" -T ${TOOLSET}" [ "${OPENSSL}" = 'ON' ] && options+=" -DOPENSSL_ROOT_DIR=${openssl_root_win}" - [ -n "${CURLDEBUG:-}" ] && options+=" -DENABLE_CURLDEBUG=${CURLDEBUG}" if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" = 'Visual Studio 2013' ]; then mkdir "_bld${_chkprefill}" cd "_bld${_chkprefill}" diff --git a/appveyor.yml b/appveyor.yml index b814c5c6a89a..a0e21b2e1ea2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -53,14 +53,13 @@ environment: PRJ_CFG: Release OPENSSL: 'ON' SHARED: 'ON' - - job_name: 'CM VS2022, Release, arm64, Schannel, Static, Build-tests' + - job_name: 'CM VS2022, Release, arm64, Schannel, Static, no-DEBUGBUILD, Build-tests' APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' PRJ_GEN: 'Visual Studio 17 2022' TARGET: '-A ARM64' PRJ_CFG: Release SCHANNEL: 'ON' DEBUG: 'OFF' - CURLDEBUG: 'ON' - job_name: 'CM VS2010, Debug, x64, Schannel, Shared, Build-tests & examples' APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2013' PRJ_GEN: 'Visual Studio 10 2010' @@ -120,14 +119,7 @@ environment: ENABLE_UNICODE: 'ON' EXAMPLES: 'ON' TOOLSET: 'ClangCl' - - job_name: 'CM VS2022, Debug, x64, Schannel, Static, Unicode, Build-tests' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' - PRJ_GEN: 'Visual Studio 17 2022' - TARGET: '-A x64' - PRJ_CFG: Debug - SCHANNEL: 'ON' - ENABLE_UNICODE: 'ON' - - job_name: 'CM VS2022, Release, x64, Schannel, Shared, Unicode, DEBUGBUILD, no-CURLDEBUG, Build-tests' + - job_name: 'CM VS2022, Release, x64, Schannel, Shared, Unicode, no-DEBUGBUILD, Build-tests' APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' PRJ_GEN: 'Visual Studio 17 2022' TARGET: '-A x64' @@ -135,7 +127,7 @@ environment: SCHANNEL: 'ON' ENABLE_UNICODE: 'ON' SHARED: 'ON' - CURLDEBUG: 'OFF' + DEBUG: 'OFF' - job_name: 'CM VS2022, Debug, x64, no SSL, Static, Build-tests' APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' PRJ_GEN: 'Visual Studio 17 2022' diff --git a/configure.ac b/configure.ac index 227f1aeb53bd..d4a1b641a845 100644 --- a/configure.ac +++ b/configure.ac @@ -48,8 +48,6 @@ AM_CONDITIONAL(DEBUGBUILD, test "$want_debug" = "yes") CURL_CHECK_OPTION_OPTIMIZE CURL_CHECK_OPTION_WARNINGS CURL_CHECK_OPTION_WERROR -CURL_CHECK_OPTION_CURLDEBUG -AM_CONDITIONAL(CURLDEBUG, test "$want_curldebug" = "yes") CURL_CHECK_OPTION_SYMBOL_HIDING CURL_CHECK_OPTION_ARES CURL_CHECK_OPTION_RT @@ -5312,9 +5310,6 @@ fi if test "$want_debug" = "yes"; then SUPPORT_FEATURES="$SUPPORT_FEATURES Debug" fi -if test "$want_curldebug" = "yes"; then - SUPPORT_FEATURES="$SUPPORT_FEATURES TrackMemory" -fi if test -n "$CURL_CA_EMBED"; then SUPPORT_FEATURES="$SUPPORT_FEATURES CAcert" CURL_CA_EMBED_msg="$CURL_CA_EMBED" @@ -5453,11 +5448,6 @@ XC_CHECK_BUILD_FLAGS SSL_BACKENDS=${ssl_backends} AC_SUBST(SSL_BACKENDS) -if test "$want_curldebug_assumed" = "yes" && - test "$want_curldebug" = "yes" && test "$USE_ARES" = "1"; then - ac_configure_args="$ac_configure_args --enable-curldebug" -fi - CURL_PREPARE_CONFIGUREHELP_PM AC_CONFIG_FILES([\ diff --git a/docs/INSTALL-CMAKE.md b/docs/INSTALL-CMAKE.md index a00a02eb532b..fb1c6112071b 100644 --- a/docs/INSTALL-CMAKE.md +++ b/docs/INSTALL-CMAKE.md @@ -246,7 +246,6 @@ target_link_libraries(my_target PRIVATE CURL::libcurl) - `CURL_STATIC_CRT`: Build libcurl with static CRT with MSVC (`/MT`) (requires UCRT, static libcurl or no curl executable). Default: `OFF` - `CURL_TARGET_WINDOWS_VERSION`: Minimum target Windows version as hex string. - `CURL_WERROR`: Turn compiler warnings into errors. Default: `OFF` -- `ENABLE_CURLDEBUG`: Enable TrackMemory debug feature. Default: =`ENABLE_DEBUG` - `ENABLE_CURL_MANUAL`: Build the man page for curl and enable its `-M`/`--manual` option. Default: `ON` - `ENABLE_DEBUG`: Enable curl debug features (for developing curl itself). Default: `OFF` - `IMPORT_LIB_SUFFIX`: Import library suffix. Default: `_imp` for MSVC-like toolchains, otherwise empty. @@ -358,7 +357,7 @@ Details via CMake - `CURL_USE_GNUTLS`: Enable GnuTLS for SSL/TLS. Default: `OFF` - `CURL_USE_GSASL`: Use libgsasl. Default: `OFF` - `CURL_USE_GSSAPI`: Use GSSAPI implementation. Default: `OFF` -- `CURL_USE_LIBBACKTRACE`: Use [libbacktrace](https://github.com/ianlancetaylor/libbacktrace). Requires build with TrackMemory and DWARF debug information. Default: `OFF` +- `CURL_USE_LIBBACKTRACE`: Use [libbacktrace](https://github.com/ianlancetaylor/libbacktrace). Requires debug-enabled build and DWARF debug information. Default: `OFF` - `CURL_USE_LIBPSL`: Use libpsl. Default: `ON` - `CURL_USE_LIBSSH2`: Use libssh2. Default: `ON` - `CURL_USE_LIBSSH`: Use libssh. Default: `OFF` diff --git a/docs/cmdline-opts/version.md b/docs/cmdline-opts/version.md index a6c83ba5fdd9..35e9cf237af6 100644 --- a/docs/cmdline-opts/version.md +++ b/docs/cmdline-opts/version.md @@ -124,9 +124,6 @@ SSPI is supported. ## `TLS-SRP` SRP (Secure Remote Password) authentication is supported for TLS. -## `TrackMemory` -Debug memory tracking is supported. - ## `Unicode` Unicode support on Windows. diff --git a/docs/libcurl/curl_version_info.md b/docs/libcurl/curl_version_info.md index 98b9f2bc783e..20e84fbd7365 100644 --- a/docs/libcurl/curl_version_info.md +++ b/docs/libcurl/curl_version_info.md @@ -356,13 +356,6 @@ curl initialization. (Added in 7.84.0) See libcurl-thread(3) libcurl was built with support for TLS-SRP (in one or more of the built-in TLS backends). -## `TrackMemory` - -*features* mask bit: CURL_VERSION_CURLDEBUG - -libcurl was built with memory tracking debug capabilities. This is mainly of -interest for libcurl hackers. - ## `Unicode` *features* mask bit: CURL_VERSION_UNICODE @@ -391,6 +384,14 @@ callbacks. Always 0 since 7.82.0. Deprecated. ## no name +*features* mask bit: CURL_VERSION_CURLDEBUG + +libcurl was built with memory tracking debug capabilities. This is mainly of +interest for libcurl hackers. Always the same as CURL_VERSION_DEBUG since +8.19.0. Deprecated. + +## no name + *features* mask bit: CURL_VERSION_GSSNEGOTIATE supports HTTP GSS-Negotiate. Deprecated. diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions index 1859fe184a8c..d88d45504afa 100644 --- a/docs/libcurl/symbols-in-versions +++ b/docs/libcurl/symbols-in-versions @@ -161,7 +161,7 @@ CURL_VERSION_ASYNCHDNS 7.10.7 CURL_VERSION_BITS 7.43.0 CURL_VERSION_BROTLI 7.57.0 CURL_VERSION_CONV 7.15.4 -CURL_VERSION_CURLDEBUG 7.19.6 +CURL_VERSION_CURLDEBUG 7.19.6 8.19.0 CURL_VERSION_DEBUG 7.10.6 CURL_VERSION_GSASL 7.76.0 CURL_VERSION_GSSAPI 7.38.0 diff --git a/docs/tests/TEST-SUITE.md b/docs/tests/TEST-SUITE.md index 6a2e60c81759..17a0f8d676c6 100644 --- a/docs/tests/TEST-SUITE.md +++ b/docs/tests/TEST-SUITE.md @@ -175,7 +175,7 @@ SPDX-License-Identifier: curl ### Memory test The test script checks that all allocated memory is freed properly IF curl - has been built with the `CURLDEBUG` define set. The script automatically + has been built with the `DEBUGBUILD` define set. The script automatically detects if that is the case, and it uses the `memanalyze.pl` script to analyze the memory debugging output. diff --git a/include/curl/curl.h b/include/curl/curl.h index 007db5442384..87b6344ea6fb 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -3184,7 +3184,8 @@ typedef struct curl_version_info_data curl_version_info_data; supported */ #define CURL_VERSION_SSPI (1<<11) /* Built against Windows SSPI */ #define CURL_VERSION_CONV (1<<12) /* Character conversions supported */ -#define CURL_VERSION_CURLDEBUG (1<<13) /* Debug memory tracking supported */ +#define CURL_VERSION_CURLDEBUG (1<<13) /* Debug memory tracking supported + (deprecated) */ #define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */ #define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegation to winbind helper is supported */ diff --git a/lib/Makefile.am b/lib/Makefile.am index adffdb03521e..3887fd8a2658 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -66,9 +66,6 @@ LIBS = $(BLANK_AT_MAKETIME) if DEBUGBUILD AM_CPPFLAGS += -DDEBUGBUILD endif -if CURLDEBUG -AM_CPPFLAGS += -DCURLDEBUG -endif AM_CPPFLAGS += -DBUILDING_LIBCURL if DOING_NATIVE_WINDOWS diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c index 61c8b1881967..7a1d406bc784 100644 --- a/lib/curl_addrinfo.c +++ b/lib/curl_addrinfo.c @@ -485,7 +485,7 @@ struct Curl_addrinfo *Curl_unix2addr(const char *path, bool *longpath, } #endif -#if defined(CURLDEBUG) && defined(HAVE_GETADDRINFO) && \ +#if defined(CURL_MEMDEBUG) && defined(HAVE_GETADDRINFO) && \ defined(HAVE_FREEADDRINFO) /* * curl_dbg_freeaddrinfo() @@ -515,9 +515,9 @@ void curl_dbg_freeaddrinfo(struct addrinfo *freethis, freeaddrinfo(freethis); #endif } -#endif /* CURLDEBUG && HAVE_FREEADDRINFO */ +#endif /* CURL_MEMDEBUG && HAVE_FREEADDRINFO */ -#if defined(CURLDEBUG) && defined(HAVE_GETADDRINFO) +#if defined(CURL_MEMDEBUG) && defined(HAVE_GETADDRINFO) /* * curl_dbg_getaddrinfo() * @@ -553,7 +553,7 @@ int curl_dbg_getaddrinfo(const char *hostname, curl_dbg_log("ADDR %s:%d getaddrinfo() failed\n", source, line); return res; } -#endif /* CURLDEBUG && HAVE_GETADDRINFO */ +#endif /* CURL_MEMDEBUG && HAVE_GETADDRINFO */ #if defined(HAVE_GETADDRINFO) && defined(USE_RESOLVE_ON_IPS) /* diff --git a/lib/curl_addrinfo.h b/lib/curl_addrinfo.h index dedf1a6dbca5..63d3f7a2442c 100644 --- a/lib/curl_addrinfo.h +++ b/lib/curl_addrinfo.h @@ -79,13 +79,13 @@ struct Curl_addrinfo *Curl_unix2addr(const char *path, bool *longpath, bool abstract); #endif -#if defined(CURLDEBUG) && defined(HAVE_GETADDRINFO) && \ +#if defined(CURL_MEMDEBUG) && defined(HAVE_GETADDRINFO) && \ defined(HAVE_FREEADDRINFO) void curl_dbg_freeaddrinfo(struct addrinfo *freethis, int line, const char *source); #endif -#if defined(CURLDEBUG) && defined(HAVE_GETADDRINFO) +#if defined(CURL_MEMDEBUG) && defined(HAVE_GETADDRINFO) int curl_dbg_getaddrinfo(const char *hostname, const char *service, const struct addrinfo *hints, struct addrinfo **result, int line, diff --git a/lib/curl_setup.h b/lib/curl_setup.h index 2f3d9a6ba300..ff991a074bdf 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -953,7 +953,11 @@ extern curl_calloc_callback Curl_ccalloc; #include /* for CURL_EXTERN, curl_socket_t, mprintf.h */ -#ifdef CURLDEBUG +#ifdef DEBUGBUILD +#define CURL_MEMDEBUG +#endif + +#ifdef CURL_MEMDEBUG #ifdef __clang__ # define ALLOC_FUNC __attribute__((__malloc__)) # if __clang_major__ >= 4 @@ -1049,7 +1053,7 @@ CURL_EXTERN ALLOC_FUNC FILE *curl_dbg_fdopen(int filedes, const char *mode, curl_dbg_accept4(sock, addr, len, flags, __LINE__, __FILE__) #endif -#else /* !CURLDEBUG */ +#else /* !CURL_MEMDEBUG */ #define sclose(x) CURL_SCLOSE(x) #define fake_sclose(x) Curl_nop_stmt @@ -1065,11 +1069,11 @@ CURL_EXTERN ALLOC_FUNC FILE *curl_dbg_fdopen(int filedes, const char *mode, #define CURL_ACCEPT4 accept4 #endif -#endif /* CURLDEBUG */ +#endif /* CURL_MEMDEBUG */ /* Allocator macros */ -#ifdef CURLDEBUG +#ifdef CURL_MEMDEBUG #define curlx_strdup(ptr) curl_dbg_strdup(ptr, __LINE__, __FILE__) #define curlx_malloc(size) curl_dbg_malloc(size, __LINE__, __FILE__) @@ -1087,7 +1091,7 @@ CURL_EXTERN ALLOC_FUNC FILE *curl_dbg_fdopen(int filedes, const char *mode, #endif #endif /* _WIN32 */ -#else /* !CURLDEBUG */ +#else /* !CURL_MEMDEBUG */ #ifdef BUILDING_LIBCURL #define curlx_strdup(ptr) Curl_cstrdup(ptr) @@ -1115,7 +1119,7 @@ CURL_EXTERN ALLOC_FUNC FILE *curl_dbg_fdopen(int filedes, const char *mode, #endif #endif /* _WIN32 */ -#endif /* CURLDEBUG */ +#endif /* CURL_MEMDEBUG */ /* Some versions of the Android NDK is missing the declaration */ #if defined(HAVE_GETPWUID_R) && \ diff --git a/lib/curlx/fopen.c b/lib/curlx/fopen.c index e9eb6df3b09e..db4acb8ebc78 100644 --- a/lib/curlx/fopen.c +++ b/lib/curlx/fopen.c @@ -45,7 +45,7 @@ int curlx_fseek(void *stream, curl_off_t offset, int whence) #include "multibyte.h" #include "timeval.h" -#ifdef CURLDEBUG +#ifdef CURL_MEMDEBUG /* * Use system allocators to avoid infinite recursion when called by curl's * memory tracker memdebug functions. diff --git a/lib/curlx/fopen.h b/lib/curlx/fopen.h index 1e260f24353f..a395590d8e0f 100644 --- a/lib/curlx/fopen.h +++ b/lib/curlx/fopen.h @@ -61,7 +61,7 @@ int curlx_win32_rename(const char *oldpath, const char *newpath); #define curlx_rename rename #endif -#ifdef CURLDEBUG +#ifdef CURL_MEMDEBUG #define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__) #define curlx_freopen(file, mode, fh) \ curl_dbg_freopen(file, mode, fh, __LINE__, __FILE__) diff --git a/lib/fake_addrinfo.h b/lib/fake_addrinfo.h index db701be40aa4..07d5b6da8cdd 100644 --- a/lib/fake_addrinfo.h +++ b/lib/fake_addrinfo.h @@ -29,8 +29,8 @@ #include #endif -#if defined(CURLDEBUG) && defined(USE_ARES) && defined(HAVE_GETADDRINFO) && \ - (ARES_VERSION >= 0x011a00) /* >= 1.26.0 */ +#if defined(CURL_MEMDEBUG) && defined(HAVE_GETADDRINFO) && \ + defined(USE_ARES) && (ARES_VERSION >= 0x011a00) /* >= 1.26.0 */ #define USE_FAKE_GETADDRINFO 1 #endif diff --git a/lib/libcurl.rc b/lib/libcurl.rc index 1ceb4691fb84..81cd8d71b4e4 100644 --- a/lib/libcurl.rc +++ b/lib/libcurl.rc @@ -32,7 +32,7 @@ VS_VERSION_INFO VERSIONINFO FILEVERSION RC_VERSION PRODUCTVERSION RC_VERSION FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#if defined(DEBUGBUILD) || defined(UNITTESTS) || defined(CURLDEBUG) || defined(_DEBUG) +#if defined(DEBUGBUILD) || defined(UNITTESTS) || defined(_DEBUG) FILEFLAGS VS_FF_DEBUG #else FILEFLAGS 0L diff --git a/lib/memdebug.c b/lib/memdebug.c index 19f69805e1d9..2851bcefa9c6 100644 --- a/lib/memdebug.c +++ b/lib/memdebug.c @@ -23,7 +23,7 @@ ***************************************************************************/ #include "curl_setup.h" -#ifdef CURLDEBUG +#ifdef CURL_MEMDEBUG #include /* for offsetof() */ @@ -575,4 +575,4 @@ void curl_dbg_log(const char *format, ...) curl_dbg_unlock(was_locked); } -#endif /* CURLDEBUG */ +#endif /* CURL_MEMDEBUG */ diff --git a/lib/version.c b/lib/version.c index 1fb94bb9fc07..6949278f47d3 100644 --- a/lib/version.c +++ b/lib/version.c @@ -541,9 +541,6 @@ static const struct feat features_table[] = { #ifdef USE_TLS_SRP FEATURE("TLS-SRP", NULL, CURL_VERSION_TLSAUTH_SRP), #endif -#ifdef CURLDEBUG - FEATURE("TrackMemory", NULL, CURL_VERSION_CURLDEBUG), -#endif #if defined(_WIN32) && defined(UNICODE) && defined(_UNICODE) FEATURE("Unicode", NULL, CURL_VERSION_UNICODE), #endif @@ -690,6 +687,10 @@ curl_version_info_data *curl_version_info(CURLversion stamp) feature_names[n++] = p->name; } +#ifdef DEBUGBUILD + features |= CURL_VERSION_CURLDEBUG; /* for compatibility */ +#endif + feature_names[n] = NULL; /* Terminate array. */ version_info.features = features; diff --git a/m4/curl-confopts.m4 b/m4/curl-confopts.m4 index edcd103fba4f..c1da6b8c0f2a 100644 --- a/m4/curl-confopts.m4 +++ b/m4/curl-confopts.m4 @@ -101,56 +101,6 @@ AS_HELP_STRING([--disable-ares],[Disable c-ares for DNS lookups]), ]) -dnl CURL_CHECK_OPTION_CURLDEBUG -dnl ------------------------------------------------- -dnl Verify if configure has been invoked with option -dnl --enable-curldebug or --disable-curldebug, and set -dnl shell variable want_curldebug value as appropriate. - -AC_DEFUN([CURL_CHECK_OPTION_CURLDEBUG], [ - AC_MSG_CHECKING([whether to enable curl debug memory tracking]) - OPT_CURLDEBUG_BUILD="default" - AC_ARG_ENABLE(curldebug, -AS_HELP_STRING([--enable-curldebug],[Enable curl debug memory tracking]) -AS_HELP_STRING([--disable-curldebug],[Disable curl debug memory tracking]), - OPT_CURLDEBUG_BUILD=$enableval) - case "$OPT_CURLDEBUG_BUILD" in - no) - dnl --disable-curldebug option used - want_curldebug="no" - AC_MSG_RESULT([no]) - ;; - default) - dnl configure's curldebug option not specified. Initially we will - dnl handle this as a request to use the same setting as option - dnl --enable-debug. IOW, initially, for debug-enabled builds - dnl this will be handled as a request to enable curldebug if - dnl possible, and for debug-disabled builds this will be handled - dnl as a request to disable curldebug. - if test "$want_debug" = "yes"; then - AC_MSG_RESULT([(assumed) yes]) - else - AC_MSG_RESULT([no]) - fi - want_curldebug_assumed="yes" - want_curldebug="$want_debug" - ;; - *) - dnl --enable-curldebug option used. - dnl The use of this option value is a request to enable curl's - dnl debug memory tracking for the libcurl library. This can only - dnl be done when some requisites are simultaneously satisfied. - dnl Later on, these requisites are verified and if they are not - dnl fully satisfied the option will be ignored and act as if - dnl --disable-curldebug had been given setting shell variable - dnl want_curldebug to 'no'. - want_curldebug="yes" - AC_MSG_RESULT([yes]) - ;; - esac -]) - - dnl CURL_CHECK_OPTION_DEBUG dnl ------------------------------------------------- dnl Verify if configure has been invoked with option @@ -159,7 +109,6 @@ dnl variable want_debug value as appropriate. AC_DEFUN([CURL_CHECK_OPTION_DEBUG], [ AC_BEFORE([$0],[CURL_CHECK_OPTION_WARNINGS])dnl - AC_BEFORE([$0],[CURL_CHECK_OPTION_CURLDEBUG])dnl AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl AC_MSG_CHECKING([whether to enable debug build options]) OPT_DEBUG_BUILD="default" diff --git a/projects/OS400/curl.inc.in b/projects/OS400/curl.inc.in index 1fe5b07ebeef..de3d96c3ac05 100644 --- a/projects/OS400/curl.inc.in +++ b/projects/OS400/curl.inc.in @@ -117,7 +117,7 @@ d CURL_VERSION_CONV... d c X'00001000' d CURL_VERSION_CURLDEBUG... - d c X'00002000' + d c X'00002000' Deprecated d CURL_VERSION_TLSAUTH_SRP... d c X'00004000' d CURL_VERSION_NTLM_WB... diff --git a/src/Makefile.am b/src/Makefile.am index 49dc6693ccb0..50d282f651e4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -57,9 +57,6 @@ endif if DEBUGBUILD AM_CPPFLAGS += -DDEBUGBUILD endif -if CURLDEBUG -AM_CPPFLAGS += -DCURLDEBUG -endif if USE_UNICODE UNICODEFLAG = -municode diff --git a/src/curl.rc b/src/curl.rc index 389b483b4b99..3c5c8709d51a 100644 --- a/src/curl.rc +++ b/src/curl.rc @@ -32,7 +32,7 @@ VS_VERSION_INFO VERSIONINFO FILEVERSION RC_VERSION PRODUCTVERSION RC_VERSION FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#if defined(DEBUGBUILD) || defined(UNITTESTS) || defined(CURLDEBUG) || defined(_DEBUG) +#if defined(DEBUGBUILD) || defined(UNITTESTS) || defined(_DEBUG) FILEFLAGS VS_FF_DEBUG #else FILEFLAGS 0L diff --git a/src/curlinfo.c b/src/curlinfo.c index 3be2d8206d2e..b5626232e3dd 100644 --- a/src/curlinfo.c +++ b/src/curlinfo.c @@ -234,7 +234,7 @@ static const char *disabled[] = { #endif , "override-dns: " -#if defined(CURLDEBUG) && \ +#if defined(CURL_MEMDEBUG) && \ (defined(CURLRES_ARES) || defined(USE_FAKE_GETADDRINFO)) "ON" #else diff --git a/src/tool_libinfo.c b/src/tool_libinfo.c index 951706e21d02..634b8c4fe1fd 100644 --- a/src/tool_libinfo.c +++ b/src/tool_libinfo.c @@ -114,7 +114,6 @@ static struct feature_name_presentp { { "SSLS-EXPORT", &feature_ssls_export, 0 }, { "threadsafe", NULL, CURL_VERSION_THREADSAFE }, { "TLS-SRP", &feature_tls_srp, CURL_VERSION_TLSAUTH_SRP }, - { "TrackMemory", NULL, CURL_VERSION_CURLDEBUG }, { "Unicode", NULL, CURL_VERSION_UNICODE }, { "UnixSockets", NULL, CURL_VERSION_UNIX_SOCKETS }, { "zstd", &feature_zstd, CURL_VERSION_ZSTD }, diff --git a/src/tool_main.c b/src/tool_main.c index 2cb3fd647ce0..806fbd4c0e57 100644 --- a/src/tool_main.c +++ b/src/tool_main.c @@ -98,7 +98,7 @@ static int main_checkfds(void) #define main_checkfds() 0 #endif -#ifdef CURLDEBUG +#ifdef CURL_MEMDEBUG static void memory_tracking_init(void) { char *env; diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am index 7b99ba68e7a6..e174698a32d0 100644 --- a/tests/libtest/Makefile.am +++ b/tests/libtest/Makefile.am @@ -57,9 +57,6 @@ endif if DEBUGBUILD AM_CPPFLAGS += -DDEBUGBUILD endif -if CURLDEBUG -AM_CPPFLAGS += -DCURLDEBUG -endif if USE_CPPFLAG_CURL_STATICLIB curlx_c_lib = diff --git a/tests/libtest/first.c b/tests/libtest/first.c index dd26a146a423..0a5ee2047f2f 100644 --- a/tests/libtest/first.c +++ b/tests/libtest/first.c @@ -122,7 +122,7 @@ int cgetopt(int argc, const char * const argv[], const char *optstring) } } -#ifdef CURLDEBUG +#ifdef CURL_MEMDEBUG static void memory_tracking_init(void) { const char *env; diff --git a/tests/runtests.pl b/tests/runtests.pl index e8297137c1e4..010acb086e21 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -656,8 +656,8 @@ sub checksystemfeatures { elsif($_ =~ /^Features: (.*)/i) { $feat = $1; - # built with memory tracking support (--enable-curldebug); may be disabled later - $feature{"TrackMemory"} = $feat =~ /TrackMemory/i; + # built with memory tracking support (--enable-debug); may be disabled later + $feature{"TrackMemory"} = $feat =~ /Debug/i; # curl was built with --enable-debug $feature{"Debug"} = $feat =~ /Debug/i; # ssl enabled @@ -846,7 +846,7 @@ sub checksystemfeatures { if($torture && !$feature{"TrackMemory"}) { die "cannot run torture tests since curl was built without ". - "TrackMemory feature (--enable-curldebug)"; + "TrackMemory feature (--enable-debug)"; } my $hostname=join(' ', runclientoutput("hostname")); diff --git a/tests/tunit/Makefile.am b/tests/tunit/Makefile.am index 219b7a10579c..ac7e31adee38 100644 --- a/tests/tunit/Makefile.am +++ b/tests/tunit/Makefile.am @@ -54,9 +54,6 @@ AM_CPPFLAGS += -DCURL_STATICLIB -DUNITTESTS if DEBUGBUILD AM_CPPFLAGS += -DDEBUGBUILD endif -if CURLDEBUG -AM_CPPFLAGS += -DCURLDEBUG -endif if BUILD_UNITTESTS $(BUNDLE).c: $(top_srcdir)/scripts/mk-unity.pl Makefile.inc $(FIRST_C) $(TESTS_C) diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index 32c2f3895594..5c87bf9ae5de 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -53,9 +53,6 @@ AM_CPPFLAGS += -DCURL_STATICLIB -DUNITTESTS if DEBUGBUILD AM_CPPFLAGS += -DDEBUGBUILD endif -if CURLDEBUG -AM_CPPFLAGS += -DCURLDEBUG -endif # unit tests are small pretend-libcurl-programs, pass BUILDING_LIBCURL to reflect that AM_CPPFLAGS += -DBUILDING_LIBCURL