From 06f580d722136051c55653f6767f185b396f3371 Mon Sep 17 00:00:00 2001 From: "Dr. Orion Lawlor" Date: Mon, 17 Apr 2017 21:38:46 -0800 Subject: Support calling the library from C++, by adding extern "C" decorations, and including correct prototypes. --- include/libsurvive/survive_types.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/libsurvive/survive_types.h') diff --git a/include/libsurvive/survive_types.h b/include/libsurvive/survive_types.h index bfd0b1d..224719e 100644 --- a/include/libsurvive/survive_types.h +++ b/include/libsurvive/survive_types.h @@ -1,6 +1,11 @@ #ifndef _SURVIVE_TYPES_H #define _SURVIVE_TYPES_H +#ifdef __cplusplus +extern "C" { +#endif + + #ifndef FLT #ifdef USE_DOUBLE #define FLT double @@ -39,6 +44,9 @@ typedef int (*DeviceDriver)( SurviveContext * ctx ); typedef int (*DeviceDriverCb)( struct SurviveContext * ctx, void * driver ); typedef int (*DeviceDriverMagicCb)( struct SurviveContext * ctx, void * driver, int magic_code, void * data, int datalen ); +#ifdef __cplusplus +}; +#endif #endif -- cgit v1.2.3