mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:33:44 +03:00
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
This commit is contained in:
parent
3428b8ad1c
commit
250d613763
18 changed files with 63 additions and 125 deletions
|
|
@ -106,7 +106,7 @@ static struct tool_mime *tool_mime_new_filedata(struct tool_mime *parent,
|
|||
curl_off_t origin;
|
||||
struct_stat sbuf;
|
||||
|
||||
set_binmode(stdin);
|
||||
CURL_SET_BINMODE(stdin);
|
||||
origin = ftell(stdin);
|
||||
/* If stdin is a regular file, do not buffer data but read it
|
||||
when needed. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue