diff options
author | Daniel Stone <daniel@fooishbar.org> | 2005-07-03 09:39:54 +0000 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2005-07-03 09:39:54 +0000 |
commit | a107f599518a175dd689417b48788a746303966a (patch) | |
tree | 1c426fb7c44f3cf22b5a2696a5ef8d1f1caaaf6c | |
parent | 0bb669638f032e61471007b2fa88285aa5d63903 (diff) |
Predicate usage of xf86OSPM functions on #ifdef XF86PM.
Remove needless include of ../input/mouse/mouse.h.
-rw-r--r-- | hw/xfree86/common/xf86Events.c | 6 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Init.c | 8 | ||||
-rw-r--r-- | hw/xfree86/common/xf86MiscExt.c | 1 |
3 files changed, 14 insertions, 1 deletions
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 699188421..82e0782dd 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -173,7 +173,9 @@ extern fd_set EnabledDevices; #if defined(XQUEUE) extern void xf86XqueRequest(void); #endif +#ifdef XF86PM extern void (*xf86OSPMClose)(void); +#endif static void xf86VTSwitch(void); @@ -1448,9 +1450,11 @@ xf86VTSwitch() xf86UnblockSIGIO(prevSIGIO); } else { +#ifdef XF86PM if (xf86OSPMClose) xf86OSPMClose(); xf86OSPMClose = NULL; +#endif for (i = 0; i < xf86NumScreens; i++) { /* @@ -1472,7 +1476,9 @@ xf86VTSwitch() if (!xf86VTSwitchTo()) return; prevSIGIO = xf86BlockSIGIO(); +#ifdef XF86PM xf86OSPMClose = xf86OSPMOpen(); +#endif if (xorgHWAccess) xf86EnableIO(); diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index d4f4dd486..28ffeeb22 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -114,7 +114,9 @@ static void xf86RunVtInit(void); extern void os2ServerVideoAccess(); #endif +#ifdef XF86PM void (*xf86OSPMClose)(void) = NULL; +#endif #ifdef XFree86LOADER static char *baseModules[] = { @@ -259,7 +261,9 @@ PostConfigInit(void) #endif } +#ifdef XF86PM xf86OSPMClose = xf86OSPMOpen(); +#endif /* Run an external VT Init program if specified in the config file */ xf86RunVtInit(); @@ -831,6 +835,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) */ xf86OpenConsole(); +#ifdef XF86PM /* should we reopen it here? We need to deal with an already opened device. We could leave this to the OS layer. For now we simply @@ -840,6 +845,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) xf86OSPMClose(); if ((xf86OSPMClose = xf86OSPMOpen()) != NULL) xf86MsgVerb(X_INFO, 3, "APM registered successfully\n"); +#endif /* Make sure full I/O access is enabled */ if (xorgHWAccess) @@ -1216,9 +1222,11 @@ ddxGiveUp() { int i; +#ifdef XF86PM if (xf86OSPMClose) xf86OSPMClose(); xf86OSPMClose = NULL; +#endif xf86AccessLeaveState(); diff --git a/hw/xfree86/common/xf86MiscExt.c b/hw/xfree86/common/xf86MiscExt.c index 62d011f42..54c0cd510 100644 --- a/hw/xfree86/common/xf86MiscExt.c +++ b/hw/xfree86/common/xf86MiscExt.c @@ -62,7 +62,6 @@ #endif #include "xf86OSmouse.h" -#include "../input/mouse/mouse.h" #ifdef DEBUG # define DEBUG_P(x) ErrorF(x"\n"); |