From 48f94ddf511f4a77b1d2809b8eb0b9aea09dd7dd Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Fri, 18 Aug 2023 23:50:04 +0300 Subject: [PATCH] added some missing c++ guards. --- Quake/platform.h | 8 ++++++++ Quake/strl_fn.h | 9 +++++++-- Quake/zone.h | 6 ++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Quake/platform.h b/Quake/platform.h index 679ecffb8..5927a0005 100644 --- a/Quake/platform.h +++ b/Quake/platform.h @@ -24,6 +24,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef _QUAKE_PLATFORM_H #define _QUAKE_PLATFORM_H +#ifdef __cplusplus +extern "C" { +#endif + /* platform dependent way to set the window icon */ void PL_SetWindowIcon(void); @@ -36,5 +40,9 @@ char *PL_GetClipboardData (void); /* show an error dialog */ void PL_ErrorDialog(const char *text); +#ifdef __cplusplus +} +#endif + #endif /* _QUAKE_PLATFORM_H */ diff --git a/Quake/strl_fn.h b/Quake/strl_fn.h index af7fc146f..3be2a32a1 100644 --- a/Quake/strl_fn.h +++ b/Quake/strl_fn.h @@ -1,11 +1,16 @@ -/* header file for BSD strlcat and strlcpy */ +/* strl_fn.h - header file for BSD strlcat and strlcpy */ #ifndef __STRLFUNCS_H #define __STRLFUNCS_H /* use our own copies of strlcpy and strlcat taken from OpenBSD */ +#ifdef __cplusplus +extern "C" { +#endif extern size_t q_strlcpy (char *dst, const char *src, size_t size); extern size_t q_strlcat (char *dst, const char *src, size_t size); +#ifdef __cplusplus +} +#endif #endif /* __STRLFUNCS_H */ - diff --git a/Quake/zone.h b/Quake/zone.h index 393e322fe..74da9c741 100644 --- a/Quake/zone.h +++ b/Quake/zone.h @@ -91,10 +91,16 @@ Zone block void Memory_Init (void *buf, int size); +#ifdef __cplusplus +extern "C" { +#endif void Z_Free (void *ptr); void *Z_Malloc (int size); // returns 0 filled memory void *Z_Realloc (void *ptr, int size); char *Z_Strdup (const char *s); +#ifdef __cplusplus +} +#endif void *Hunk_Alloc (int size); // returns 0 filled memory void *Hunk_AllocName (int size, const char *name);