[Xephyr] Fix #15839

Make sure the _XSERVER64 macro is not defined in Xlib client code.
That macro is meant to be define only on pure server code, when necessary.
This commit is contained in:
Dodji Seketeli 2008-07-23 01:00:26 +02:00
parent d692e1a63e
commit 5de1867fbb
4 changed files with 43 additions and 0 deletions

View File

@ -45,6 +45,16 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifdef HAVE_CONFIG_H
#include <kdrive-config.h>
#endif
/*
* including some server headers (like kdrive-config.h)
* might define the macro _XSERVER64
* on 64 bits machines. That macro must _NOT_ be defined for Xlib
* client code, otherwise bad things happen.
* So let's undef that macro if necessary.
*/
#ifdef _XSERVER64
#undef _XSERVER64
#endif
/* THIS IS NOT AN X CONSORTIUM STANDARD */

View File

@ -31,6 +31,17 @@
#include <kdrive-config.h>
#endif
/*
* including some server headers (like kdrive-config.h)
* might define the macro _XSERVER64
* on 64 bits machines. That macro must _NOT_ be defined for Xlib
* client code, otherwise bad things happen.
* So let's undef that macro if necessary.
*/
#ifdef _XSERVER64
#undef _XSERVER64
#endif
#include <X11/Xlibint.h>
#include <GL/glx.h>
#include <GL/internal/glcore.h>

View File

@ -28,6 +28,16 @@
#ifdef HAVE_CONFIG_H
#include <kdrive-config.h>
#endif
/*
* including some server headers (like kdrive-config.h)
* might define the macro _XSERVER64
* on 64 bits machines. That macro must _NOT_ be defined for Xlib
* client code, otherwise bad things happen.
* So let's undef that macro if necessary.
*/
#ifdef _XSERVER64
#undef _XSERVER64
#endif
#include <X11/Xutil.h>
#include <X11/Xlibint.h>
#include <X11/extensions/Xvlib.h>

View File

@ -27,6 +27,18 @@
#include <kdrive-config.h>
#endif
/*
* including some server headers (like kdrive-config.h)
* might define the macro _XSERVER64
* on 64 bits machines. That macro must _NOT_ be defined for Xlib
* client code, otherwise bad things happen.
* So let's undef that macro if necessary.
*/
#ifdef _XSERVER64
#undef _XSERVER64
#endif
#include "hostx.h"
#include <stdlib.h>