[ofa-general] [PATCH][TRIVIAL] opensm/include/osm_prefix_route.h: Support C++ inclusion
Hal Rosenstock
hrosenstock at xsigo.com
Wed Jun 18 07:04:20 PDT 2008
opensm/include/osm_prefix_route.h: Support C++ inclusion
Also, make define name consistent with file name
Signed-off-by: Hal Rosenstock <hal at xsigo.com>
diff --git a/opensm/include/opensm/osm_prefix_route.h b/opensm/include/opensm/osm_prefix_route.h
index 10b9aa4..aa3ad62 100644
--- a/opensm/include/opensm/osm_prefix_route.h
+++ b/opensm/include/opensm/osm_prefix_route.h
@@ -33,12 +33,22 @@
*
*/
-#ifndef _OSM_PREFIX_ROUTES_H_
-#define _OSM_PREFIX_ROUTES_H_
+#ifndef _OSM_PREFIX_ROUTE_H_
+#define _OSM_PREFIX_ROUTE_H_
#include <complib/cl_types.h>
#include <complib/cl_qlist.h>
+#ifdef __cplusplus
+# define BEGIN_C_DECLS extern "C" {
+# define END_C_DECLS }
+#else /* !__cplusplus */
+# define BEGIN_C_DECLS
+# define END_C_DECLS
+#endif /* __cplusplus */
+
+BEGIN_C_DECLS
+
typedef struct {
cl_list_item_t list_item; /* must be first */
uint64_t prefix; /* network order, zero means "any" */
@@ -49,4 +59,5 @@ typedef struct {
#error ROUTER_EXP is deprecated, specify prefix routes at runtime instead (see opensm man page for details)
#endif
-#endif /* _OSM_PREFIX_ROUTES_H_ */
+END_C_DECLS
+#endif /* _OSM_PREFIX_ROUTE_H_ */
More information about the general
mailing list