diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-04-04 10:07:01 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-04-04 10:07:01 +0000 |
commit | ea1f138c081416869e26c00712adfa7db9df6030 (patch) | |
tree | a766a1dac7cd6ad0377b8200331176d7c97d1ad5 /include | |
parent | d560207ea183a051b86c9e01b3ec4c6490cde4e7 (diff) |
Jonatan Lander's fix to compile properly on pre-ISO compilers (without the
## operator)
Diffstat (limited to 'include')
-rw-r--r-- | include/curl/curl.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/include/curl/curl.h b/include/curl/curl.h index 4df59cd31..296f2e99b 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -178,19 +178,27 @@ typedef enum { #define CURL_ERROR_SIZE 256 +/* long may be 32 or 64 bits, but we should never depend on anything else + but 32 */ +#define CURLOPTTYPE_LONG 0 +#define CURLOPTTYPE_OBJECTPOINT 10000 +#define CURLOPTTYPE_FUNCTIONPOINT 20000 + /* name is uppercase CURLOPT_<name>, type is one of the defined CURLOPTTYPE_<type> number is unique identifier */ #ifdef CINIT #undef CINIT #endif +#ifdef __STDC__ #define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number - -/* long may be 32 or 64 bits, but we should never depend on anything else - but 32 */ -#define CURLOPTTYPE_LONG 0 -#define CURLOPTTYPE_OBJECTPOINT 10000 -#define CURLOPTTYPE_FUNCTIONPOINT 20000 +#else +/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ +#define LONG CURLOPTTYPE_LONG +#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT +#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT +#define CINIT(name,type,number) CURLOPT_/**/name = type + number +#endif typedef enum { CINIT(NOTHING, LONG, 0), /********* the first one is unused ************/ @@ -562,7 +570,12 @@ int curl_formparse(char *, struct curl_httppost **, #ifdef CFINIT #undef CFINIT #endif +#ifdef __STDC__ #define CFINIT(name) CURLFORM_ ## name +#else +/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ +#define CFINIT(name) CURLFORM_/**/name +#endif typedef enum { CFINIT(NOTHING), /********* the first one is unused ************/ @@ -624,7 +637,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.6-pre1" +#define LIBCURL_VERSION "7.9.6-pre2" #define LIBCURL_VERSION_NUM 0x070906 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ |