summaryrefslogtreecommitdiff
path: root/include/apr.hnw
diff options
context:
space:
mode:
authorDavi Arnaut <davi@apache.org>2007-08-06 19:14:46 +0000
committerDavi Arnaut <davi@apache.org>2007-08-06 19:14:46 +0000
commit91c3f14cf158da58a45773f1367d0efeb06c8c8c (patch)
treed671ef82503e01569f987077c03b7c2a40611090 /include/apr.hnw
parent6ef333be28c23cb19b67ac1ed3a2d086d69fe9ca (diff)
downloadapr-91c3f14cf158da58a45773f1367d0efeb06c8c8c.tar.gz
Backport revision 560480 from the eventset branch:
External linkage declarations are often forgotten and also confuses indent tools. Add the APR_BEGIN_DECLS and APR_END_DECLS helper macros which are more easily remembered. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@563225 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr.hnw')
-rw-r--r--include/apr.hnw11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/apr.hnw b/include/apr.hnw
index 5722e956b..c793846ec 100644
--- a/include/apr.hnw
+++ b/include/apr.hnw
@@ -329,6 +329,17 @@ typedef size_t apr_socklen_t;
/* Definitions that APR programs need to work properly. */
+/**
+ * APR public API wrap for C++ compilers.
+ */
+#ifdef __cplusplus
+#define APR_BEGIN_DECLS extern "C" {
+#define APR_END_DECLS }
+#else
+#define APR_BEGIN_DECLS
+#define APR_END_DECLS
+#endif
+
/**
* Thread callbacks from APR functions must be declared with APR_THREAD_FUNC,
* so that they follow the platform's calling convention.