From: Peter Howkins Date: Fri, 31 Aug 2012 17:35:20 +0000 (+0100) Subject: build: on linux include the X11 and Xm headers with -isystem rather than -I, X-Git-Tag: 2.2.0b~15 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1c7c33aa71f80c64514c49c3747dcf315df7f709;p=oweals%2Fcde.git build: on linux include the X11 and Xm headers with -isystem rather than -I, this means the compiler treats them as system headers and does not give you excessive warnings from them. This is used because X11 does not like the -ansi and -pedantic warnings that CDE is compiled with. --- diff --git a/cde/config/cf/X11.rules b/cde/config/cf/X11.rules index 915897d9..80aecff7 100644 --- a/cde/config/cf/X11.rules +++ b/cde/config/cf/X11.rules @@ -65,7 +65,9 @@ XCOMM $TOG: X11.rules /main/4 1997/04/30 15:23:24 kaleb $ #define LdPostLibs LdPostLib XLdPostLibs #if ImportX11 -# define TopXInclude -I$(TOP)/imports/x11/include +# ifndef TopXInclude +# define TopXInclude -I$(TOP)/imports/x11/include +# endif #elif !UseInstalledX11 # define TopXInclude -I$(TOP)/exports/include #else diff --git a/cde/config/cf/linux.cf b/cde/config/cf/linux.cf index 390bca94..18c73ea2 100644 --- a/cde/config/cf/linux.cf +++ b/cde/config/cf/linux.cf @@ -1,5 +1,10 @@ XCOMM platform: $TOG: linux.cf /main/47 1998/04/17 11:32:51 mgreess $ +/* To reduce the number of warnings generated by X11 and Motif headers that + dislike -ansi and -pedantic we can include them with -isystem instead of + -I, this tells GCC to treat them as system includes out of our control */ +#define TopXInclude -isystem $(TOP)/imports/x11/include + #ifndef OSName #define OSName DefaultOSName #endif