Add extern "C" to more header files.
authorJesse Gross <jesse@nicira.com>
Fri, 5 Mar 2010 23:32:40 +0000 (18:32 -0500)
committerJesse Gross <jesse@nicira.com>
Fri, 5 Mar 2010 23:32:40 +0000 (18:32 -0500)
From partner.

lib/svec.h
lib/unixctl.h
lib/vlog.h

index ac22662..35de6d4 100644 (file)
 
 #include <stdbool.h>
 #include <stddef.h>
+#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 */
index 18748aa..24a9d8c 100644 (file)
 
 #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 */
index d98855a..f50b76a 100644 (file)
 #include <stdbool.h>
 #include <time.h>
 #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 */