aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-09-09 06:48:42 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-09-09 06:48:42 +0000
commitb36c654a3d46d309e636918f1dfaa6c7794aad80 (patch)
treef589c02386170d07e32ebd05d9d4260cbb32453f /include
parentddeb2613ec23261efcace08588a7b185399cb858 (diff)
Ricardo Cadime helped us work out another check for the ## preprocessor
directive.
Diffstat (limited to 'include')
-rw-r--r--include/curl/curl.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/curl/curl.h b/include/curl/curl.h
index 031155aa4..ded488ead 100644
--- a/include/curl/curl.h
+++ b/include/curl/curl.h
@@ -233,7 +233,15 @@ typedef enum {
#ifdef CINIT
#undef CINIT
#endif
-#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
+/*
+ * Figure out if we can use the ## operator, which is supported by ISO/ANSI C
+ * and C++. Some compilers support it without setting __STDC__ or __cplusplus
+ * so we need to carefully check for them too. We don't use configure-checks
+ * for these since we want these headers to remain generic and working for all
+ * platforms.
+ */
+#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \
+ defined(__HP_aCC)
#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. */