]> git.feebdaed.xyz Git - 0xmirror/curl.git/commit
binmode: convert to macro and use it from tests
authorViktor Szakats <commit@vsz.me>
Wed, 27 Nov 2024 12:52:30 +0000 (13:52 +0100)
committerViktor Szakats <commit@vsz.me>
Sat, 21 Dec 2024 12:29:24 +0000 (13:29 +0100)
commit250d613763dfc29f73010696ee7948f19d07dba9
treec83ab3fc8343c5f78cc5a26dd58fac1e5300f47f
parent3428b8ad1c67bcb0098542f99de0ca0d7e024309
binmode: convert to macro and use it from tests

And use it from src and tests.

Syncing this functionality between platforms and build targets.

Also: Stop redefining `O_BINARY` in src, and use a local macro with
the same effect. `O_BINARY` is used in `CURL_SET_BINMODE()` to decide
if this functionality is supported, and redefining it makes this check
pass always in unity builds. The check is required for Apple OS, because
it offers a `setmode()` function, successfully detected by both CMake
and autotools, but that function has a different functionality and
signature than that expected by `CURL_SET_BINMODE()`.

Also:
- drop MetaWare High C (MS-DOS) support for set binmode.
- tests/libtest/Makefile.inc: dedupe comments.
- lib/curl_setup_once.h: tidy up feature guards for `io.h`, `fcntl.h`.

Ref: #15652
Closes #15787
18 files changed:
lib/curl_setup_once.h
packages/vms/gnv_link_curl.com
src/Makefile.inc
src/tool_binmode.c [deleted file]
src/tool_binmode.h
src/tool_cb_wrt.c
src/tool_formparse.c
src/tool_getparam.c
src/tool_operate.c
tests/libtest/CMakeLists.txt
tests/libtest/Makefile.am
tests/libtest/Makefile.inc
tests/libtest/first.c
tests/server/CMakeLists.txt
tests/server/Makefile.am
tests/server/mqttd.c
tests/server/sockfilt.c
tests/server/socksd.c