summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2014-08-21 15:07:24 -0400
committerEric S. Raymond <esr@thyrsus.com>2014-08-21 15:07:24 -0400
commit07859f6adeace85f64e9c6c6c8ce188834328df5 (patch)
tree8dbb5c7da62c26981134c22c79fad5dfecae8ea5
parent2340bfbdd6acbf445efa3b78080bae28e9a11ad8 (diff)
downloadgpsd-07859f6adeace85f64e9c6c6c8ce188834328df5.tar.gz
Attempt to head off problems with including gpsd.h in C++ code.
All regression tests pass.
-rw-r--r--gpsd.h-head4
-rw-r--r--gpsd.h-tail4
2 files changed, 8 insertions, 0 deletions
diff --git a/gpsd.h-head b/gpsd.h-head
index 8cd0220f..e19e0382 100644
--- a/gpsd.h-head
+++ b/gpsd.h-head
@@ -7,6 +7,10 @@
#ifndef _GPSD_H_
#define _GPSD_H_
+# ifdef __cplusplus
+extern "C" {
+# endif
+
#include <stdbool.h>
#include <stdio.h>
diff --git a/gpsd.h-tail b/gpsd.h-tail
index 08e0d59f..70616beb 100644
--- a/gpsd.h-tail
+++ b/gpsd.h-tail
@@ -1031,6 +1031,10 @@ static /*@unused@*/ inline void memory_barrier(void)
#endif /* S_SPLINT_S */
}
+# ifdef __cplusplus
+}
+# endif
+
#endif /* _GPSD_H_ */
// Local variables:
// mode: c