mirror of
https://github.com/curl/curl.git
synced 2026-08-26 09:33:33 +03:00
tidy-up: extend CURL_O_BINARY to lib and tests
Move `CURL_O_BINARY` definition from src to lib and use it from lib and tests code. Closes #16009
This commit is contained in:
parent
c5bb4e77e4
commit
f07612cd9a
5 changed files with 14 additions and 29 deletions
|
|
@ -454,11 +454,7 @@ static ssize_t write_behind(struct testcase *test, int convert)
|
|||
if(!test->ofile) {
|
||||
char outfile[256];
|
||||
msnprintf(outfile, sizeof(outfile), "%s/upload.%ld", logdir, test->testno);
|
||||
#ifdef _WIN32
|
||||
test->ofile = open(outfile, O_CREAT|O_RDWR|O_BINARY, 0777);
|
||||
#else
|
||||
test->ofile = open(outfile, O_CREAT|O_RDWR, 0777);
|
||||
#endif
|
||||
test->ofile = open(outfile, O_CREAT|O_RDWR|CURL_O_BINARY, 0777);
|
||||
if(test->ofile == -1) {
|
||||
logmsg("Couldn't create and/or open file %s for upload!", outfile);
|
||||
return -1; /* failure! */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue