xserver-multidpi/os
Jon TURNEY 05f3cf659b Fix build on Cygwin by ensuring WIN32 check triggers only on MinGW
The type of fd_mask was changed in Cygwin 2.4.0 headers from 'long' to
'unsigned long'.  This exposes an existing problem with winauth.c, which
includes Xwindows.h (which includes windows.h, which defines WIN32),
before including osdep.h, which causes the now conflicting definition of
fd_mask in osdep.h to be exposed:

In file included from ../os/osdep.h:198:18: error: conflicting types for
‘fd_mask’ typedef long int fd_mask; /usr/include/sys/select.h:46:23:
note: previous declaration of ‘fd_mask’ was here typedef unsigned long
fd_mask;

Adjust the include guards in osdep.h to make sure we only use WIN32
guarded code when not compiling for Cygwin (i.e. WIN32 && !__CYGWIN__)

This isn't a very elegant, but unfortunately appears to be the best
solution, since it doesn't seem to be possible to write the test in a
positive form.

Future work: Should also audit of all the other uses of WIN32 in
xserver, and make sure they are correct.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
(cherry picked from commit 30b7d7995e)
2016-03-11 13:14:30 -05:00
..
.gitignore dix and os: gitignore dix.O and os.O 2011-09-23 17:14:47 -07:00
Makefile.am Trap SIGBUS to handle truncated shared memory segments 2013-11-11 15:16:07 -08:00
WaitFor.c os: make sure the clientsWritable fd_set is initialized before use 2015-10-27 16:11:32 -04:00
access.c Xext, os: Remove OS-internal usages within XACE and XSELinux 2015-09-24 13:38:24 -04:00
auth.c os: support new implicit local user access mode [CVE-2015-3164 2/3] 2015-05-26 11:22:21 -07:00
backtrace.c backtrace.c: Fix word cast to a pointer 2015-05-26 14:35:55 -07:00
busfault.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
client.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
connection.c Use unique logfile names when starting server with -displayfd 2016-01-27 09:53:17 -05:00
io.c Fix overflow of ConnectionOutput->size and ->count 2014-11-30 11:37:56 -08:00
log.c os: Failure to remove a non-existent log file is not an error 2016-01-27 09:53:38 -05:00
mitauth.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
oscolor.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
osdep.h Fix build on Cygwin by ensuring WIN32 check triggers only on MinGW 2016-03-11 13:14:30 -05:00
osinit.c osinit: Silence -Wunused-variable warnings 2015-10-19 11:52:05 -04:00
reallocarray.c Import reallocarray() from OpenBSD 2015-04-21 16:57:08 -07:00
rpcauth.c unchecked malloc may allow unauthed client to crash Xserver [CVE-2014-8091] 2014-12-08 18:09:46 -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 Keep SIGALRM restart flag after Popen 2015-09-21 11:06:39 -04:00
xdmauth.c xdmauth: Correct miscall of abs() to instrad call labs() 2015-10-19 11:49:53 -04:00
xdmcp.c xdmcp: Declare XdmcpFatal _X_NORETURN 2015-10-19 11:49:54 -04:00
xprintf.c os/xprintf: add Xvscnprintf and Xscnprintf 2012-05-03 14:59:23 +10:00
xsha1.c os/xsha1.c: Add license and copyright attribution. 2015-01-02 13:39:52 -08:00
xstrans.c Clean up a couple of warnings in os/ 2013-10-31 16:58:12 -07:00