diff --git a/source/build/include/build.h b/source/build/include/build.h index 241dc82f8..bdd437a53 100644 --- a/source/build/include/build.h +++ b/source/build/include/build.h @@ -270,8 +270,6 @@ static FORCE_INLINE void sprite_tracker_hook(uintptr_t address); #define Tracker(Container, Type) Container##Tracker #define TrackerCast(x) x.cast() -extern "C" { - #else #define Tracker(Container, Type) Type @@ -475,6 +473,10 @@ static inline void inplace_vx_tweak_wall(walltypevx *vxwal, int32_t yaxp) #include "clip.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef struct { uint32_t mdanimtims; int16_t mdanimcur; @@ -1344,6 +1346,10 @@ int32_t loaddefinitionsfile(const char *fn); // -2, board is dodgy int32_t loadoldboard(const char *filename, char fromwhere, vec3_t *dapos, int16_t *daang, int16_t *dacursectnum); +#ifdef __cplusplus +} +#endif + #include "hash.h" #ifdef POLYMER @@ -1354,6 +1360,10 @@ int32_t loadoldboard(const char *filename, char fromwhere, vec3_t *dapos, int16_ # endif #endif +#ifdef __cplusplus +extern "C" { +#endif + static FORCE_INLINE void push_nofog(void) { #ifdef USE_OPENGL diff --git a/source/mact/include/keyboard.h b/source/mact/include/keyboard.h index 264f7ca9e..0508680b3 100644 --- a/source/mact/include/keyboard.h +++ b/source/mact/include/keyboard.h @@ -29,13 +29,14 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au) #ifndef keyboard_public_h_ #define keyboard_public_h_ -#ifdef __cplusplus -extern "C" { -#endif #include "baselayer.h" // for the keyboard stuff #include "scancodes.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef uint8_t kb_scancode; #define MAXKEYBOARDSCAN 256