diff options
Diffstat (limited to 'hw')
36 files changed, 134 insertions, 72 deletions
diff --git a/hw/dmx/dmxscrinit.c b/hw/dmx/dmxscrinit.c index 0e49e9677..736075094 100644 --- a/hw/dmx/dmxscrinit.c +++ b/hw/dmx/dmxscrinit.c @@ -67,15 +67,22 @@ static Bool dmxSaveScreen(ScreenPtr pScreen, int what); static unsigned long dmxGeneration; static unsigned long *dmxCursorGeneration; +static int dmxGCPrivateKeyIndex; DevPrivateKey dmxGCPrivateKey = &dmxGCPrivateKey; /**< Private index for GCs */ -DevPrivateKey dmxWinPrivateKey = &dmxWinPrivateKey; /**< Private index for Windows */ -DevPrivateKey dmxPixPrivateKey = &dmxPixPrivateKey; /**< Private index for Pixmaps */ +static int dmxWinPrivateKeyIndex; +DevPrivateKey dmxWinPrivateKey = &dmxWinPrivateKeyIndex; /**< Private index for Windows */ +static int dmxPixPrivateKeyIndex; +DevPrivateKey dmxPixPrivateKey = &dmxPixPrivateKeyIndex; /**< Private index for Pixmaps */ int dmxFontPrivateIndex; /**< Private index for Fonts */ -DevPrivateKey dmxScreenPrivateKey = &dmxScreenPrivateKey; /**< Private index for Screens */ -DevPrivateKey dmxColormapPrivateKey = &dmxColormapPrivateKey; /**< Private index for Colormaps */ +static int dmxScreenPrivateKeyIndex; +DevPrivateKey dmxScreenPrivateKey = &dmxScreenPrivateKeyIndex; /**< Private index for Screens */ +static int dmxColormapPrivateKeyIndex; +DevPrivateKey dmxColormapPrivateKey = &dmxColormapPrivateKeyIndex; /**< Private index for Colormaps */ #ifdef RENDER -DevPrivateKey dmxPictPrivateKey = &dmxPictPrivateKey; /**< Private index for Picts */ -DevPrivateKey dmxGlyphSetPrivateKey = &dmxGlyphSetPrivateKey; /**< Private index for GlyphSets */ +static int dmxPictPrivateKeyIndex; +DevPrivateKey dmxPictPrivateKey = &dmxPictPrivateKeyIndex; /**< Private index for Picts */ +static int dmxGlyphSetPrivateKeyIndex; +DevPrivateKey dmxGlyphSetPrivateKey = &dmxGlyphSetPrivateKeyIndex; /**< Private index for GlyphSets */ #endif /** Initialize the parts of screen \a idx that require access to the diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c index 05cecf478..a906ad170 100644 --- a/hw/kdrive/ephyr/ephyrdriext.c +++ b/hw/kdrive/ephyr/ephyrdriext.c @@ -111,8 +111,10 @@ static Bool findWindowPairFromLocal (WindowPtr a_local, static unsigned char DRIReqCode = 0; -static DevPrivateKey ephyrDRIWindowKey = &ephyrDRIWindowKey; -static DevPrivateKey ephyrDRIScreenKey = &ephyrDRIScreenKey; +static int ephyrDRIWindowKeyIndex; +static DevPrivateKey ephyrDRIWindowKey = &ephyrDRIWindowKeyIndex; +static int ephyrDRIScreenKeyIndex; +static DevPrivateKey ephyrDRIScreenKey = &ephyrDRIScreenKeyIndex; #define GET_EPHYR_DRI_WINDOW_PRIV(win) ((EphyrDRIWindowPrivPtr) \ dixLookupPrivate(&(win)->devPrivates, ephyrDRIWindowKey)) diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index 9e27840b7..1478a944d 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -67,7 +67,8 @@ KdDepths kdDepths[] = { #define KD_DEFAULT_BUTTONS 5 -DevPrivateKey kdScreenPrivateKey = &kdScreenPrivateKey; +static int kdScreenPrivateKeyIndex; +DevPrivateKey kdScreenPrivateKey = &kdScreenPrivateKeyIndex; unsigned long kdGeneration; Bool kdVideoTest; diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c index 83ca3935f..9a74654af 100644 --- a/hw/kdrive/src/kxv.c +++ b/hw/kdrive/src/kxv.c @@ -103,9 +103,10 @@ static void KdXVClipNotify(WindowPtr pWin, int dx, int dy); /* misc */ static Bool KdXVInitAdaptors(ScreenPtr, KdVideoAdaptorPtr*, int); - -DevPrivateKey KdXVWindowKey = &KdXVWindowKey; -DevPrivateKey KdXvScreenKey = &KdXvScreenKey; +static int KdXVWindowKeyIndex; +DevPrivateKey KdXVWindowKey = &KdXVWindowKeyIndex; +static int KdXvScreenKeyIndex; +DevPrivateKey KdXvScreenKey = &KdXvScreenKeyIndex; static unsigned long KdXVGeneration = 0; static unsigned long PortResource = 0; diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index a7e24a65f..4dd31d899 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -50,7 +50,8 @@ #include "mi.h" -static DevPrivateKey DGAScreenKey = NULL; +static int DGAScreenKeyIndex; +static DevPrivateKey DGAScreenKey; static int mieq_installed = 0; static Bool DGACloseScreen(int i, ScreenPtr pScreen); @@ -116,7 +117,7 @@ DGAInit( if(!modes || num <= 0) return FALSE; - DGAScreenKey = &DGAScreenKey; + DGAScreenKey = &DGAScreenKeyIndex; if(!(pScreenPriv = (DGAScreenPtr)xalloc(sizeof(DGAScreenRec)))) return FALSE; diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c index 4fb901aae..5ee5e2451 100644 --- a/hw/xfree86/common/xf86DPMS.c +++ b/hw/xfree86/common/xf86DPMS.c @@ -47,7 +47,8 @@ #ifdef DPMSExtension -static DevPrivateKey DPMSKey = NULL; +static int DPMSKeyIndex; +static DevPrivateKey DPMSKey; static Bool DPMSClose(int i, ScreenPtr pScreen); static int DPMSCount = 0; #endif @@ -62,7 +63,7 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) pointer DPMSOpt; MessageType enabled_from = X_INFO; - DPMSKey = &DPMSKey; + DPMSKey = &DPMSKeyIndex; if (DPMSDisabledSwitch) DPMSEnabled = FALSE; diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c index 23626296a..dffe98863 100644 --- a/hw/xfree86/common/xf86Globals.c +++ b/hw/xfree86/common/xf86Globals.c @@ -47,10 +47,13 @@ /* Globals that video drivers may access */ /* Index into pScreen.devPrivates */ -DevPrivateKey xf86CreateRootWindowKey = &xf86CreateRootWindowKey; +static int xf86CreateRootWindowKeyIndex; +DevPrivateKey xf86CreateRootWindowKey = &xf86CreateRootWindowKeyIndex; /* Index of ScrnInfo in pScreen.devPrivates */ -_X_EXPORT DevPrivateKey xf86ScreenKey = &xf86ScreenKey; -_X_EXPORT DevPrivateKey xf86PixmapKey = &xf86PixmapKey; +static int xf86ScreenKeyIndex; +_X_EXPORT DevPrivateKey xf86ScreenKey = &xf86ScreenKeyIndex; +static int xf86PixmapKeyIndex; +_X_EXPORT DevPrivateKey xf86PixmapKey = &xf86PixmapKeyIndex; _X_EXPORT ScrnInfoPtr *xf86Screens = NULL; /* List of ScrnInfos */ _X_EXPORT const unsigned char byte_reversed[256] = { diff --git a/hw/xfree86/common/xf86RAC.c b/hw/xfree86/common/xf86RAC.c index 8215f9827..24d29e445 100644 --- a/hw/xfree86/common/xf86RAC.c +++ b/hw/xfree86/common/xf86RAC.c @@ -256,8 +256,10 @@ static miPointerSpriteFuncRec RACSpriteFuncs = { RACSpriteMoveCursor }; -static DevPrivateKey RACScreenKey = &RACScreenKey; -static DevPrivateKey RACGCKey = &RACGCKey; +static int RACScreenKeyIndex; +static DevPrivateKey RACScreenKey = &RACScreenKeyIndex; +static int RACGCKeyIndex; +static DevPrivateKey RACGCKey = &RACGCKeyIndex; Bool diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c index 10ec37070..847191475 100644 --- a/hw/xfree86/common/xf86RandR.c +++ b/hw/xfree86/common/xf86RandR.c @@ -46,7 +46,8 @@ typedef struct _xf86RandRInfo { Rotation rotation; } XF86RandRInfoRec, *XF86RandRInfoPtr; -static DevPrivateKey xf86RandRKey = NULL; +static int xf86RandRKeyIndex; +static DevPrivateKey xf86RandRKey; #define XF86RANDRINFO(p) ((XF86RandRInfoPtr)dixLookupPrivate(&(p)->devPrivates, xf86RandRKey)) @@ -423,7 +424,7 @@ xf86RandRInit (ScreenPtr pScreen) return TRUE; #endif - xf86RandRKey = &xf86RandRKey; + xf86RandRKey = &xf86RandRKeyIndex; randrp = xalloc (sizeof (XF86RandRInfoRec)); if (!randrp) diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c index 9260bb57b..24fccd31b 100644 --- a/hw/xfree86/common/xf86VidMode.c +++ b/hw/xfree86/common/xf86VidMode.c @@ -47,7 +47,8 @@ #include "vidmodeproc.h" #include "xf86cmap.h" -static DevPrivateKey VidModeKey = NULL; +static int VidModeKeyIndex; +static DevPrivateKey VidModeKey; static int VidModeCount = 0; static Bool VidModeClose(int i, ScreenPtr pScreen); @@ -72,7 +73,7 @@ VidModeExtensionInit(ScreenPtr pScreen) return FALSE; } - VidModeKey = &VidModeKey; + VidModeKey = &VidModeKeyIndex; if (!dixSetPrivate(&pScreen->devPrivates, VidModeKey, xcalloc(sizeof(VidModeRec), 1))) { diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c index 8ae193a52..e57844764 100644 --- a/hw/xfree86/common/xf86cmap.c +++ b/hw/xfree86/common/xf86cmap.c @@ -101,8 +101,10 @@ typedef struct { int overscan; } CMapColormapRec, *CMapColormapPtr; -static DevPrivateKey CMapScreenKey = NULL; -static DevPrivateKey CMapColormapKey = &CMapColormapKey; +static int CMapScreenKeyIndex; +static DevPrivateKey CMapScreenKey; +static int CMapColormapKeyIndex; +static DevPrivateKey CMapColormapKey = &CMapColormapKeyIndex; static void CMapInstallColormap(ColormapPtr); static void CMapStoreColors(ColormapPtr, int, xColorItem *); @@ -142,7 +144,7 @@ _X_EXPORT Bool xf86HandleColormaps( if(!maxColors || !sigRGBbits || !loadPalette) return FALSE; - CMapScreenKey = &CMapScreenKey; + CMapScreenKey = &CMapScreenKeyIndex; elements = 1 << sigRGBbits; diff --git a/hw/xfree86/common/xf86fbman.c b/hw/xfree86/common/xf86fbman.c index 9fd2e6c70..5471c58f0 100644 --- a/hw/xfree86/common/xf86fbman.c +++ b/hw/xfree86/common/xf86fbman.c @@ -42,14 +42,15 @@ #define DEBUG */ -static DevPrivateKey xf86FBManagerKey = NULL; +static int xf86FBManagerKeyIndex; +static DevPrivateKey xf86FBManagerKey; _X_EXPORT Bool xf86RegisterOffscreenManager( ScreenPtr pScreen, FBManagerFuncsPtr funcs ){ - xf86FBManagerKey = &xf86FBManagerKey; + xf86FBManagerKey = &xf86FBManagerKeyIndex; dixSetPrivate(&pScreen->devPrivates, xf86FBManagerKey, funcs); return TRUE; @@ -269,7 +270,8 @@ xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen) \************************************************************/ -static DevPrivateKey xf86FBScreenKey = &xf86FBScreenKey; +static int xf86FBScreenKeyIndex; +static DevPrivateKey xf86FBScreenKey = &xf86FBScreenKeyIndex; typedef struct _FBLink { FBArea area; diff --git a/hw/xfree86/common/xf86sbusBus.c b/hw/xfree86/common/xf86sbusBus.c index 63d1cb31c..af2b14539 100644 --- a/hw/xfree86/common/xf86sbusBus.c +++ b/hw/xfree86/common/xf86sbusBus.c @@ -602,7 +602,8 @@ xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp) pScrn->virtualY = psdp->height; } -static DevPrivateKey sbusPaletteKey = &sbusPaletteKey; +static sbusPaletteKeyIndex; +static DevPrivateKey sbusPaletteKey = &sbusPaletteKeyIndex; typedef struct _sbusCmap { sbusDevicePtr psdp; CloseScreenProcPtr CloseScreen; diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c index 7483e20d2..b263f9bd3 100644 --- a/hw/xfree86/common/xf86xv.c +++ b/hw/xfree86/common/xf86xv.c @@ -110,8 +110,10 @@ static void xf86XVAdjustFrame(int index, int x, int y, int flags); static Bool xf86XVInitAdaptors(ScreenPtr, XF86VideoAdaptorPtr*, int); -static DevPrivateKey XF86XVWindowKey = &XF86XVWindowKey; -DevPrivateKey XF86XvScreenKey; +static int XF86XVWindowKeyIndex; +static DevPrivateKey XF86XVWindowKey = &XF86XVWindowKeyIndex; +static int XF86XvScreenKeyIndex; +DevPrivateKey XF86XvScreenKey = &XF86XvScreenKeyIndex; static unsigned long PortResource = 0; DevPrivateKey (*XvGetScreenKeyProc)(void) = NULL; diff --git a/hw/xfree86/common/xf86xvmc.c b/hw/xfree86/common/xf86xvmc.c index 05267a240..41ef0a0ca 100644 --- a/hw/xfree86/common/xf86xvmc.c +++ b/hw/xfree86/common/xf86xvmc.c @@ -56,7 +56,8 @@ typedef struct { XvMCAdaptorPtr dixinfo; } xf86XvMCScreenRec, *xf86XvMCScreenPtr; -static DevPrivateKey XF86XvMCScreenKey = &XF86XvMCScreenKey; +static int XF86XvMCScreenKeyIndex; +static DevPrivateKey XF86XvMCScreenKey = &XF86XvMCScreenKeyIndex; #define XF86XVMC_GET_PRIVATE(pScreen) (xf86XvMCScreenPtr) \ dixLookupPrivate(&(pScreen)->devPrivates, XF86XvMCScreenKey) diff --git a/hw/xfree86/dixmods/extmod/xf86dga2.c b/hw/xfree86/dixmods/extmod/xf86dga2.c index 295e05e9e..c12178f56 100644 --- a/hw/xfree86/dixmods/extmod/xf86dga2.c +++ b/hw/xfree86/dixmods/extmod/xf86dga2.c @@ -62,7 +62,8 @@ unsigned char DGAReqCode = 0; int DGAErrorBase; int DGAEventBase; -static DevPrivateKey DGAClientPrivateKey = &DGAClientPrivateKey; +static int DGAClientPrivateKeyIndex; +static DevPrivateKey DGAClientPrivateKey = &DGAClientPrivateKeyIndex; static int DGACallbackRefCount = 0; /* This holds the client's version information */ diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c index 559f18b64..6485a0461 100644 --- a/hw/xfree86/dixmods/extmod/xf86vmode.c +++ b/hw/xfree86/dixmods/extmod/xf86vmode.c @@ -53,7 +53,8 @@ from Kaleb S. KEITHLEY #define DEFAULT_XF86VIDMODE_VERBOSITY 3 static int VidModeErrorBase; -static DevPrivateKey VidModeClientPrivateKey = &VidModeClientPrivateKey; +static int VidModeClientPrivateKeyIndex; +static DevPrivateKey VidModeClientPrivateKey = &VidModeClientPrivateKeyIndex; /* This holds the client's version information */ typedef struct { @@ -141,8 +142,9 @@ typedef struct _XF86VidModeScreenPrivate { XF86VidModeEventPtr events; Bool hasWindow; } XF86VidModeScreenPrivateRec, *XF86VidModeScreenPrivatePtr; - -static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKey; + +static int ScreenPrivateKeyIndex; +static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKeyIndex; #define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr) \ dixLookupPrivate(&(s)->devPrivates, ScreenPrivateKey)) diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index ac40e0fe0..d2599a9a8 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -79,8 +79,10 @@ extern Bool noPanoramiXExtension; #endif static int DRIEntPrivIndex = -1; -static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKey; -static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKey; +static int DRIScreenPrivKeyIndex; +static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKeyIndex; +static int DRIWindowPrivKeyIndex; +static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKeyIndex; static unsigned long DRIGeneration = 0; static unsigned int DRIDrawableValidationStamp = 0; @@ -343,7 +345,6 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) pDRIEntPriv = DRI_ENT_PRIV(pScrn); - DRIScreenPrivKey = &DRIScreenPrivKey; if (DRIGeneration != serverGeneration) DRIGeneration = serverGeneration; diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 74aef7196..a5aef9135 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -45,9 +45,12 @@ #include "xf86.h" -static DevPrivateKey dri2ScreenPrivateKey = &dri2ScreenPrivateKey; -static DevPrivateKey dri2WindowPrivateKey = &dri2WindowPrivateKey; -static DevPrivateKey dri2PixmapPrivateKey = &dri2PixmapPrivateKey; +static int dri2ScreenPrivateKeyIndex; +static DevPrivateKey dri2ScreenPrivateKey = &dri2ScreenPrivateKeyIndex; +static int dri2WindowPrivateKeyIndex; +static DevPrivateKey dri2WindowPrivateKey = &dri2WindowPrivateKeyIndex; +static int dri2PixmapPrivateKeyIndex; +static DevPrivateKey dri2PixmapPrivateKey = &dri2PixmapPrivateKeyIndex; typedef struct _DRI2DrawablePriv { unsigned int refCount; diff --git a/hw/xfree86/exa/examodule.c b/hw/xfree86/exa/examodule.c index 4a8d8f26a..601288c73 100644 --- a/hw/xfree86/exa/examodule.c +++ b/hw/xfree86/exa/examodule.c @@ -42,7 +42,8 @@ typedef struct _ExaXorgScreenPrivRec { OptionInfoPtr options; } ExaXorgScreenPrivRec, *ExaXorgScreenPrivPtr; -static DevPrivateKey exaXorgScreenPrivateKey = &exaXorgScreenPrivateKey; +static int exaXorgScreenPrivateKeyIndex; +static DevPrivateKey exaXorgScreenPrivateKey = &exaXorgScreenPrivateKeyIndex; typedef enum { EXAOPT_MIGRATION_HEURISTIC, diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c index ac0b438d3..2ae8ea776 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -63,6 +63,7 @@ static Bool xf86RandR12CreateScreenResources12 (ScreenPtr pScreen); static int xf86RandR12Generation; #if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) +static int xf86RandR12KeyIndex; static DevPrivateKey xf86RandR12Key; #define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \ dixLookupPrivate(&(p)->devPrivates, xf86RandR12Key)) @@ -499,7 +500,7 @@ xf86RandR12Init (ScreenPtr pScreen) xf86RandR12Generation = serverGeneration; #if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) - xf86RandR12Key = &xf86RandR12Key; + xf86RandR12Key = &xf86RandR12KeyIndex; #else xf86RandR12Index = AllocateScreenPrivateIndex(); #endif diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index be4fb908e..592eaadd8 100644 --- a/hw/xfree86/ramdac/xf86Cursor.c +++ b/hw/xfree86/ramdac/xf86Cursor.c @@ -18,7 +18,8 @@ #include "inputstr.h" extern InputInfo inputInfo; -DevPrivateKey xf86CursorScreenKey = &xf86CursorScreenKey; +static int xf86CursorScreenKeyIndex; +DevPrivateKey xf86CursorScreenKey = &xf86CursorScreenKeyIndex; /* sprite functions */ diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c index 74beefb67..ff775efbd 100644 --- a/hw/xfree86/shadowfb/shadow.c +++ b/hw/xfree86/shadowfb/shadow.c @@ -94,8 +94,10 @@ typedef struct { } ShadowGCRec, *ShadowGCPtr; -static DevPrivateKey ShadowScreenKey = &ShadowScreenKey; -static DevPrivateKey ShadowGCKey = &ShadowGCKey; +static int ShadowScreenKeyIndex; +static DevPrivateKey ShadowScreenKey = &ShadowScreenKeyIndex; +static int ShadowGCKeyIndex; +static DevPrivateKey ShadowGCKey = &ShadowGCKeyIndex; #define GET_SCREEN_PRIVATE(pScreen) \ (ShadowScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, ShadowScreenKey) diff --git a/hw/xfree86/xaa/xaaInit.c b/hw/xfree86/xaa/xaaInit.c index 22a35a0a0..deb198946 100644 --- a/hw/xfree86/xaa/xaaInit.c +++ b/hw/xfree86/xaa/xaaInit.c @@ -39,9 +39,12 @@ static int XAASetDGAMode(int index, int num, DGADevicePtr devRet); static void XAAEnableDisableFBAccess (int index, Bool enable); static Bool XAAChangeWindowAttributes (WindowPtr pWin, unsigned long mask); -static DevPrivateKey XAAScreenKey = &XAAScreenKey; -static DevPrivateKey XAAGCKey = &XAAGCKey; -static DevPrivateKey XAAPixmapKey = &XAAPixmapKey; +static int XAAScreenKeyIndex; +static DevPrivateKey XAAScreenKey = &XAAScreenKeyIndex; +static int XAAGCKeyIndex; +static DevPrivateKey XAAGCKey = &XAAGCKeyIndex; +static int XAAPixmapKeyIndex; +static DevPrivateKey XAAPixmapKey = &XAAPixmapKeyIndex; DevPrivateKey XAAGetScreenKey(void) { return XAAScreenKey; diff --git a/hw/xfree86/xaa/xaaOverlayDF.c b/hw/xfree86/xaa/xaaOverlayDF.c index 64ca998ee..8db816e1e 100644 --- a/hw/xfree86/xaa/xaaOverlayDF.c +++ b/hw/xfree86/xaa/xaaOverlayDF.c @@ -151,7 +151,8 @@ typedef struct { int (*TiledFillChooser)(GCPtr); } XAAOverlayRec, *XAAOverlayPtr; -static DevPrivateKey XAAOverlayKey = &XAAOverlayKey; +static int XAAOverlayKeyIndex; +static DevPrivateKey XAAOverlayKey = &XAAOverlayKeyIndex; #define GET_OVERLAY_PRIV(pScreen) \ (XAAOverlayPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAOverlayKey) diff --git a/hw/xfree86/xaa/xaaStateChange.c b/hw/xfree86/xaa/xaaStateChange.c index 443bda628..57d8aa318 100644 --- a/hw/xfree86/xaa/xaaStateChange.c +++ b/hw/xfree86/xaa/xaaStateChange.c @@ -274,7 +274,8 @@ typedef struct _XAAStateWrapRec { #endif } XAAStateWrapRec, *XAAStateWrapPtr; -static DevPrivateKey XAAStateKey = &XAAStateKey; +static int XAAStateKeyIndex; +static DevPrivateKey XAAStateKey = &XAAStateKeyIndex; /* Wrap functions start here */ #define GET_STATEPRIV_GC(pGC) XAAStateWrapPtr pStatePriv =\ diff --git a/hw/xfree86/xaa/xaaWrapper.c b/hw/xfree86/xaa/xaaWrapper.c index 5d6ea05cf..88418946f 100644 --- a/hw/xfree86/xaa/xaaWrapper.c +++ b/hw/xfree86/xaa/xaaWrapper.c @@ -129,8 +129,10 @@ typedef struct _xaaWrapperGCPriv { #define xaaWrapperGCPriv(pGC) xaaWrapperGCPrivPtr pGCPriv = xaaWrapperGetGCPriv(pGC) -static DevPrivateKey xaaWrapperScrPrivateKey = &xaaWrapperScrPrivateKey; -static DevPrivateKey xaaWrapperGCPrivateKey = &xaaWrapperGCPrivateKey; +static int xaaWrapperScrPrivateKeyIndex; +static DevPrivateKey xaaWrapperScrPrivateKey = &xaaWrapperScrPrivateKeyIndex; +static int xaaWrapperGCPrivateKeyIndex; +static DevPrivateKey xaaWrapperGCPrivateKey = &xaaWrapperGCPrivateKeyIndex; static Bool xaaWrapperCreateScreenResources(ScreenPtr pScreen) diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c index 06e6e0205..65425e98f 100644 --- a/hw/xnest/GC.c +++ b/hw/xnest/GC.c @@ -35,7 +35,8 @@ is" without express or implied warranty. #include "XNFont.h" #include "Color.h" -DevPrivateKey xnestGCPrivateKey = &xnestGCPrivateKey; +static int xnestGCPrivateKeyIndex; +DevPrivateKey xnestGCPrivateKey = &xnestGCPrivateKeyIndex; static GCFuncs xnestFuncs = { xnestValidateGC, diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c index 04311966d..08305b10b 100644 --- a/hw/xnest/Pixmap.c +++ b/hw/xnest/Pixmap.c @@ -33,7 +33,8 @@ is" without express or implied warranty. #include "Screen.h" #include "XNPixmap.h" -DevPrivateKey xnestPixmapPrivateKey = &xnestPixmapPrivateKey; +static int xnestPixmapPrivateKeyIndex; +DevPrivateKey xnestPixmapPrivateKey = &xnestPixmapPrivateKeyIndex; PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index 4e8616dd5..ca903d7ac 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -45,7 +45,8 @@ is" without express or implied warranty. Window xnestDefaultWindows[MAXSCREENS]; Window xnestScreenSaverWindows[MAXSCREENS]; -DevPrivateKey xnestCursorScreenKey = &xnestCursorScreenKey; +static int xnestCursorScreenKeyIndex; +DevPrivateKey xnestCursorScreenKey = &xnestCursorScreenKeyIndex; ScreenPtr xnestScreen(Window window) diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c index 23383e180..ae3487f4a 100644 --- a/hw/xnest/Window.c +++ b/hw/xnest/Window.c @@ -39,7 +39,8 @@ is" without express or implied warranty. #include "Events.h" #include "Args.h" -DevPrivateKey xnestWindowPrivateKey = &xnestWindowPrivateKey; +static int xnestWindowPrivateKeyIndex; +DevPrivateKey xnestWindowPrivateKey = &xnestWindowPrivateKeyIndex; static int xnestFindWindowMatch(WindowPtr pWin, pointer ptr) diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index 8107beb9f..559bc8960 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -85,7 +85,8 @@ FILE *debug_log_fp = NULL; * X server shared global variables */ int darwinScreensFound = 0; -DevPrivateKey darwinScreenKey = &darwinScreenKey; +static int darwinScreenKeyIndex; +DevPrivateKey darwinScreenKey = &darwinScreenKeyIndex; io_connect_t darwinParamConnect = 0; int darwinEventReadFD = -1; int darwinEventWriteFD = -1; diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c index c4b889ed0..b17e56170 100644 --- a/hw/xquartz/quartz.c +++ b/hw/xquartz/quartz.c @@ -71,7 +71,8 @@ int quartzUseAGL = 1; int quartzEnableKeyEquivalents = 1; int quartzServerVisible = TRUE; int quartzServerQuitting = FALSE; -DevPrivateKey quartzScreenKey = &quartzScreenKey; +static int quartzScreenKeyIndex; +DevPrivateKey quartzScreenKey = &quartzScreenKeyIndex; int aquaMenuBarHeight = 0; QuartzModeProcsPtr quartzProcs = NULL; const char *quartzOpenGLBundle = NULL; diff --git a/hw/xquartz/xpr/dri.c b/hw/xquartz/xpr/dri.c index 3aacb192d..5b79419dd 100644 --- a/hw/xquartz/xpr/dri.c +++ b/hw/xquartz/xpr/dri.c @@ -71,9 +71,12 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <AvailabilityMacros.h> -static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKey; -static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKey; -static DevPrivateKey DRIPixmapPrivKey = &DRIPixmapPrivKey; +static int DRIScreenPrivKeyIndex; +static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKeyIndex; +static int DRIWindowPrivKeyIndex; +static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKeyIndex; +static int DRIPixmapPrivKeyIndex; +static DevPrivateKey DRIPixmapPrivKey = &DRIPixmapPrivKeyIndex; static RESTYPE DRIDrawablePrivResType; diff --git a/hw/xquartz/xpr/xprCursor.c b/hw/xquartz/xpr/xprCursor.c index 76ab75c02..c1890a2e4 100644 --- a/hw/xquartz/xpr/xprCursor.c +++ b/hw/xquartz/xpr/xprCursor.c @@ -56,7 +56,8 @@ typedef struct { miPointerSpriteFuncPtr spriteFuncs; } QuartzCursorScreenRec, *QuartzCursorScreenPtr; -static DevPrivateKey darwinCursorScreenKey = &darwinCursorScreenKey; +static int darwinCursorScreenKeyIndex; +static DevPrivateKey darwinCursorScreenKey = &darwinCursorScreenKeyIndex; #define CURSOR_PRIV(pScreen) ((QuartzCursorScreenPtr) \ dixLookupPrivate(&pScreen->devPrivates, darwinCursorScreenKey)) diff --git a/hw/xwin/winglobals.c b/hw/xwin/winglobals.c index fddada39e..3eb6091e6 100644 --- a/hw/xwin/winglobals.c +++ b/hw/xwin/winglobals.c @@ -44,11 +44,16 @@ int g_iLastScreen = -1; #ifdef HAS_DEVWINDOWS int g_fdMessageQueue = WIN_FD_INVALID; #endif -DevPrivateKey g_iScreenPrivateKey = &g_iScreenPrivateKey; -DevPrivateKey g_iCmapPrivateKey = &g_iCmapPrivateKey; -DevPrivateKey g_iGCPrivateKey = &g_iGCPrivateKey; -DevPrivateKey g_iPixmapPrivateKey = &g_iPixmapPrivateKey; -DevPrivateKey g_iWindowPrivateKey = &g_iWindowPrivateKey; +static int g_iScreenPrivateKeyIndex; +DevPrivateKey g_iScreenPrivateKey = &g_iScreenPrivateKeyIndex; +static int g_iCmapPrivateKeyIndex; +DevPrivateKey g_iCmapPrivateKey = &g_iCmapPrivateKeyIndex; +static int g_iGCPrivateKeyIndex; +DevPrivateKey g_iGCPrivateKey = &g_iGCPrivateKeyIndex; +static int g_iPixmapPrivateKeyIndex; +DevPrivateKey g_iPixmapPrivateKey = &g_iPixmapPrivateKeyIndex; +static int g_iWindowPrivateKeyIndex; +DevPrivateKey g_iWindowPrivateKey = &g_iWindowPrivateKeyIndex; unsigned long g_ulServerGeneration = 0; Bool g_fInitializedDefaultScreens = FALSE; DWORD g_dwEnginesSupported = 0; |