summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremy@yuffie.local>2007-11-29 02:19:22 -0800
committerJeremy Huddleston <jeremy@yuffie.local>2007-11-29 02:21:16 -0800
commit8a079be0dd0f2ce37868988cde4ac8895522b088 (patch)
tree631876c2e41b4a1bd15405abcf66ac823fb7a410
parent38397560612424b5b348f34c1a0bea8c47a574be (diff)
Darwin: #ifdefs around dix-config.h include and NDEBUG/assert.h workaround.
(cherry picked from commit d2b768890f0878ae4e3fec8f7219e82b79256133)
-rw-r--r--hw/darwin/darwin.c2
-rw-r--r--hw/darwin/darwin.h3
-rw-r--r--hw/darwin/darwinKeyboard.c14
-rw-r--r--hw/darwin/darwinXinput.c4
-rw-r--r--hw/darwin/quartz/X11Application.m4
-rw-r--r--hw/darwin/quartz/X11Controller.m4
-rw-r--r--hw/darwin/quartz/applewm.c2
-rw-r--r--hw/darwin/quartz/cr/XView.m3
-rw-r--r--hw/darwin/quartz/cr/crAppleWM.m2
-rw-r--r--hw/darwin/quartz/cr/crFrame.m2
-rw-r--r--hw/darwin/quartz/cr/crScreen.m2
-rw-r--r--hw/darwin/quartz/fullscreen/fullscreen.c2
-rw-r--r--hw/darwin/quartz/fullscreen/quartzCursor.c2
-rw-r--r--hw/darwin/quartz/pseudoramiX.c5
-rw-r--r--hw/darwin/quartz/quartz.c2
-rw-r--r--hw/darwin/quartz/quartzAudio.c2
-rw-r--r--hw/darwin/quartz/quartzCocoa.m2
-rw-r--r--hw/darwin/quartz/quartzCursor.c2
-rw-r--r--hw/darwin/quartz/quartzKeyboard.c2
-rw-r--r--hw/darwin/quartz/quartzPasteboard.c2
-rw-r--r--hw/darwin/quartz/quartzStartup.c11
-rw-r--r--hw/darwin/quartz/xpr/Makefile.am1
-rw-r--r--hw/darwin/quartz/xpr/appledri.c2
-rw-r--r--hw/darwin/quartz/xpr/dri.c2
-rw-r--r--hw/darwin/quartz/xpr/x-hash.c2
-rw-r--r--hw/darwin/quartz/xpr/x-hook.c2
-rw-r--r--hw/darwin/quartz/xpr/x-list.c2
-rw-r--r--hw/darwin/quartz/xpr/xprAppleWM.c2
-rw-r--r--hw/darwin/quartz/xpr/xprCursor.c2
-rw-r--r--hw/darwin/quartz/xpr/xprFrame.c2
-rw-r--r--hw/darwin/quartz/xpr/xprScreen.c2
31 files changed, 86 insertions, 7 deletions
diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c
index 87edd9a71..b46b7687e 100644
--- a/hw/darwin/darwin.c
+++ b/hw/darwin/darwin.c
@@ -29,7 +29,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include <X11/X.h>
#include <X11/Xproto.h>
diff --git a/hw/darwin/darwin.h b/hw/darwin/darwin.h
index 4f118470f..d7d2af44f 100644
--- a/hw/darwin/darwin.h
+++ b/hw/darwin/darwin.h
@@ -27,9 +27,6 @@
#ifndef _DARWIN_H
#define _DARWIN_H
-//#include "dix-config.h" // This crashes us for some reason...
-#define SHAPE
-
#include <IOKit/IOTypes.h>
#include "inputstr.h"
#include "scrnintstr.h"
diff --git a/hw/darwin/darwinKeyboard.c b/hw/darwin/darwinKeyboard.c
index b51e2da5b..7f7b7c74a 100644
--- a/hw/darwin/darwinKeyboard.c
+++ b/hw/darwin/darwinKeyboard.c
@@ -56,9 +56,13 @@
===========================================================================
*/
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-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.
-#define DUMP_DARWIN_KEYMAP
+// #define DUMP_DARWIN_KEYMAP
#include <stdio.h>
#include <stdlib.h>
@@ -69,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/darwinXinput.c b/hw/darwin/darwinXinput.c
index 260d72af7..ee456a43a 100644
--- a/hw/darwin/darwinXinput.c
+++ b/hw/darwin/darwinXinput.c
@@ -52,6 +52,10 @@ SOFTWARE.
********************************************************/
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>
diff --git a/hw/darwin/quartz/X11Application.m b/hw/darwin/quartz/X11Application.m
index a43d536d3..514bc4995 100644
--- a/hw/darwin/quartz/X11Application.m
+++ b/hw/darwin/quartz/X11Application.m
@@ -27,6 +27,10 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
#include "quartzCommon.h"
#import "X11Application.h"
diff --git a/hw/darwin/quartz/X11Controller.m b/hw/darwin/quartz/X11Controller.m
index 6929566f7..0f64e4571 100644
--- a/hw/darwin/quartz/X11Controller.m
+++ b/hw/darwin/quartz/X11Controller.m
@@ -27,6 +27,10 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
#define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin"
#include "quartzCommon.h"
diff --git a/hw/darwin/quartz/applewm.c b/hw/darwin/quartz/applewm.c
index 20d1b4f82..72dca28e7 100644
--- a/hw/darwin/quartz/applewm.c
+++ b/hw/darwin/quartz/applewm.c
@@ -25,7 +25,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartzCommon.h"
diff --git a/hw/darwin/quartz/cr/XView.m b/hw/darwin/quartz/cr/XView.m
index 8379f9476..130b15f59 100644
--- a/hw/darwin/quartz/cr/XView.m
+++ b/hw/darwin/quartz/cr/XView.m
@@ -30,10 +30,13 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#import "XView.h"
+
@implementation XView
- (BOOL)isFlipped
diff --git a/hw/darwin/quartz/cr/crAppleWM.m b/hw/darwin/quartz/cr/crAppleWM.m
index a0259c3f8..246f52170 100644
--- a/hw/darwin/quartz/cr/crAppleWM.m
+++ b/hw/darwin/quartz/cr/crAppleWM.m
@@ -26,7 +26,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartz/quartzCommon.h"
#include "quartz/cr/cr.h"
diff --git a/hw/darwin/quartz/cr/crFrame.m b/hw/darwin/quartz/cr/crFrame.m
index 79697fbac..86c75d2e4 100644
--- a/hw/darwin/quartz/cr/crFrame.m
+++ b/hw/darwin/quartz/cr/crFrame.m
@@ -27,7 +27,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartz/quartzCommon.h"
#include "quartz/cr/cr.h"
diff --git a/hw/darwin/quartz/cr/crScreen.m b/hw/darwin/quartz/cr/crScreen.m
index 504e7b37a..cc82afbd1 100644
--- a/hw/darwin/quartz/cr/crScreen.m
+++ b/hw/darwin/quartz/cr/crScreen.m
@@ -27,7 +27,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartz/quartzCommon.h"
#include "quartz/cr/cr.h"
diff --git a/hw/darwin/quartz/fullscreen/fullscreen.c b/hw/darwin/quartz/fullscreen/fullscreen.c
index 2021ea2d3..c4a049f8f 100644
--- a/hw/darwin/quartz/fullscreen/fullscreen.c
+++ b/hw/darwin/quartz/fullscreen/fullscreen.c
@@ -26,7 +26,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartz/quartzCommon.h"
#include "darwin.h"
diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.c b/hw/darwin/quartz/fullscreen/quartzCursor.c
index 52477817e..3ffa1c3d8 100644
--- a/hw/darwin/quartz/fullscreen/quartzCursor.c
+++ b/hw/darwin/quartz/fullscreen/quartzCursor.c
@@ -28,7 +28,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartz/quartzCommon.h"
#include "quartz/quartzCursor.h"
diff --git a/hw/darwin/quartz/pseudoramiX.c b/hw/darwin/quartz/pseudoramiX.c
index 787601b5d..b19c6050f 100644
--- a/hw/darwin/quartz/pseudoramiX.c
+++ b/hw/darwin/quartz/pseudoramiX.c
@@ -33,10 +33,11 @@ dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
-#include "pseudoramiX.h"
-
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
+#include "pseudoramiX.h"
#include "extnsionst.h"
#include "dixstruct.h"
#include "window.h"
diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c
index c95880ceb..2483d12d7 100644
--- a/hw/darwin/quartz/quartz.c
+++ b/hw/darwin/quartz/quartz.c
@@ -28,7 +28,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartzCommon.h"
#include "quartz.h"
diff --git a/hw/darwin/quartz/quartzAudio.c b/hw/darwin/quartz/quartzAudio.c
index 8a337daba..1eb099ba6 100644
--- a/hw/darwin/quartz/quartzAudio.c
+++ b/hw/darwin/quartz/quartzAudio.c
@@ -36,7 +36,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartzCommon.h"
#include "quartzAudio.h"
diff --git a/hw/darwin/quartz/quartzCocoa.m b/hw/darwin/quartz/quartzCocoa.m
index 48cadc60c..0086c5ca4 100644
--- a/hw/darwin/quartz/quartzCocoa.m
+++ b/hw/darwin/quartz/quartzCocoa.m
@@ -32,7 +32,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartzCommon.h"
diff --git a/hw/darwin/quartz/quartzCursor.c b/hw/darwin/quartz/quartzCursor.c
index 15f555302..6e86acbc4 100644
--- a/hw/darwin/quartz/quartzCursor.c
+++ b/hw/darwin/quartz/quartzCursor.c
@@ -28,7 +28,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartzCommon.h"
#include "quartzCursor.h"
diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c
index 49c5bfdcd..b87249f33 100644
--- a/hw/darwin/quartz/quartzKeyboard.c
+++ b/hw/darwin/quartz/quartzKeyboard.c
@@ -31,7 +31,9 @@
prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartzCommon.h"
diff --git a/hw/darwin/quartz/quartzPasteboard.c b/hw/darwin/quartz/quartzPasteboard.c
index 213019747..0cecff54a 100644
--- a/hw/darwin/quartz/quartzPasteboard.c
+++ b/hw/darwin/quartz/quartzPasteboard.c
@@ -30,7 +30,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartzPasteboard.h"
diff --git a/hw/darwin/quartz/quartzStartup.c b/hw/darwin/quartz/quartzStartup.c
index 6f45949be..e20c16b7a 100644
--- a/hw/darwin/quartz/quartzStartup.c
+++ b/hw/darwin/quartz/quartzStartup.c
@@ -27,6 +27,10 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
#include <fcntl.h>
#include <unistd.h>
#include <CoreFoundation/CoreFoundation.h>
@@ -35,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
diff --git a/hw/darwin/quartz/xpr/Makefile.am b/hw/darwin/quartz/xpr/Makefile.am
index 8f482f1dc..8980ad7d3 100644
--- a/hw/darwin/quartz/xpr/Makefile.am
+++ b/hw/darwin/quartz/xpr/Makefile.am
@@ -1,7 +1,6 @@
noinst_LIBRARIES = libxpr.a
AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
AM_CPPFLAGS = \
- -DHAVE_XORG_CONFIG_H \
-I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \
-I$(top_srcdir)/miext \
-I$(top_srcdir)/miext/rootless \
diff --git a/hw/darwin/quartz/xpr/appledri.c b/hw/darwin/quartz/xpr/appledri.c
index 45d1a7e0e..95a443976 100644
--- a/hw/darwin/quartz/xpr/appledri.c
+++ b/hw/darwin/quartz/xpr/appledri.c
@@ -35,7 +35,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#define NEED_REPLIES
#define NEED_EVENTS
diff --git a/hw/darwin/quartz/xpr/dri.c b/hw/darwin/quartz/xpr/dri.c
index 4ade24916..e5591abcb 100644
--- a/hw/darwin/quartz/xpr/dri.c
+++ b/hw/darwin/quartz/xpr/dri.c
@@ -34,7 +34,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#ifdef XFree86LOADER
#include "xf86.h"
diff --git a/hw/darwin/quartz/xpr/x-hash.c b/hw/darwin/quartz/xpr/x-hash.c
index d24e05c1f..55d28bacd 100644
--- a/hw/darwin/quartz/xpr/x-hash.c
+++ b/hw/darwin/quartz/xpr/x-hash.c
@@ -27,7 +27,9 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "x-hash.h"
#include "x-list.h"
diff --git a/hw/darwin/quartz/xpr/x-hook.c b/hw/darwin/quartz/xpr/x-hook.c
index e38d0edc5..bb873bbfb 100644
--- a/hw/darwin/quartz/xpr/x-hook.c
+++ b/hw/darwin/quartz/xpr/x-hook.c
@@ -27,7 +27,9 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "x-hook.h"
#include <stdlib.h>
diff --git a/hw/darwin/quartz/xpr/x-list.c b/hw/darwin/quartz/xpr/x-list.c
index 356bb79a4..3596dd355 100644
--- a/hw/darwin/quartz/xpr/x-list.c
+++ b/hw/darwin/quartz/xpr/x-list.c
@@ -27,7 +27,9 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "x-list.h"
#include <stdlib.h>
diff --git a/hw/darwin/quartz/xpr/xprAppleWM.c b/hw/darwin/quartz/xpr/xprAppleWM.c
index f639b55fe..5539c51cc 100644
--- a/hw/darwin/quartz/xpr/xprAppleWM.c
+++ b/hw/darwin/quartz/xpr/xprAppleWM.c
@@ -27,7 +27,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "xpr.h"
#include "quartz/applewmExt.h"
diff --git a/hw/darwin/quartz/xpr/xprCursor.c b/hw/darwin/quartz/xpr/xprCursor.c
index 9892bcddf..160b5d908 100644
--- a/hw/darwin/quartz/xpr/xprCursor.c
+++ b/hw/darwin/quartz/xpr/xprCursor.c
@@ -29,7 +29,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartz/quartzCommon.h"
#include "xpr.h"
diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/darwin/quartz/xpr/xprFrame.c
index ddb6d2dda..1b0ba9102 100644
--- a/hw/darwin/quartz/xpr/xprFrame.c
+++ b/hw/darwin/quartz/xpr/xprFrame.c
@@ -27,7 +27,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "xpr.h"
#include "rootlessCommon.h"
diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c
index b5f382ee5..28ed159fe 100644
--- a/hw/darwin/quartz/xpr/xprScreen.c
+++ b/hw/darwin/quartz/xpr/xprScreen.c
@@ -27,7 +27,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartz/quartzCommon.h"
#include "quartz/quartz.h"