]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Matt Kraai provided a patch that makes curl build on QNX 6 fine again. Mostly
authorDaniel Stenberg <daniel@haxx.se>
Sun, 1 Apr 2007 07:51:30 +0000 (07:51 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 1 Apr 2007 07:51:30 +0000 (07:51 +0000)
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.

CHANGES
RELEASE-NOTES
configure.ac
lib/strequal.c
src/config-win32.h
src/main.c

diff --git a/CHANGES b/CHANGES
index b89f3a8d17f609bf2f4bacd79776fcf973215ca4..e084e3abc74cd252271a1fbda60c2e4a6dd77142 100644 (file)
--- 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.
 
index fcb0e7f370b266e4740ead8435ed3d7b398cdfda..e3b9521fff4f4a46bfd9a9930873f88bf9b769fb 100644 (file)
@@ -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)
index 31edb8f04d4f15053ad8ccc7b06a98e2a17d9f3d..0580079750c72ec4842f0177de14ec22854cd307 100644 (file)
@@ -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
index 1bff429a7e8b608eb269230cd9b2fda8d6be1258..cb87670023a2e38ab5742d99c3077a00e403549e 100644 (file)
@@ -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
 #include <string.h>
 #include <ctype.h>
 
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+
 #include "strequal.h"
 
 #if defined(HAVE_STRCASECMP) && defined(__STRICT_ANSI__)
index 047f28e85f17a8a4193f9ecbeb9df33ed3b4cef3..6e0380a3be2781c926bd2c2a019ebe7375b265f0 100644 (file)
@@ -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
 
index 391288708a631602040fd9f223efaac2d1dade60..48a74bee45d8231f77a0fc8eb8aff5aa51d6fe91 100644 (file)
@@ -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 */