From f4ade10529d5a3882ff1d6937c19f5c1585eb8b1 Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Fri, 5 Mar 2010 18:32:40 -0500 Subject: [PATCH] Add extern "C" to more header files. From partner. --- lib/svec.h | 8 ++++++++ lib/unixctl.h | 8 ++++++++ lib/vlog.h | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/lib/svec.h b/lib/svec.h index ac2266249..35de6d4a9 100644 --- a/lib/svec.h +++ b/lib/svec.h @@ -19,6 +19,10 @@ #include #include + +#ifdef __cplusplus +extern "C" { +#endif struct svec { char **names; @@ -66,5 +70,9 @@ void svec_pop_back(struct svec *); ? (NAME) = (SVEC)->names[INDEX], 1 \ : 0); \ (INDEX)++) + +#ifdef __cplusplus +} +#endif #endif /* svec.h */ diff --git a/lib/unixctl.h b/lib/unixctl.h index 18748aa76..24a9d8c80 100644 --- a/lib/unixctl.h +++ b/lib/unixctl.h @@ -16,6 +16,10 @@ #ifndef UNIXCTL_H #define UNIXCTL_H 1 + +#ifdef __cplusplus +extern "C" { +#endif /* Server for Unix domain socket control connection. */ struct unixctl_server; @@ -40,5 +44,9 @@ void unixctl_command_register(const char *name, const char *args)); void unixctl_command_reply(struct unixctl_conn *, int code, const char *body); + +#ifdef __cplusplus +} +#endif #endif /* unixctl.h */ diff --git a/lib/vlog.h b/lib/vlog.h index d98855a07..f50b76a16 100644 --- a/lib/vlog.h +++ b/lib/vlog.h @@ -22,6 +22,10 @@ #include #include #include "util.h" + +#ifdef __cplusplus +extern "C" { +#endif /* Logging importance levels. */ #define VLOG_LEVELS \ @@ -187,6 +191,10 @@ void vlog_usage(void); } \ } while (0) extern enum vlog_level min_vlog_levels[VLM_N_MODULES]; + +#ifdef __cplusplus +} +#endif #endif /* vlog.h */ -- 2.20.1