summaryrefslogtreecommitdiff
path: root/include/apr_general.h
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2002-07-08 17:39:29 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2002-07-08 17:39:29 +0000
commitfd5e3cc812e4e25eea1ce09fe7d6f4f88204bca1 (patch)
tree224f87aa0969049d12ce88122020be49d2ab7938 /include/apr_general.h
parent17fe8e4ad92705690b5df49a3c1d6ff98539d4b1 (diff)
downloadlibapr-fd5e3cc812e4e25eea1ce09fe7d6f4f88204bca1.tar.gz
The native c offsetof() was conflicting when trying to use the APR_OFFSETOF
macros with c++ ... simply use our own implementation in that case. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63588 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_general.h')
-rw-r--r--include/apr_general.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/apr_general.h b/include/apr_general.h
index 463f7362b..d32209d88 100644
--- a/include/apr_general.h
+++ b/include/apr_general.h
@@ -144,7 +144,7 @@ typedef int apr_signum_t;
* @param field data field within the structure
* @return offset
*/
-#ifdef offsetof
+#if defined(offsetof) && !defined(__cplusplus)
#define APR_OFFSETOF(s_type,field) offsetof(s_type,field)
#else
#define APR_OFFSETOF(s_type,field) APR_OFFSET(s_type*,field)