xserver-multidpi/os
Thomas Petazzoni 7a0c79c8c4 os/log: adjust gcc version conditions for #pragma
In commit e67f2d7e0f ("gcc 4.2.1 doesn't
support #pragma GCC diagnostic ignored"), some compile time
conditionals were added around the #pragma usage. Those conditionals
ensure that the #pragma are not used on gcc <= 4.2.

However, the usage of #pragma diagnostic inside functions was only
added in gcc 4.6, and a build failure is therefore experienced with
gcc 4.5:

log.c: In function 'LogInit':
log.c:199:9: error: #pragma GCC diagnostic not allowed inside functions
log.c:201:9: warning: format not a string literal, argument types not checked
log.c:212:9: error: #pragma GCC diagnostic not allowed inside functions
log.c:214:17: warning: format not a string literal, argument types not checked

$ ./host/usr/bin/powerpc-linux-gnu-gcc -v
[...]
gcc version 4.5.2 (Sourcery G++ Lite 2011.03-38)

This patch therefore adjusts the compile time conditionals to make
sure the #pragma is not used on gcc <= 4.5, and only used on gcc >=
4.6.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by:  Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-11 18:18:09 -07:00
..
.gitignore dix and os: gitignore dix.O and os.O 2011-09-23 17:14:47 -07:00
access.c os: Remove LocalClientCred 2014-07-29 09:52:04 -04:00
auth.c os: Clean up warnings 2014-01-12 10:14:49 -08:00
backtrace.c os: use a constant for backtrace array size 2013-11-01 09:39:53 +10:00
busfault.c os: Initialize the set of signals to be suppressed during our handler. 2014-04-21 22:05:00 -07:00
client.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
connection.c ListenOnOpenFD: Remove Resets since this is intended to be for hotplugging connections 2014-08-11 12:49:54 -07:00
io.c If EAGAIN == EWOULDBLOCK, only need to check errno for one of them 2014-01-22 11:30:27 -08:00
log.c os/log: adjust gcc version conditions for #pragma 2014-09-11 18:18:09 -07:00
Makefile.am Trap SIGBUS to handle truncated shared memory segments 2013-11-11 15:16:07 -08:00
mitauth.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
oscolor.c os: Regenerate os/oscolor.c from app/rgb #52289 2014-08-12 15:51:52 -07:00
osdep.h os: Hide the Connection{In,Out}put implementation details 2012-09-20 14:40:18 -04:00
osinit.c darwin: Don't leave stdin/stdout closed 2013-12-12 01:30:04 -08:00
rpcauth.c Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
strcasecmp.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
strcasestr.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
strlcat.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
strlcpy.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
strndup.c os: Ensure <dix-config.h> is included in strndup.c 2013-02-14 09:20:46 -08:00
utils.c os: Remove deprecated malloc/free wrappers 2014-07-29 09:51:50 -04:00
WaitFor.c Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
xdmauth.c os: Fix -Wshadow errors 2014-01-22 19:56:31 -08:00
xdmcp.c os: Fix -Wshadow errors 2014-01-22 19:56:31 -08:00
xprintf.c os/xprintf: add Xvscnprintf and Xscnprintf 2012-05-03 14:59:23 +10:00
xsha1.c os: Add libnettle as a choice of SHA1 implementation 2012-11-05 13:34:18 -06:00
xstrans.c Clean up a couple of warnings in os/ 2013-10-31 16:58:12 -07:00