mirror of
https://github.com/curl/curl.git
synced 2026-07-26 07:47:33 +03:00
Matt Kraai provided a patch that makes curl build on QNX 6 fine again. Mostly
by letting configure check for setmode and ifdef on HAVE_SETMODE. NOTE: non- configure platforms that havve setmode() needs their hard-coded config.h files fixed. I fixed the src/config-win32.h.
This commit is contained in:
parent
ef10eaeb29
commit
5e7164f87a
6 changed files with 18 additions and 6 deletions
|
|
@ -72,6 +72,9 @@
|
|||
/* FUNCTIONS */
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
/* Define if you have the setmode function. */
|
||||
#define HAVE_SETMODE 1
|
||||
|
||||
/* Define if you have the ftruncate function. */
|
||||
#define HAVE_FTRUNCATE 1
|
||||
|
||||
|
|
|
|||
|
|
@ -2014,7 +2014,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||
|
||||
if(curlx_strequal("-", nextarg)) {
|
||||
file = stdin;
|
||||
#ifdef O_BINARY
|
||||
#if defined(O_BINARY) && defined(HAVE_SETMODE)
|
||||
if(subletter == 'b') /* forced binary */
|
||||
setmode(fileno(stdin), O_BINARY);
|
||||
#endif
|
||||
|
|
@ -3966,7 +3966,7 @@ operate(struct Configurable *config, int argc, char *argv[])
|
|||
|
||||
}
|
||||
else if(uploadfile && curlx_strequal(uploadfile, "-")) {
|
||||
#ifdef O_BINARY
|
||||
#if defined(O_BINARY) && defined(HAVE_SETMODE)
|
||||
setmode(fileno(stdin), O_BINARY);
|
||||
#endif
|
||||
infd = stdin;
|
||||
|
|
@ -4029,7 +4029,7 @@ operate(struct Configurable *config, int argc, char *argv[])
|
|||
if(!config->errors)
|
||||
config->errors = stderr;
|
||||
|
||||
#ifdef O_BINARY
|
||||
#if defined(O_BINARY) && defined(HAVE_SETMODE)
|
||||
if(!outfile && !(config->conf & CONF_GETTEXT)) {
|
||||
/* We get the output to stdout and we have not got the ASCII/text flag,
|
||||
then set stdout to be binary */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue