hw/xwin: Remove unused X includes from internal.h and add them where needed

Also removing server headers we might clash with and no longer need.  Make
a few adjustments to allow for this change:

- provide a prototype of ErrorF()
- use the MAX() macro provided by sys/param.h, not the max() macro provided by misc.h
- use the X 'Bool' type rather than the unwrapped Windows 'BOOL' type

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Jon TURNEY
2013-06-20 12:50:18 +01:00
parent 52f3cf3c61
commit cbe133752d
4 changed files with 11 additions and 11 deletions

View File

@@ -41,6 +41,7 @@
#include <fcntl.h>
#include <setjmp.h>
#include <pthread.h>
#include <sys/param.h> // for MAX() macro
#ifdef HAS_WINSOCK
#include <X11/Xwinsock.h>
@@ -48,7 +49,7 @@
#include <errno.h>
#endif
#include "misc.h"
#include <X11/Xatom.h>
#include <X11/extensions/Xfixes.h>
#include "winclipboard.h"
#include "internal.h"
@@ -185,7 +186,7 @@ winClipboardProc(Bool fUseUnicode, char *szDisplay)
}
/* Find max of our file descriptors */
iMaxDescriptor = max(fdMessageQueue, iConnectionNumber) + 1;
iMaxDescriptor = MAX(fdMessageQueue, iConnectionNumber) + 1;
#else
iMaxDescriptor = iConnectionNumber + 1;
#endif