From 421d5ca52e06f166cd47dd370d29bbe7b06b3da9 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 5 Jun 2014 06:55:10 -0700 Subject: [PATCH] Add #ifdef __cplusplus to the precompiled headers to make Xcode happy --- libaegisub/lagi_pre.h | 2 ++ src/agi_pre.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/libaegisub/lagi_pre.h b/libaegisub/lagi_pre.h index 64834e828..50ce877e2 100644 --- a/libaegisub/lagi_pre.h +++ b/libaegisub/lagi_pre.h @@ -1,3 +1,4 @@ +#ifdef __cplusplus #ifndef _WIN32 #include "../acconf.h" #endif @@ -39,3 +40,4 @@ #include #undef BOOST_NO_SCOPED_ENUMS #include +#endif diff --git a/src/agi_pre.h b/src/agi_pre.h index 7ac6dd3c8..e16ed1f8f 100644 --- a/src/agi_pre.h +++ b/src/agi_pre.h @@ -38,6 +38,8 @@ /// @note Make sure that you disable use of precompiled headers on md5.c and /// MatroskaParser.c, as well as any possible future .c files. +#ifdef __cplusplus + // Block msvc from complaining about not using msvc-specific versions for // insecure C functions. #ifdef _CRT_SECURE_NO_WARNINGS @@ -214,3 +216,5 @@ #ifndef _CRT_SECURE_NO_WARNINGS_DEFINED #undef _CRT_SECURE_NO_WARNINGS #endif + +#endif