From a67a984d29d5ad78cf4bbebcd482a6b497120f13 Mon Sep 17 00:00:00 2001 From: "Rebecca N. Palmer" Date: Fri, 13 Mar 2015 18:19:58 +0000 Subject: [PATCH] Make nasal/iolib.h available to flightgear (for io.open) --- simgear/nasal/CMakeLists.txt | 4 ++-- simgear/nasal/iolib.h | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/simgear/nasal/CMakeLists.txt b/simgear/nasal/CMakeLists.txt index 8f900ad1..8f4d2c90 100644 --- a/simgear/nasal/CMakeLists.txt +++ b/simgear/nasal/CMakeLists.txt @@ -4,6 +4,7 @@ include (SimGearComponent) set(HEADERS naref.h nasal.h + iolib.h ) set(SOURCES @@ -26,8 +27,7 @@ set(SOURCES vector.c code.h data.h - iolib.h parse.h ) -simgear_component(nasal nasal "${SOURCES}" "${HEADERS}") \ No newline at end of file +simgear_component(nasal nasal "${SOURCES}" "${HEADERS}") diff --git a/simgear/nasal/iolib.h b/simgear/nasal/iolib.h index 7d472000..a889ed89 100644 --- a/simgear/nasal/iolib.h +++ b/simgear/nasal/iolib.h @@ -1,5 +1,8 @@ #ifndef _IOLIB_H #define _IOLIB_H +#ifdef __cplusplus +extern "C" { +#endif #include "nasal.h" @@ -33,5 +36,7 @@ extern struct naIOType naStdIOType; // Defined in iolib.c, there is no "library" header to put this in naRef naIOGhost(naContext c, FILE* f); - +#ifdef __cplusplus +} // extern "C" +#endif #endif // _IOLIB_H