xserver: Branch 'xorg-server-1.2-apple'
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Thu Nov 29 01:44:38 PST 2007
hw/darwin/darwinKeyboard.c | 15 +++++++++++----
hw/darwin/quartz/quartzStartup.c | 14 ++++++++++----
2 files changed, 21 insertions(+), 8 deletions(-)
New commits:
commit f5e5b255d184f39c9dcec584c9bdda87deac854a
Author: Jeremy Huddleston <jeremy at yuffie.local>
Date: Thu Nov 29 01:42:10 2007 -0800
Darwin: Undefine NDEBUG for assert.h
For some reason, having NDEBUG defined when #including assert.h causes assert() to hang us. This should just
cause assert() to nop (it is #defined to be (void)0 in that case).
diff --git a/hw/darwin/darwinKeyboard.c b/hw/darwin/darwinKeyboard.c
index a10b096..5c1d20d 100644
--- a/hw/darwin/darwinKeyboard.c
+++ b/hw/darwin/darwinKeyboard.c
@@ -56,10 +56,9 @@
===========================================================================
*/
-// Including this crashes us... why?
-// #ifdef HAVE_XORG_CONFIG_H
-// #include <xorg-config.h>
-// #endif
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
// Define this to get a diagnostic output to stderr which is helpful
// in determining how the X server is interpreting the Darwin keymap.
@@ -74,7 +73,15 @@
#include <architecture/byte_order.h> // For the NXSwap*
#include "darwin.h"
#include "darwinKeyboard.h"
+
+#ifdef NDEBUG
+#undef NDEBUG
+#include <assert.h>
+#define NDEBUG 1
+#else
#include <assert.h>
+#endif
+
#define AltMask Mod1Mask
#define MetaMask Mod2Mask
#define FunctionMask Mod3Mask
diff --git a/hw/darwin/quartz/quartzStartup.c b/hw/darwin/quartz/quartzStartup.c
index 872b4fc..949eb66 100644
--- a/hw/darwin/quartz/quartzStartup.c
+++ b/hw/darwin/quartz/quartzStartup.c
@@ -27,10 +27,9 @@
* use or other dealings in this Software without prior written authorization.
*/
-// Including this crashes us... why?
-// #ifdef HAVE_XORG_CONFIG_H
-// #include <xorg-config.h>
-// #endif
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
#include <fcntl.h>
#include <unistd.h>
@@ -40,7 +39,14 @@
#include "quartz.h"
#include "opaque.h"
#include "micmap.h"
+
+#ifdef NDEBUG
+#undef NDEBUG
+#include <assert.h>
+#define NDEBUG 1
+#else
#include <assert.h>
+#endif
char **envpGlobal; // argcGlobal and argvGlobal
// are from dix/globals.c
More information about the xorg-commit
mailing list