From a8e35ebf930103acdbae8fd09e7a58a134a511b1 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 29 Nov 2007 00:41:57 -0800 Subject: [PATCH] Darwin: Cleaned up includes I cleaned up the #includes a bit to make sure all the source files properly included xorg-config.h Only quartzStartup.c and darwinKeyboard.c do not include it. I ran into some weird crashes when they did which I'm looking into... --- hw/darwin/darwin.c | 4 +++- hw/darwin/darwin.h | 3 --- hw/darwin/darwinEvents.c | 4 ++++ hw/darwin/darwinKeyboard.c | 7 ++++++- hw/darwin/darwinXinput.c | 4 ++++ hw/darwin/quartz/X11Application.m | 4 ++++ hw/darwin/quartz/X11Controller.m | 4 ++++ hw/darwin/quartz/applewm.c | 2 ++ hw/darwin/quartz/cr/XView.m | 1 + hw/darwin/quartz/cr/crAppleWM.m | 1 + hw/darwin/quartz/cr/crFrame.m | 1 + hw/darwin/quartz/cr/crScreen.m | 1 + hw/darwin/quartz/fullscreen/fullscreen.c | 1 + hw/darwin/quartz/fullscreen/quartzCursor.c | 1 + hw/darwin/quartz/pseudoramiX.c | 3 ++- hw/darwin/quartz/quartz.c | 1 + hw/darwin/quartz/quartzAudio.c | 1 + hw/darwin/quartz/quartzCursor.c | 1 + hw/darwin/quartz/quartzPasteboard.c | 1 + hw/darwin/quartz/quartzStartup.c | 5 +++++ hw/darwin/quartz/xpr/appledri.c | 1 + hw/darwin/quartz/xpr/dri.c | 2 -- 22 files changed, 45 insertions(+), 8 deletions(-) diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c index ae7ef757b..b944e817c 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. */ -#include +#ifdef HAVE_XORG_CONFIG_H +#include +#endif #include #include diff --git a/hw/darwin/darwin.h b/hw/darwin/darwin.h index 846ed4c7c..468cb6eeb 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 #include "inputstr.h" #include "scrnintstr.h" diff --git a/hw/darwin/darwinEvents.c b/hw/darwin/darwinEvents.c index 4201e0e06..32941ad2a 100644 --- a/hw/darwin/darwinEvents.c +++ b/hw/darwin/darwinEvents.c @@ -30,6 +30,10 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + #define NEED_EVENTS #include #include diff --git a/hw/darwin/darwinKeyboard.c b/hw/darwin/darwinKeyboard.c index e4de71acc..a10b09611 100644 --- a/hw/darwin/darwinKeyboard.c +++ b/hw/darwin/darwinKeyboard.c @@ -56,9 +56,14 @@ =========================================================================== */ +// Including this crashes us... why? +// #ifdef HAVE_XORG_CONFIG_H +// #include +// #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 #include diff --git a/hw/darwin/darwinXinput.c b/hw/darwin/darwinXinput.c index 260d72af7..e9e60d999 100644 --- a/hw/darwin/darwinXinput.c +++ b/hw/darwin/darwinXinput.c @@ -52,6 +52,10 @@ SOFTWARE. ********************************************************/ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + #define NEED_EVENTS #include #include diff --git a/hw/darwin/quartz/X11Application.m b/hw/darwin/quartz/X11Application.m index cba65f0f0..6ed8abc64 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_XORG_CONFIG_H +#include +#endif + #include "quartzCommon.h" #import "X11Application.h" diff --git a/hw/darwin/quartz/X11Controller.m b/hw/darwin/quartz/X11Controller.m index 6929566f7..8c708755e 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_XORG_CONFIG_H +#include +#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 5c1c6c2fe..d30e017f2 100644 --- a/hw/darwin/quartz/applewm.c +++ b/hw/darwin/quartz/applewm.c @@ -24,9 +24,11 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ + #ifdef HAVE_XORG_CONFIG_H #include #endif + #include "quartzCommon.h" #define NEED_REPLIES diff --git a/hw/darwin/quartz/cr/XView.m b/hw/darwin/quartz/cr/XView.m index 488f88a2f..8cf53f74f 100644 --- a/hw/darwin/quartz/cr/XView.m +++ b/hw/darwin/quartz/cr/XView.m @@ -33,6 +33,7 @@ #ifdef HAVE_XORG_CONFIG_H #include #endif + #import "XView.h" diff --git a/hw/darwin/quartz/cr/crAppleWM.m b/hw/darwin/quartz/cr/crAppleWM.m index c3aa88596..ab56a94f6 100644 --- a/hw/darwin/quartz/cr/crAppleWM.m +++ b/hw/darwin/quartz/cr/crAppleWM.m @@ -29,6 +29,7 @@ #ifdef HAVE_XORG_CONFIG_H #include #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 39ca21162..3691586b5 100644 --- a/hw/darwin/quartz/cr/crFrame.m +++ b/hw/darwin/quartz/cr/crFrame.m @@ -30,6 +30,7 @@ #ifdef HAVE_XORG_CONFIG_H #include #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 ce4330523..0162b637e 100644 --- a/hw/darwin/quartz/cr/crScreen.m +++ b/hw/darwin/quartz/cr/crScreen.m @@ -30,6 +30,7 @@ #ifdef HAVE_XORG_CONFIG_H #include #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 c4a80d2ce..f6b678675 100644 --- a/hw/darwin/quartz/fullscreen/fullscreen.c +++ b/hw/darwin/quartz/fullscreen/fullscreen.c @@ -29,6 +29,7 @@ #ifdef HAVE_XORG_CONFIG_H #include #endif + #include "quartz/quartzCommon.h" #include "darwin.h" #include "quartz/quartz.h" diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.c b/hw/darwin/quartz/fullscreen/quartzCursor.c index 41767c108..9c3cc598d 100644 --- a/hw/darwin/quartz/fullscreen/quartzCursor.c +++ b/hw/darwin/quartz/fullscreen/quartzCursor.c @@ -31,6 +31,7 @@ #ifdef HAVE_XORG_CONFIG_H #include #endif + #include "quartz/quartzCommon.h" #include "quartz/quartzCursor.h" #include "darwin.h" diff --git a/hw/darwin/quartz/pseudoramiX.c b/hw/darwin/quartz/pseudoramiX.c index 5c5d342ea..d3f00ee7c 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_XORG_CONFIG_H #include #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 d1eb72431..8f32eebb9 100644 --- a/hw/darwin/quartz/quartz.c +++ b/hw/darwin/quartz/quartz.c @@ -31,6 +31,7 @@ #ifdef HAVE_XORG_CONFIG_H #include #endif + #include "quartzCommon.h" #include "quartz.h" #include "darwin.h" diff --git a/hw/darwin/quartz/quartzAudio.c b/hw/darwin/quartz/quartzAudio.c index 1980cd25f..2448af551 100644 --- a/hw/darwin/quartz/quartzAudio.c +++ b/hw/darwin/quartz/quartzAudio.c @@ -39,6 +39,7 @@ #ifdef HAVE_XORG_CONFIG_H #include #endif + #include "quartzCommon.h" #include "quartzAudio.h" diff --git a/hw/darwin/quartz/quartzCursor.c b/hw/darwin/quartz/quartzCursor.c index a5483ee00..0e8778e7f 100644 --- a/hw/darwin/quartz/quartzCursor.c +++ b/hw/darwin/quartz/quartzCursor.c @@ -31,6 +31,7 @@ #ifdef HAVE_XORG_CONFIG_H #include #endif + #include "quartzCommon.h" #include "quartzCursor.h" #include "darwin.h" diff --git a/hw/darwin/quartz/quartzPasteboard.c b/hw/darwin/quartz/quartzPasteboard.c index a3536fc56..4adf91d0b 100644 --- a/hw/darwin/quartz/quartzPasteboard.c +++ b/hw/darwin/quartz/quartzPasteboard.c @@ -33,6 +33,7 @@ #ifdef HAVE_XORG_CONFIG_H #include #endif + #include "quartzPasteboard.h" #include diff --git a/hw/darwin/quartz/quartzStartup.c b/hw/darwin/quartz/quartzStartup.c index 6f45949be..872b4fc26 100644 --- a/hw/darwin/quartz/quartzStartup.c +++ b/hw/darwin/quartz/quartzStartup.c @@ -27,6 +27,11 @@ * use or other dealings in this Software without prior written authorization. */ +// Including this crashes us... why? +// #ifdef HAVE_XORG_CONFIG_H +// #include +// #endif + #include #include #include diff --git a/hw/darwin/quartz/xpr/appledri.c b/hw/darwin/quartz/xpr/appledri.c index 792523988..f39fd0bdd 100644 --- a/hw/darwin/quartz/xpr/appledri.c +++ b/hw/darwin/quartz/xpr/appledri.c @@ -38,6 +38,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifdef HAVE_XORG_CONFIG_H #include #endif + #define NEED_REPLIES #define NEED_EVENTS #include diff --git a/hw/darwin/quartz/xpr/dri.c b/hw/darwin/quartz/xpr/dri.c index 1047199e9..dfb5c727e 100644 --- a/hw/darwin/quartz/xpr/dri.c +++ b/hw/darwin/quartz/xpr/dri.c @@ -34,8 +34,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -#include - #ifdef HAVE_XORG_CONFIG_H #include #endif