diff dwcompat.h @ 2823:b1ff739d0dbc

Make dwcompat.h allow mixing of C and C++ code. GitHub issue #3. Also fix a minor whitespace issue.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 14 Aug 2022 15:36:36 +0000
parents 60df58233244
children 22327163b35c
line wrap: on
line diff
--- a/dwcompat.h	Thu Aug 04 19:12:19 2022 +0000
+++ b/dwcompat.h	Sun Aug 14 15:36:36 2022 +0000
@@ -3,6 +3,10 @@
 #ifndef _DWCOMPAT_H
 #define _DWCOMPAT_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* This header includes and defines everything needed for a given OS/compiler */
 #if defined(__UNIX__) || defined(__MAC__) || defined(__IOS__) || defined(__ANDROID__)
 /* iOS and Android currently don't use autoconf */
@@ -477,4 +481,8 @@
 void API initdir(int argc, char *argv[]);
 int API setpath(char *path);
 
+#ifdef __cplusplus
+}
 #endif
+
+#endif