@@ -20,9 +20,14 @@
#endif
-/* No C++ */
-#define __BEGIN_DECLS
-#define __END_DECLS
+/* C++ needs to know that types and declarations are C, not C++. */
+#ifdef __cplusplus
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
+#else
+# define __BEGIN_DECLS
+# define __END_DECLS
+#endif
/* GNUish things */
#define __CONSTVALUE