cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Error compiling curl-7.9.6-pre5 with VC

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 14 Apr 2002 19:26:44 +0200 (MET DST)

On Sun, 14 Apr 2002, Bjorn Reese wrote:

> Check for __STDC__ or _MSC_VER

Ok, so can a MSVC compiling guy out there please try this patch (for
include/curl/curl.h) and let us know if it makes things (7.9.6-pre5) work
better again?

diff -u -r1.137 curl.h
--- curl.h 12 Apr 2002 11:39:27 -0000 1.137
+++ curl.h 14 Apr 2002 17:25:04 -0000
@@ -209,7 +209,7 @@
 #ifdef CINIT
 #undef CINIT
 #endif
-#ifdef __STDC__
+#if defined(__STDC__) || defined(_MSC_VER)
 #define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type +
number
 #else
 /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
@@ -595,7 +595,8 @@
 #ifdef CFINIT
 #undef CFINIT
 #endif
-#ifdef __STDC__
+
+#if defined(__STDC__) || defined(_MSC_VER)
 #define CFINIT(name) CURLFORM_ ## name
 #else
 /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-04-14