From 1b84d893e0c2acb34d880a4c1d68f9d2dc95af8e Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 22 May 2016 10:15:35 +0000 Subject: [PATCH] (svn r27573) -Fix [FS#6467]: Compilation failure with gcc 6.1 due to headers included after safeguards.h (JGR) --- src/crashlog.cpp | 65 ++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/src/crashlog.cpp b/src/crashlog.cpp index 7ddc2131f9..4000cfb03e 100644 --- a/src/crashlog.cpp +++ b/src/crashlog.cpp @@ -36,6 +36,38 @@ #include +#ifdef WITH_ALLEGRO +# include +#endif /* WITH_ALLEGRO */ +#ifdef WITH_FONTCONFIG +# include +#endif /* WITH_FONTCONFIG */ +#ifdef WITH_PNG + /* pngconf.h, included by png.h doesn't like something in the + * freetype headers. As such it's not alphabetically sorted. */ +# include +#endif /* WITH_PNG */ +#ifdef WITH_FREETYPE +# include +# include FT_FREETYPE_H +#endif /* WITH_FREETYPE */ +#if defined(WITH_ICU_LAYOUT) || defined(WITH_ICU_SORT) +# include +#endif /* WITH_ICU_SORT || WITH_ICU_LAYOUT */ +#ifdef WITH_LZMA +# include +#endif +#ifdef WITH_LZO +#include +#endif +#ifdef WITH_SDL +# include "sdl.h" +# include +#endif /* WITH_SDL */ +#ifdef WITH_ZLIB +# include +#endif + #include "safeguards.h" /* static */ const char *CrashLog::message = NULL; @@ -180,39 +212,6 @@ char *CrashLog::LogConfiguration(char *buffer, const char *last) const return buffer; } -/* Include these here so it's close to where it's actually used. */ -#ifdef WITH_ALLEGRO -# include -#endif /* WITH_ALLEGRO */ -#ifdef WITH_FONTCONFIG -# include -#endif /* WITH_FONTCONFIG */ -#ifdef WITH_PNG - /* pngconf.h, included by png.h doesn't like something in the - * freetype headers. As such it's not alphabetically sorted. */ -# include -#endif /* WITH_PNG */ -#ifdef WITH_FREETYPE -# include -# include FT_FREETYPE_H -#endif /* WITH_FREETYPE */ -#if defined(WITH_ICU_LAYOUT) || defined(WITH_ICU_SORT) -# include -#endif /* WITH_ICU_SORT || WITH_ICU_LAYOUT */ -#ifdef WITH_LZMA -# include -#endif -#ifdef WITH_LZO -#include -#endif -#ifdef WITH_SDL -# include "sdl.h" -# include -#endif /* WITH_SDL */ -#ifdef WITH_ZLIB -# include -#endif - /** * Writes information (versions) of the used libraries. * @param buffer The begin where to write at.