Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly mark outdated Xserver ABI sections #356

Open
wants to merge 3 commits into
base: 3.6.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions nx-X11/programs/Xserver/composite/Imakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
NX_DEFINES = -DNXAGENT_SERVER
#endif

DEFINES = \
$(NX_DEFINES) \
DEFINES = \
$(NX_DEFINES) \
-DXSERVER_LACKS_PRIVATES_ABI \
-DXSERVER_LACKS_XACE_EXT \
$(NULL)

NormalLibraryTarget(composite,$(OBJS))
Expand Down
18 changes: 9 additions & 9 deletions nx-X11/programs/Xserver/composite/compext.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@

static CARD8 CompositeReqCode;

#ifndef NXAGENT_SERVER
#ifndef XSERVER_LACKS_PRIVATES_ABI
static DevPrivateKeyRec CompositeClientPrivateKeyRec;

#define CompositeClientPrivateKey (&CompositeClientPrivateKeyRec)
#else /* !defined(NXAGENT_SERVER) */
#else /* !defined(XSERVER_LACKS_PRIVATES_ABI) */
static int CompositeClientPrivIndex = -1;
#endif /* !defined(NXAGENT_SERVER) */
#endif /* !defined(XSERVER_LACKS_PRIVATES_ABI) */

RESTYPE CompositeClientWindowType;
RESTYPE CompositeClientSubwindowsType;
Expand All @@ -51,13 +51,13 @@ typedef struct _CompositeClient {
int minor_version;
} CompositeClientRec, *CompositeClientPtr;

#ifndef NXAGENT_SERVER
#ifndef XSERVER_LACKS_PRIVATES_ABI
#define GetCompositeClient(pClient) ((CompositeClientPtr) \
dixLookupPrivate(&(pClient)->devPrivates, CompositeClientPrivateKey))
#else /* !defined(NXAGENT_SERVER) */
#else /* !defined(XSERVER_LACKS_PRIVATES_ABI) */
#define GetCompositeClient(pClient) ((CompositeClientPtr) \
(pClient)->devPrivates[CompositeClientPrivIndex].ptr)
#endif /* !edefined(NXAGENT_SERVER) */
#endif /* !edefined(XSERVER_LACKS_PRIVATES_ABI) */

static void
CompositeClientCallback (CallbackListPtr *list,
Expand Down Expand Up @@ -667,16 +667,16 @@ CompositeExtensionInit (void)
if (!CompositeClientOverlayType)
return;

#ifndef NXAGENT_SERVER
#ifndef XSERVER_LACKS_PRIVATES_ABI
if (!dixRegisterPrivateKey(&CompositeClientPrivateKeyRec, PRIVATE_CLIENT,
sizeof (CompositeClientRec)))
return;
#else /* !defined(NXAGENT_SERVER) */
#else /* !defined(XSERVER_LACKS_PRIVATES_ABI) */
if ((CompositeClientPrivIndex = AllocateClientPrivateIndex()) < 0)
return;
if (!AllocateClientPrivate(CompositeClientPrivIndex, sizeof (CompositeClientRec)))
return;
#endif /* !defined(NXAGENT_SERVER) */
#endif /* !defined(XSERVER_LACKS_PRIVATES_ABI) */

if (!AddCallback (&ClientStateCallback, CompositeClientCallback, 0))
return;
Expand Down
8 changes: 4 additions & 4 deletions nx-X11/programs/Xserver/composite/compinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
#include "compint.h"
#include "compositeext.h"

#ifndef NXAGENT_SERVER
#ifndef XSERVER_LACKS_PRIVATES_ABI
DevPrivateKeyRec CompScreenPrivateKeyRec;
DevPrivateKeyRec CompWindowPrivateKeyRec;
DevPrivateKeyRec CompSubwindowsPrivateKeyRec;
#else /* !defined(NXAGENT_SERVER) */
#else /* !defined(XSERVER_LACKS_PRIVATES_ABI) */
int CompScreenPrivIndex = -1;
int CompWindowPrivIndex = -1;
int CompSubwindowsPrivIndex = -1;
Expand Down Expand Up @@ -371,14 +371,14 @@ compScreenInit (ScreenPtr pScreen)
{
CompScreenPtr cs;

#ifndef NXAGENT_SERVER
#ifndef XSERVER_LACKS_PRIVATES_ABI
if (!dixRegisterPrivateKey(&CompScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
return FALSE;
if (!dixRegisterPrivateKey(&CompWindowPrivateKeyRec, PRIVATE_WINDOW, 0))
return FALSE;
if (!dixRegisterPrivateKey(&CompSubwindowsPrivateKeyRec, PRIVATE_WINDOW, 0))
return FALSE;
#else /* !defined(NXAGENT_SERVER) */
#else /* !defined(XSERVER_LACKS_PRIVATES_ABI) */
if ((CompScreenPrivIndex = AllocateScreenPrivateIndex()) < 0)
return FALSE;
if ((CompWindowPrivIndex = AllocateWindowPrivateIndex()) < 0)
Expand Down
12 changes: 6 additions & 6 deletions nx-X11/programs/Xserver/composite/compint.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ typedef struct _CompScreen {
SourceValidateProcPtr SourceValidate;
} CompScreenRec, *CompScreenPtr;

#ifndef NXAGENT_SERVER
#ifndef XSERVER_LACKS_PRIVATES_ABI
extern DevPrivateKeyRec CompScreenPrivateKeyRec;

#define CompScreenPrivateKey (&CompScreenPrivateKeyRec)
Expand All @@ -179,33 +179,33 @@ extern DevPrivateKeyRec CompSubwindowsPrivateKeyRec;
dixLookupPrivate(&(w)->devPrivates, CompWindowPrivateKey))
#define GetCompSubwindows(w) ((CompSubwindowsPtr) \
dixLookupPrivate(&(w)->devPrivates, CompSubwindowsPrivateKey))
#else /* !defined(NXAGENT_SERVER) */
#else /* !defined(XSERVER_LACKS_PRIVATES_ABI) */
extern int CompScreenPrivIndex;
extern int CompWindowPrivIndex;
extern int CompSubwindowsPrivIndex;

#define GetCompScreen(s) ((CompScreenPtr) (s)->devPrivates[CompScreenPrivIndex].ptr)
#define GetCompWindow(w) ((CompWindowPtr) (w)->devPrivates[CompWindowPrivIndex].ptr)
#define GetCompSubwindows(w) ((CompSubwindowsPtr) (w)->devPrivates[CompSubwindowsPrivIndex].ptr)
#endif /* !defined(NXAGENT_SERVER) */
#endif /* !defined(XSERVER_LACKS_PRIVATES_ABI) */

extern RESTYPE CompositeClientSubwindowsType;
extern RESTYPE CompositeClientOverlayType;

/* Shim for less ifdefs within the actual code. */
#ifndef NXAGENT_SERVER
#ifndef XSERVER_LACKS_PRIVATES_ABI
#define FAKE_DIX_SET_PRIVATE_IMPL(obj, privateKey, ptr_val) do { dixSetPrivate(&(obj)->devPrivates, privateKey, ptr_val); } while (0)

#define FAKE_DIX_SET_SCREEN_PRIVATE(pScreen, ptr_val) FAKE_DIX_SET_PRIVATE_IMPL(pScreen, CompScreenPrivateKey, ptr_val)
#define FAKE_DIX_SET_WINDOW_PRIVATE(pWin, ptr_val) FAKE_DIX_SET_PRIVATE_IMPL(pWin, CompWindowPrivateKey, ptr_val)
#define FAKE_DIX_SET_SUBWINDOWS_PRIVATE(pWin, ptr_val) FAKE_DIX_SET_PRIVATE_IMPL(pWin, CompSubwindowsPrivateKey, ptr_val)
#else /* !defined(NXAGENT_SERVER) */
#else /* !defined(XSERVER_LACKS_PRIVATES_ABI) */
#define FAKE_DIX_SET_PRIVATE_IMPL(obj, privIndex, ptr_val) do { (obj)->devPrivates[privIndex].ptr = (void *) (ptr_val); } while (0)

#define FAKE_DIX_SET_SCREEN_PRIVATE(pScreen, ptr_val) FAKE_DIX_SET_PRIVATE_IMPL(pScreen, CompScreenPrivIndex, ptr_val)
#define FAKE_DIX_SET_WINDOW_PRIVATE(pWin, ptr_val) FAKE_DIX_SET_PRIVATE_IMPL(pWin, CompWindowPrivIndex, ptr_val)
#define FAKE_DIX_SET_SUBWINDOWS_PRIVATE(pWin, ptr_val) FAKE_DIX_SET_PRIVATE_IMPL(pWin, CompSubwindowsPrivIndex, ptr_val)
#endif /* !defined(NXAGENT_SERVER) */
#endif /* !defined(XSERVER_LACKS_PRIVATES_ABI) */

/*
* compalloc.c
Expand Down
2 changes: 1 addition & 1 deletion nx-X11/programs/Xserver/composite/compoverlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#endif

#include "compint.h"
#ifndef NXAGENT_SERVER
#ifndef XSERVER_LACKS_XACE_EXT
#include "xace.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion nx-X11/programs/Xserver/composite/compwindow.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static Bool
compRepaintBorder (ClientPtr pClient, void * closure)
{
WindowPtr pWindow;
#ifndef NXAGENT_SERVER
#ifndef XSERVER_LACKS_PRIVATES_ABI
int rc =
dixLookupWindow(&pWindow, (XID) (intptr_t) closure, pClient,
DixWriteAccess);
Expand Down
1 change: 1 addition & 0 deletions nx-X11/programs/Xserver/hw/nxagent/Imakefile
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ DEFINES = \
-DRANDR_15_INTERFACE=1 \
-DPANORAMIX \
-UDEBUG_TREE \
-DXSERVER_LACKS_PRIVATES_ABI \
$(NULL)

all:: $(OBJS)
Expand Down
11 changes: 8 additions & 3 deletions nx-X11/programs/Xserver/randr/Imakefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,14 @@

LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln

DEFINES = \
$(PNRX_DEFINES) \
$(NX_DEFINES) \
DEFINES = \
$(PNRX_DEFINES) \
$(NX_DEFINES) \
-DXSERVER_EVENT_STILL_NEEDS_SEQNO \
-DXSERVER_LACKS_PRIVATES_ABI \
-DXSERVER_OLD_CLOSE_SCREEN_ABI \
-DXSERVER_OLD_DEVICE_ABI \
-DXSERVER_OLD_RESOURCE_NAME_ABI \
$(NULL)

NormalLibraryTarget(randr,$(OBJS))
Expand Down
38 changes: 19 additions & 19 deletions nx-X11/programs/Xserver/randr/randr.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ int RREventBase;
int RRErrorBase;
RESTYPE RRClientType, RREventType; /* resource types for event masks */

#ifndef NXAGENT_SERVER
#ifndef XSERVER_LACKS_PRIVATES_ABI
DevPrivateKey RRClientPrivateKey = &RRClientPrivateKey;
DevPrivateKey rrPrivKey = &rrPrivKey;
#else
Expand Down Expand Up @@ -118,7 +118,7 @@ RRClientCallback(CallbackListPtr *list, void *closure, void *data)

static Bool
RRCloseScreen(
#ifdef NXAGENT_SERVER
#ifdef XSERVER_OLD_CLOSE_SCREEN_ABI
int i,
#endif
ScreenPtr pScreen)
Expand Down Expand Up @@ -297,7 +297,7 @@ Bool
RRInit(void)
{
if (RRGeneration != serverGeneration) {
#ifdef NXAGENT_SERVER
#ifdef XSERVER_LACKS_PRIVATES_ABI
if ((rrPrivIndex = AllocateScreenPrivateIndex()) < 0)
return FALSE;
#endif
Expand All @@ -311,10 +311,10 @@ RRInit(void)
return FALSE;
RRGeneration = serverGeneration;
}
#ifndef NXAGENT_SERVER
#ifndef XSERVER_LACKS_PRIVATES_ABI
if (!dixRegisterPrivateKey(&rrPrivKeyRec, PRIVATE_SCREEN, 0))
return FALSE;
#endif /* !defined(NXAGENT_SERVER) */
#endif /* !defined(XSERVER_LACKS_PRIVATES_ABI) */

return TRUE;
}
Expand Down Expand Up @@ -393,12 +393,12 @@ RRFreeClient(void *data, XID id)

pRREvent = (RREventPtr) data;
pWin = pRREvent->window;
#ifndef NXAGENT_SERVER
#ifndef XSERVER_LACKS_PRIVATES_ABI
dixLookupResourceByType((void **) &pHead, pWin->drawable.id,
RREventType, serverClient, DixDestroyAccess);
#else /* !defined(NXAGENT_SERVER) */
#else /* !defined(XSERVER_LACKS_PRIVATES_ABI) */
pHead = (RREventPtr *) LookupIDByType(pWin->drawable.id, RREventType);
#endif /* !defined(NXAGENT_SERVER) */
#endif /* !defined(XSERVER_LACKS_PRIVATES_ABI) */

if (pHead) {
pPrev = 0;
Expand Down Expand Up @@ -438,43 +438,43 @@ RRExtensionInit(void)
if (RRNScreens == 0)
return;

#ifndef NXAGENT_SERVER
#ifndef XSERVER_LACKS_PRIVATES_ABI
if (!dixRegisterPrivateKey(&RRClientPrivateKeyRec, PRIVATE_CLIENT,
sizeof(RRClientRec) +
screenInfo.numScreens * sizeof(RRTimesRec)))
return;
#else /* !defined(NXAGENT_SERVER) */
#else /* !defined(XSERVER_LACKS_PRIVATES_ABI) */
RRClientPrivateIndex = AllocateClientPrivateIndex();
if (!AllocateClientPrivate(RRClientPrivateIndex,
sizeof(RRClientRec) +
screenInfo.numScreens * sizeof(RRTimesRec)))
return;
#endif /* !defined(NXAGENT_SERVER) */
#endif /* !defined(XSERVER_LACKS_PRIVATES_ABI) */

if (!AddCallback(&ClientStateCallback, RRClientCallback, 0))
return;

RRClientType = CreateNewResourceType(RRFreeClient
#ifndef NXAGENT_SERVER
#ifndef XSERVER_OLD_RESOURCE_NAME_ABI
, "RandRClient"
#endif
);
if (!RRClientType)
return;

#ifdef NXAGENT_SERVER
#ifdef XSERVER_OLD_RESOURCE_NAME_ABI
RegisterResourceName(RRClientType, "RandRClient");
#endif

RREventType = CreateNewResourceType(RRFreeEvents
#ifndef NXAGENT_SERVER
#ifndef XSERVER_OLD_RESOURCE_NAME_ABI
, "RandREvent"
#endif
);
if (!RREventType)
return;

#ifdef NXAGENT_SERVER
#ifdef XSERVER_OLD_RESOURCE_NAME_ABI
RegisterResourceName(RREventType, "RandREvent");
#endif

Expand Down Expand Up @@ -518,7 +518,7 @@ RRDeliverResourceEvent(ClientPtr client, WindowPtr pWin)
xRRResourceChangeNotifyEvent re = {
.type = RRNotify + RREventBase,
.subCode = RRNotify_ResourceChange,
#ifdef NXAGENT_SERVER
#ifdef XSERVER_EVENT_STILL_NEEDS_SEQNO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used but not defined.

.sequenceNumber = client->sequence,
#endif
.timestamp = pScrPriv->lastSetTime.milliseconds,
Expand All @@ -543,12 +543,12 @@ TellChanged(WindowPtr pWin, void *value)
rrScrPriv(pScreen);
int i;

#ifndef NXAGENT_SERVER
#ifndef XSERVER_LACKS_PRIVATES_ABI
dixLookupResourceByType((void **) &pHead, pWin->drawable.id,
RREventType, serverClient, DixReadAccess);
#else /* !defined(NXAGENT_SERVER) */
#else /* !defined(XSERVER_LACKS_PRIVATES_ABI) */
pHead = (RREventPtr *) LookupIDByType(pWin->drawable.id, RREventType);
#endif /* !defined(NXAGENT_SERVER) */
#endif /* !defined(XSERVER_LACKS_PRIVATES_ABI) */
if (!pHead)
return WT_WALKCHILDREN;

Expand Down
Loading