diff --git a/build.sh b/build.sh index 9a785b9..69b7a45 100644 --- a/build.sh +++ b/build.sh @@ -235,6 +235,7 @@ sed -i -E 's/\bmain[[:space:]]*\(([^\(\)]*)\)/wmain(\1)/g' configure patch -p1 -b < "${BASE_DIR}/patch/curl_getenv.diff" patch -p1 -b < "${BASE_DIR}/patch/curl_threads.diff" patch -p1 -b < "${BASE_DIR}/patch/curl_tool_doswin.diff" +patch -p1 -b < "${BASE_DIR}/patch/curl_tool_getparam.diff" patch -p1 -b < "${BASE_DIR}/patch/curl_tool_parsecfg.diff" CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -I${LIBS_DIR}/include" CPPFLAGS="-DNDEBUG -D_WIN32_WINNT=0x0501 -DNGHTTP2_STATICLIB -DNGHTTP3_STATICLIB -DNGTCP2_STATICLIB -DUNICODE -D_UNICODE" LDFLAGS="-municode -mconsole -Wl,--trace -static -no-pthread -L${LIBS_DIR}/lib" LIBS="-liconv -lcrypt32 -lwinmm" PKG_CONFIG_PATH="${LIBS_DIR}/lib/pkgconfig" ./configure --enable-static --disable-shared --disable-pthreads --disable-libcurl-option --disable-openssl-auto-load-config --with-zlib --with-zstd --with-brotli --with-openssl --with-librtmp --with-libssh2 --with-nghttp2="${LIBS_DIR}" --with-ngtcp2="${LIBS_DIR}" --with-nghttp3="${LIBS_DIR}" --with-libidn2 --with-gsasl --without-ca-bundle make V=1 diff --git a/patch/curl_tool_doswin.diff b/patch/curl_tool_doswin.diff index 1a997b6..486f66c 100644 --- a/patch/curl_tool_doswin.diff +++ b/patch/curl_tool_doswin.diff @@ -67,4 +67,4 @@ index e9347d2..558d15d 100644 + config->cacert = cacert; } } - \ No newline at end of file + diff --git a/patch/curl_tool_getparam.diff b/patch/curl_tool_getparam.diff new file mode 100644 index 0000000..3f0ba37 --- /dev/null +++ b/patch/curl_tool_getparam.diff @@ -0,0 +1,21 @@ + src/tool_getparam.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/tool_getparam.c b/src/tool_getparam.c +index 6d6cac3..de02cfd 100644 +--- a/src/tool_getparam.c ++++ b/src/tool_getparam.c +@@ -552,8 +552,13 @@ static void cleanarg(argv_item_t str) + * argument out so that the username:password isn't displayed in the + * system process list */ + if(str) { ++#ifdef _UNICODE ++ size_t len = wcslen(str); ++ wmemset(str, L' ', len); ++#else + size_t len = strlen(str); + memset(str, ' ', len); ++#endif + } + } + #else