#
e9eda865 |
| 04-Oct-2024 |
Daniel Stenberg |
warnless: remove curlx_sktosi and curlx_sitosk They were only used by test server code. Use plain old typecasts there. Closes #15153
|
#
bc2f72b9 |
| 12-Sep-2024 |
Viktor Szakats |
tidy-up: rename `CURL_WINDOWS_APP` to `CURL_WINDOWS_UWP` Rename internal macro to make its purpose more obvious. After this patch `grep -i uwp` shows all the code related to UWP.
tidy-up: rename `CURL_WINDOWS_APP` to `CURL_WINDOWS_UWP` Rename internal macro to make its purpose more obvious. After this patch `grep -i uwp` shows all the code related to UWP. Ref: https://curl.se/mail/lib-2024-09/0014.html Closes #14881
show more ...
|
#
fbf5d507 |
| 18-Sep-2024 |
Daniel Stenberg |
lib/src: white space edits to comply better with code style ... as checksrc now finds and complains about these. Closes #14921
|
#
8ad3597d |
| 18-Sep-2024 |
Stefan Eissing |
tests: testrunner reliability improvements - perform torture tests with '-j2' for shorter runtime - when waiting on test results overly long, log the tests waited for and eventuall
tests: testrunner reliability improvements - perform torture tests with '-j2' for shorter runtime - when waiting on test results overly long, log the tests waited for and eventually log the test log directories for easier analysis what is wrong in CI jobs. - sockfilt.c: treat the windows errno 109 (ERROR_BROKEN_PIPE) as a socket closed by the client and do not exit. - when verifying https server, do not in addition check the http server behind it also - when tearing down the stunnel of a non-responsive https server, tear down the http server with it Closes #14960
show more ...
|
#
4ff04615 |
| 02-Sep-2024 |
Daniel Stenberg |
lib: use FMT_ as prefix instead of CURL_FORMAT_ For printf format defines used internally. Makes the code slighly easier to read. Closes #14764
|
#
c0450488 |
| 21-Aug-2024 |
Viktor Szakats |
src: fix potential macro confusion in cmake unity builds Sources used `lib/curlx.h` with both `ENABLE_CURLX_PRINTF` set and unset before including it. In a cmake "unity" batch w
src: fix potential macro confusion in cmake unity builds Sources used `lib/curlx.h` with both `ENABLE_CURLX_PRINTF` set and unset before including it. In a cmake "unity" batch where the first included source had it unset, the next sources did not get the macros requested with `ENABLE_CURLX_PRINTF` because `lib/curl.x` had already been included without them. Fix it by by making the macros enabled permanently and globally for internal sources, and dropping `ENABLE_CURLX_PRINTF`. This came up while testing unity builds with smaller batches. The full, default unity build where all `src` is bundled up in a single unit, was not affected. Fixes: ``` $ cmake -B build -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=15 $ make -C build ... curl/src/tool_getparam.c: In function ‘getparameter’: curl/src/tool_getparam.c:2409:11: error: implicit declaration of function ‘msnprintf’; did you mean ‘vsnprintf’? [-Wimplicit-function-declaration] 2409 | msnprintf(buffer, sizeof(buffer), "%" CURL_FORMAT_CURL_OFF_T "-", | ^~~~~~~~~ | vsnprintf curl/src/tool_getparam.c:2409:11: warning: nested extern declaration of ‘msnprintf’ [-Wnested-externs] [...] ``` Reported-by: Daniel Stenberg Bug: https://github.com/curl/curl/pull/14626#issuecomment-2301663491 Closes #14632
show more ...
|
#
f81f351b |
| 02-Aug-2024 |
Viktor Szakats |
tidy-up: OS names Use these words and casing more consistently across text, comments and one curl tool output: AIX, ALPN, ANSI, BSD, Cygwin, Darwin, FreeBSD, GitHub, HP-UX, Linux,
tidy-up: OS names Use these words and casing more consistently across text, comments and one curl tool output: AIX, ALPN, ANSI, BSD, Cygwin, Darwin, FreeBSD, GitHub, HP-UX, Linux, macOS, MS-DOS, MSYS, MinGW, NTLM, POSIX, Solaris, UNIX, Unix, Unicode, WINE, WebDAV, Win32, winbind, WinIDN, Windows, Windows CE, Winsock. Mostly OS names and a few more. Also a couple of other minor text fixups. Closes #14360
show more ...
|
#
998b17ea |
| 03-Jun-2024 |
Viktor Szakats |
windows: fix UWP builds, add GHA job Add new job to test building for UWP (aka `CURL_WINDOWS_APP`). Fix fallouts when building for UWP: - rand: do not use `BCryptGenRandom()`.
windows: fix UWP builds, add GHA job Add new job to test building for UWP (aka `CURL_WINDOWS_APP`). Fix fallouts when building for UWP: - rand: do not use `BCryptGenRandom()`. - cmake: disable using win32 LDAP. - cmake: disable telnet. - version_win32: fix code before declaration. - schannel: disable `HAS_MANUAL_VERIFY_API`. - schannel: disable `SSLSUPP_PINNEDPUBKEY` and make `schannel_checksum()` a stub. Ref: e178fbd40a896f2098278ae61e1166c88e7b31d0 #1429 - schannel: make `cert_get_name_string()` a failing stub. - system_win32: make `Curl_win32_impersonating()` a failing stub. - system_win32: try to fix `Curl_win32_init()` (untested). - threads: fix to use `CreateThread()`. - src: disable searching `PATH` for the CA bundle. - src: disable bold text support and capability detection. - src: disable `getfiletime()`/`setfiletime()`. - tests: make `win32_load_system_library()` a failing stub. - tests/server/util: make it compile. - tests/server/sockfilt: make it compile. - tests/lib3026: fix to use `CreateThread()`. See individual commits for build error details. Some of these fixes may have better solutions, and some may not work as expected. The goal of this patch is to make curl build for UWP. Closes #13870
show more ...
|
#
4a7bb40d |
| 04-Jun-2024 |
Dan Fandrich |
tests: don't log buffer length in throwing away message It's not available at that point, and it will be written in the non-error case right afterward.
|
#
bc21c505 |
| 03-Jun-2024 |
Dan Fandrich |
tests: log "Throwing away" messages before throwing away In case the read that follows hangs we'll get a clue as to what it was doing.
|
#
0c49ea4f |
| 12-May-2024 |
Viktor Szakats |
tests: tidy up types in server code Cherry-picked from #13489 Closes #13610
|
#
e411c98f |
| 11-Apr-2024 |
Viktor Szakats |
build: prefer `USE_IPV6` macro internally (was: `ENABLE_IPV6`) Before this patch, two macros were used to guard IPv6 features in curl sources: `ENABLE_IPV6` and `USE_IPV6`. This patch ma
build: prefer `USE_IPV6` macro internally (was: `ENABLE_IPV6`) Before this patch, two macros were used to guard IPv6 features in curl sources: `ENABLE_IPV6` and `USE_IPV6`. This patch makes the source use the latter for consistency with other similar switches. `-DENABLE_IPV6` remains accepted for compatibility as a synonym for `-DUSE_IPV6`, when passed to the compiler. `ENABLE_IPV6` also remains the name of the CMake and `Makefile.vc` options to control this feature. Closes #13349
show more ...
|
#
2cd78f52 |
| 29-Feb-2024 |
RainRat |
misc: Fix typos in docs and lib This fixes miscellaneous typos and duplicated words in the docs, lib and test comments and a few user facing errorstrings. Author: RainRat on Git
misc: Fix typos in docs and lib This fixes miscellaneous typos and duplicated words in the docs, lib and test comments and a few user facing errorstrings. Author: RainRat on Github Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Reviewed-by: Dan Fandrich <dan@coneharvesters.com> Closes: #13019
show more ...
|
#
3829759b |
| 08-Dec-2023 |
Viktor Szakats |
build: enable missing OpenSSF-recommended warnings, with fixes https://best.openssf.org/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.html as of 2023-11-29 [1]
build: enable missing OpenSSF-recommended warnings, with fixes https://best.openssf.org/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.html as of 2023-11-29 [1]. Enable new recommended warnings (except `-Wsign-conversion`): - enable `-Wformat=2` for clang (in both cmake and autotools). - add `CURL_PRINTF()` internal attribute and mark functions accepting printf arguments with it. This is a copy of existing `CURL_TEMP_PRINTF()` but using `__printf__` to make it compatible with redefinting the `printf` symbol: https://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc_5.html#SEC94 - fix `CURL_PRINTF()` and existing `CURL_TEMP_PRINTF()` for mingw-w64 and enable it on this platform. - enable `-Wimplicit-fallthrough`. - enable `-Wtrampolines`. - add `-Wsign-conversion` commented with a FIXME. - cmake: enable `-pedantic-errors` the way we do it with autotools. Follow-up to d5c0351055d5709da8f3e16c91348092fdb481aa #2747 - lib/curl_trc.h: use `CURL_FORMAT()`, this also fixes it to enable format checks. Previously it was always disabled due to the internal `printf` macro. Fix them: - fix bug where an `set_ipv6_v6only()` call was missed in builds with `--disable-verbose` / `CURL_DISABLE_VERBOSE_STRINGS=ON`. - add internal `FALLTHROUGH()` macro. - replace obsolete fall-through comments with `FALLTHROUGH()`. - fix fallthrough markups: Delete redundant ones (showing up as warnings in most cases). Add missing ones. Fix indentation. - silence `-Wformat-nonliteral` warnings with llvm/clang. - fix one `-Wformat-nonliteral` warning. - fix new `-Wformat` and `-Wformat-security` warnings. - fix `CURL_FORMAT_SOCKET_T` value for mingw-w64. Also move its definition to `lib/curl_setup.h` allowing use in `tests/server`. - lib: fix two wrongly passed string arguments in log outputs. Co-authored-by: Jay Satiro - fix new `-Wformat` warnings on mingw-w64. [1] https://github.com/ossf/wg-best-practices-os-developers/blob/56c0fde3895bfc55c8a973ef49a2572c507b2ae1/docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C%2B%2B.md Closes #12489
show more ...
|
#
e9a7d4a1 |
| 21-Nov-2023 |
Viktor Szakats |
windows: use built-in `_WIN32` macro to detect Windows Windows compilers define `_WIN32` automatically. Windows SDK headers or build env defines `WIN32`, or we have to take care of it. T
windows: use built-in `_WIN32` macro to detect Windows Windows compilers define `_WIN32` automatically. Windows SDK headers or build env defines `WIN32`, or we have to take care of it. The agreement seems to be that `_WIN32` is the preferred practice here. Make the source code rely on that to detect we're building for Windows. Public `curl.h` was using `WIN32`, `__WIN32__` and `CURL_WIN32` for Windows detection, next to the official `_WIN32`. After this patch it only uses `_WIN32` for this. Also, make it stop defining `CURL_WIN32`. There is a slight chance these break compatibility with Windows compilers that fail to define `_WIN32`. I'm not aware of any obsolete or modern compiler affected, but in case there is one, one possible solution is to define this macro manually. grepping for `WIN32` remains useful to discover Windows-specific code. Also: - extend `checksrc` to ensure we're not using `WIN32` anymore. - apply minor formatting here and there. - delete unnecessary checks for `!MSDOS` when `_WIN32` is present. Co-authored-by: Jay Satiro Reviewed-by: Daniel Stenberg Closes #12376
show more ...
|
#
f6513b99 |
| 07-Oct-2023 |
Dan Fandrich |
tests: fix a race condition in ftp server disconnect If a client disconnected and reconnected quickly, before the ftp server had a chance to respond, the protocol message/ack (ping/pong)
tests: fix a race condition in ftp server disconnect If a client disconnected and reconnected quickly, before the ftp server had a chance to respond, the protocol message/ack (ping/pong) sequence got out of sync, causing messages sent to the old client to be delivered to the new. A disconnect must now be acknowledged and intermediate requests thrown out until it is, which ensures that such synchronization problems can't occur. This problem could affect ftp, pop3, imap and smtp tests. Fixes #12002 Closes #12049
show more ...
|
#
96c29900 |
| 25-Sep-2023 |
Viktor Szakats |
build: delete checks for C89 standard headers Delete checks and guards for standard C89 headers and assume these are available: `stdio.h`, `string.h`, `time.h`, `setjmp.h`, `stdlib.h`,
build: delete checks for C89 standard headers Delete checks and guards for standard C89 headers and assume these are available: `stdio.h`, `string.h`, `time.h`, `setjmp.h`, `stdlib.h`, `stddef.h`, `signal.h`. Some of these we already used unconditionally, some others we only used for feature checks. Follow-up to 9c7165e96a3a9a2d0b7059c87c699b5ca8cdae93 #11918 (for `stdio.h` in CMake) Closes #11940
show more ...
|
#
38029101 |
| 08-Aug-2023 |
Viktor Szakats |
mingw: delete support for legacy mingw.org toolchain Drop support for "old" / "legacy" / "classic" / "v1" / "mingw32" MinGW: https://en.wikipedia.org/wiki/MinGW, https://osdn.net/proje
mingw: delete support for legacy mingw.org toolchain Drop support for "old" / "legacy" / "classic" / "v1" / "mingw32" MinGW: https://en.wikipedia.org/wiki/MinGW, https://osdn.net/projects/mingw/ Its homepage used to be http://mingw.org/ [no HTTPS], and broken now. It supported the x86 CPU only and used a old Windows API header and implib set, often causing issues. It also misses most modern Windows features, offering old versions of both binutils and gcc (no llvm/clang support). It was last updated 2 years ago. curl now relies on toolchains based on the mingw-w64 project: https://www.mingw-w64.org/ https://sourceforge.net/projects/mingw-w64/ https://www.msys2.org/ https://github.com/msys2/msys2 https://github.com/mstorsjo/llvm-mingw (Also available via Linux and macOS package managers.) Closes #11625
show more ...
|
#
b65086a8 |
| 07-Jun-2023 |
Dan Fandrich |
tests: fix error messages & handling around sockets The wrong error code was checked on Windows on UNIX socket failures, which could have caused all UNIX sockets to be reported as having
tests: fix error messages & handling around sockets The wrong error code was checked on Windows on UNIX socket failures, which could have caused all UNIX sockets to be reported as having errored and the tests therefore skipped. Also, a useless error message was displayed on socket errors in many test servers on Windows because strerror() doesn't work on WinSock error codes; perror() is overridden there to work on all errors and is used instead. Ref #11258 Closes #11265
show more ...
|
#
2bc1d775 |
| 02-Jan-2023 |
Daniel Stenberg |
copyright: update all copyright lines and remove year ranges - they are mostly pointless in all major jurisdictions - many big corporations and projects already don't use them - save
copyright: update all copyright lines and remove year ranges - they are mostly pointless in all major jurisdictions - many big corporations and projects already don't use them - saves us from pointless churn - git keeps history for us - the year range is kept in COPYING checksrc is updated to allow non-year using copyright statements Closes #10205
show more ...
|
#
81094cb4 |
| 11-Oct-2022 |
Marc Hoersken |
tests: avoid CreateThread if _beginthreadex is available CreateThread is not threadsafe if mixed with CRT calls. _beginthreadex on the other hand can be mixed with CRT. Reviewed
tests: avoid CreateThread if _beginthreadex is available CreateThread is not threadsafe if mixed with CRT calls. _beginthreadex on the other hand can be mixed with CRT. Reviewed-by: Marcel Raad Closes #9705
show more ...
|
#
91948a9e |
| 16-Jun-2022 |
Marc Hoersken |
tests/server/sockfilt.c: avoid race condition without a mutex Avoid loosing any triggered handles by first aborting and joining the waiting threads before evaluating the individual signa
tests/server/sockfilt.c: avoid race condition without a mutex Avoid loosing any triggered handles by first aborting and joining the waiting threads before evaluating the individual signal state. This removes the race condition and therefore need for a mutex. Closes #9023
show more ...
|
#
ad9bc597 |
| 17-May-2022 |
max.mehl |
copyright: make repository REUSE compliant Add licensing and copyright information for all files in this repository. This either happens in the file itself as a comment header or in the
copyright: make repository REUSE compliant Add licensing and copyright information for all files in this repository. This either happens in the file itself as a comment header or in the file `.reuse/dep5`. This commit also adds a Github workflow to check pull requests and adapts copyright.pl to the changes. Closes #8869
show more ...
|
#
4ec0549c |
| 25-Apr-2022 |
Daniel Stenberg |
misc: update copyright year ranges
|
Revision tags: curl-7_76_1, curl-7_76_0, curl-7_75_0, curl-7_74_0, curl-7_73_0 |
|
#
68035af2 |
| 29-Aug-2020 |
Marc Hoersken |
timediff.[ch]: add curlx helper functions for timeval conversions Also move timediff_t definitions from timeval.h to timediff.h and then make timeval.h include the new standalone-capable
timediff.[ch]: add curlx helper functions for timeval conversions Also move timediff_t definitions from timeval.h to timediff.h and then make timeval.h include the new standalone-capable timediff.h. Reviewed-by: Jay Satiro Reviewed-by: Daniel Stenberg Supersedes #5888 Closes #8595
show more ...
|