mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Jonatan Lander's fix to compile properly on pre-ISO compilers (without the
## operator)
This commit is contained in:
parent
d560207ea1
commit
ea1f138c08
@ -178,19 +178,27 @@ typedef enum {
|
|||||||
|
|
||||||
#define CURL_ERROR_SIZE 256
|
#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>,
|
/* name is uppercase CURLOPT_<name>,
|
||||||
type is one of the defined CURLOPTTYPE_<type>
|
type is one of the defined CURLOPTTYPE_<type>
|
||||||
number is unique identifier */
|
number is unique identifier */
|
||||||
#ifdef CINIT
|
#ifdef CINIT
|
||||||
#undef CINIT
|
#undef CINIT
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __STDC__
|
||||||
#define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number
|
#define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number
|
||||||
|
#else
|
||||||
/* long may be 32 or 64 bits, but we should never depend on anything else
|
/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
|
||||||
but 32 */
|
#define LONG CURLOPTTYPE_LONG
|
||||||
#define CURLOPTTYPE_LONG 0
|
#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT
|
||||||
#define CURLOPTTYPE_OBJECTPOINT 10000
|
#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT
|
||||||
#define CURLOPTTYPE_FUNCTIONPOINT 20000
|
#define CINIT(name,type,number) CURLOPT_/**/name = type + number
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CINIT(NOTHING, LONG, 0), /********* the first one is unused ************/
|
CINIT(NOTHING, LONG, 0), /********* the first one is unused ************/
|
||||||
@ -562,7 +570,12 @@ int curl_formparse(char *, struct curl_httppost **,
|
|||||||
#ifdef CFINIT
|
#ifdef CFINIT
|
||||||
#undef CFINIT
|
#undef CFINIT
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __STDC__
|
||||||
#define CFINIT(name) CURLFORM_ ## name
|
#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 {
|
typedef enum {
|
||||||
CFINIT(NOTHING), /********* the first one is unused ************/
|
CFINIT(NOTHING), /********* the first one is unused ************/
|
||||||
@ -624,7 +637,7 @@ CURLcode curl_global_init(long flags);
|
|||||||
void curl_global_cleanup(void);
|
void curl_global_cleanup(void);
|
||||||
|
|
||||||
/* This is the version number */
|
/* This is the version number */
|
||||||
#define LIBCURL_VERSION "7.9.6-pre1"
|
#define LIBCURL_VERSION "7.9.6-pre2"
|
||||||
#define LIBCURL_VERSION_NUM 0x070906
|
#define LIBCURL_VERSION_NUM 0x070906
|
||||||
|
|
||||||
/* linked-list structure for the CURLOPT_QUOTE option (and other) */
|
/* linked-list structure for the CURLOPT_QUOTE option (and other) */
|
||||||
|
Loading…
Reference in New Issue
Block a user