From d1c70ef6d213f12d28eb475e19effed8429d2010 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Fri, 11 Sep 2009 02:47:14 +0000 Subject: [PATCH] Protect agi_pre.h from double inclusion during PCH generation in MSVC. Originally committed to SVN as r3527. --- aegisub/src/agi_pre.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aegisub/src/agi_pre.cpp b/aegisub/src/agi_pre.cpp index 50cab11b2..5f153cc20 100644 --- a/aegisub/src/agi_pre.cpp +++ b/aegisub/src/agi_pre.cpp @@ -36,7 +36,7 @@ // -// Precompiled Header Source File +// Precompiled Header Source File for MSVC // // In order to use it, set the project to use agi_pre.h as precompiled header and // insert it in every source file (under C/C++ -> Advanced -> Force Includes), @@ -46,6 +46,11 @@ // MatroskaParser.c, as well as any possible future .c files. // +// Generally agi_pre.h is set as a forced include for everything, including this file. +// So unless we protect it by this, it gets included twice during production of precompiled +// headers, which can cause problems with local includes. +#ifndef AGI_PRE #include "config.h" #include "agi_pre.h" +#endif