aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES3
-rw-r--r--RELEASE-NOTES3
-rw-r--r--configure.ac3
-rw-r--r--lib/strequal.c6
-rw-r--r--src/config-win32.h3
-rw-r--r--src/main.c6
6 files changed, 18 insertions, 6 deletions
diff --git a/CHANGES b/CHANGES
index b89f3a8d1..e084e3abc 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,9 @@
Changelog
+Daniel S (1 April 2007)
+- Matt Kraai provided a patch that makes curl build on QNX 6 fine again.
+
Daniel S (31 March 2007)
- Fixed several minor issues detected by the coverity.com scanner.
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index fcb0e7f37..e3b9521ff 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -70,6 +70,7 @@ advice from friends like these:
Rob Crittenden, Robert A. Monat, Dan Fandrich, Duncan Mac-Vicar Prett,
Michal Marek, Robson Braga Araujo, Ian Turner, Linus Nielsen Feltzing,
Ravi Pratap, Adam D. Moss, Jose Kahan, Hang Kin Lau, Justin Fletcher,
- Robert Iakobashvili, Bryan Henderson, Eygene Ryabinkin, Daniel Johnson
+ Robert Iakobashvili, Bryan Henderson, Eygene Ryabinkin, Daniel Johnson,
+ Matt Kraai
Thanks! (and sorry if I forgot to mention someone)
diff --git a/configure.ac b/configure.ac
index 31edb8f04..058007975 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1850,7 +1850,8 @@ AC_CHECK_FUNCS( strtoll \
getprotobyname \
getrlimit \
setrlimit \
- fork,
+ fork \
+ setmode,
dnl if found
[],
dnl if not found, $ac_func is the name we check for
diff --git a/lib/strequal.c b/lib/strequal.c
index 1bff429a7..cb8767002 100644
--- a/lib/strequal.c
+++ b/lib/strequal.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -26,6 +26,10 @@
#include <string.h>
#include <ctype.h>
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+
#include "strequal.h"
#if defined(HAVE_STRCASECMP) && defined(__STRICT_ANSI__)
diff --git a/src/config-win32.h b/src/config-win32.h
index 047f28e85..6e0380a3b 100644
--- a/src/config-win32.h
+++ b/src/config-win32.h
@@ -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
diff --git a/src/main.c b/src/main.c
index 391288708..48a74bee4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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 */