@@ -29,7 +29,8 @@ openvswitchinclude_HEADERS = \
include/openvswitch/uuid.h \
include/openvswitch/version.h \
include/openvswitch/vconn.h \
- include/openvswitch/vlog.h
+ include/openvswitch/vlog.h \
+ lib/vswitch-idl.h
if HAVE_CXX
# OVS does not use C++ itself, but it provides public header files
@@ -42,7 +43,7 @@ nodist_include_openvswitch_libcxxtest_la_SOURCES = include/openvswitch/cxxtest.c
include/openvswitch/cxxtest.cc: include/openvswitch/automake.mk
$(AM_V_GEN)for header in $(openvswitchinclude_HEADERS); do \
echo $$header; \
- done | sed 's,^include/\(.*\)$$,#include <\1>,' > $@
+ done | sed -e 's,^include/\(.*\)$$,#include <\1>,' -e 's,^lib/\(.*\)$$,#include <\1>,' > $@
endif
# OVS does not use C++ itself, but it provides public header files
@@ -136,7 +136,11 @@ def printCIDLHeader(schemaFile):
#include "ovsdb-data.h"
#include "ovsdb-idl-provider.h"
#include "smap.h"
-#include "uuid.h"''' % {'prefix': prefix.upper()})
+#include "uuid.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif''' % {'prefix': prefix.upper()})
for tableName, table in sorted(schema.tables.items()):
structName = "%s%s" % (prefix, tableName.lower())
@@ -1050,6 +1054,10 @@ const char *
{
return "%s";
}
+
+#ifdef __cplusplus
+}
+#endif
""" % (prefix, schema.version))