summaryrefslogtreecommitdiffstats
path: root/src/macro.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-03-25 23:45:07 +0000
committerLennart Poettering <lennart@poettering.net>2008-03-25 23:45:07 +0000
commit09ac85ba0a7b0fdfa52f460e24d86795fbb12032 (patch)
tree6a83f253cd5b587c6aa2e7e1eeb38bc3810e36ef /src/macro.h
parentb82b30d383407e8be1bb321d442c170d53a1d257 (diff)
basic c++ compat
git-svn-id: file:///home/lennart/svn/public/libsydney/trunk@42 9ba3c220-e4d3-45a2-8aa3-73fcc9aff6ce
Diffstat (limited to 'src/macro.h')
-rw-r--r--src/macro.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/macro.h b/src/macro.h
index 4f2d018..30a7be4 100644
--- a/src/macro.h
+++ b/src/macro.h
@@ -105,4 +105,14 @@ typedef void (*sa_free_cb_t)(void *);
typedef int sa_bool_t;
+/* Guard C code in headers, while including them from C++ */
+#ifdef __cplusplus
+# define SA_BEGIN_DECLS extern "C" {
+# define SA_END_DECLS }
+#else
+# define SA_BEGIN_DECLS
+# define SA_END_DECLS
+#endif
+
+
#endif