aboutsummaryrefslogtreecommitdiff
path: root/src/librc
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-10-22 07:46:49 -0400
committerAnthony G. Basile <blueness@gentoo.org>2014-10-22 07:46:49 -0400
commit86e9aa0d36813e2630c6613cd71c3ce8db642f71 (patch)
treee951f00712e33583175ebef669b5a03b3b479d51 /src/librc
parent4a08517cac3c68c232694db7288654b58b68b8ba (diff)
einfo.h, rc.h.in: simplify __BEGIN_DECLS logic
There is no need to redefine __BEGIN_DECLS and __END_DECLS. We simplify the logic here and avoid undefining these macros.
Diffstat (limited to 'src/librc')
-rw-r--r--src/librc/rc.h.in17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/librc/rc.h.in b/src/librc/rc.h.in
index 5cd584f0..5ef8d7fd 100644
--- a/src/librc/rc.h.in
+++ b/src/librc/rc.h.in
@@ -31,18 +31,11 @@
#include <stdbool.h>
#include <stdio.h>
-#undef __BEGIN_DECLS
-#undef __END_DECLS
+/* __BEGIN_DECLS */
#ifdef __cplusplus
-# define __BEGIN_DECLS extern "C" {
-# define __END_DECLS }
-#else
-# define __BEGIN_DECLS /* empty */
-# define __END_DECLS /* empty */
+extern "C" {
#endif
-__BEGIN_DECLS
-
#define RC_PREFIX "@PREFIX@"
#define RC_SYSCONFDIR "@SYSCONFDIR@"
#define RC_LIBDIR "@PREFIX@/@LIB@/rc"
@@ -573,5 +566,9 @@ bool rc_getfile(const char *, char **, size_t *);
* we have our own */
ssize_t rc_getline(char **, size_t *, FILE *);
-__END_DECLS
+/* __END_DECLS */
+#ifdef __cplusplus
+}
+#endif
+
#endif