From 7e6a8b0a249f5e75c648e579156e3b30c8866eeb Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 9 Nov 2016 10:58:53 +0000 Subject: Workaround for possible build problem on Windows/MacOSX: Some (older) versions of X11/Xutil.h have a wrong signature for XOffsetRegion/XUnionRegion, so move them out of the way temporarly. --- generic/tkIntXlibDecls.h | 6 ++++++ macosx/tkMacOSXPort.h | 1 - xlib/xutil.c | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h index 8e7d650..de44068 100644 --- a/generic/tkIntXlibDecls.h +++ b/generic/tkIntXlibDecls.h @@ -23,7 +23,13 @@ # include #endif +/* Some (older) versions of X11/Xutil.h have a wrong signature of those + two functions, so move them out of the way temporarly. */ +#define XOffsetRegion _XOffsetRegion +#define XUnionRegion _XUnionRegion #include "X11/Xutil.h" +#undef XOffsetRegion +#undef XUnionRegion #ifdef BUILD_tk #undef TCL_STORAGE_CLASS diff --git a/macosx/tkMacOSXPort.h b/macosx/tkMacOSXPort.h index 0c3b347..bd48bd5 100644 --- a/macosx/tkMacOSXPort.h +++ b/macosx/tkMacOSXPort.h @@ -53,7 +53,6 @@ #include #include #include -#include "tkIntXlibDecls.h" /* * The following macro defines the type of the mask arguments to diff --git a/xlib/xutil.c b/xlib/xutil.c index 0514d7a..7b69e18 100644 --- a/xlib/xutil.c +++ b/xlib/xutil.c @@ -12,6 +12,7 @@ #include #include +#include #include #include -- cgit v0.12