From 49f77fff1495c0a2050fb18f9b1fc627839bbfc2 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Wed, 3 Dec 2008 05:43:34 -0200 Subject: Rework symbol visibility for easier maintenance Save in a few special cases, _X_EXPORT should not be used in C source files. Instead, it should be used in headers, and the proper C source include that header. Some special cases are symbols that need to be shared between modules, but not expected to be used by external drivers, and symbols that are accessible via LoaderSymbol/dlopen. This patch also adds conditionally some new sdk header files, depending on extensions enabled. These files were added to match pattern for other extensions/modules, that is, have the headers "deciding" symbol visibility in the sdk. These headers are: o Xext/panoramiXsrv.h, Xext/panoramiX.h o fbpict.h (unconditionally) o vidmodeproc.h o mioverlay.h (unconditionally, used only by xaa) o xfixes.h (unconditionally, symbols required by dri2) LoaderSymbol and similar functions now don't have different prototypes, in loaderProcs.h and xf86Module.h, so that both headers can be included, without the need of defining IN_LOADER. xf86NewInputDevice() device prototype readded to xf86Xinput.h, but not exported (and with a comment about it). --- dix/privates.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'dix/privates.c') diff --git a/dix/privates.c b/dix/privates.c index 0e8c9ef72..5eece697a 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -84,7 +84,7 @@ privateExists(PrivateRec **privates, const DevPrivateKey key) /* * Request pre-allocated space. */ -_X_EXPORT int +int dixRequestPrivate(const DevPrivateKey key, unsigned size) { PrivateDescRec *item = findItem(key); @@ -98,7 +98,7 @@ dixRequestPrivate(const DevPrivateKey key, unsigned size) /* * Allocate a private and attach it to an existing object. */ -_X_EXPORT pointer * +pointer * dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key) { PrivateDescRec *item = findItem(key); @@ -154,7 +154,7 @@ dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key) /* * Look up a private pointer. */ -_X_EXPORT pointer +pointer dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key) { pointer *ptr; @@ -169,7 +169,7 @@ dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key) /* * Look up the address of a private pointer. */ -_X_EXPORT pointer * +pointer * dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key) { if (privateExists(privates, key)) @@ -181,7 +181,7 @@ dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key) /* * Set a private pointer. */ -_X_EXPORT int +int dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val) { top: @@ -198,7 +198,7 @@ dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val) /* * Called to free privates at object deletion time. */ -_X_EXPORT void +void dixFreePrivates(PrivateRec *privates) { int i; @@ -223,7 +223,7 @@ dixFreePrivates(PrivateRec *privates) /* * Callback registration */ -_X_EXPORT int +int dixRegisterPrivateInitFunc(const DevPrivateKey key, CallbackProcPtr callback, pointer data) { @@ -234,7 +234,7 @@ dixRegisterPrivateInitFunc(const DevPrivateKey key, return AddCallback(&item->initfuncs, callback, data); } -_X_EXPORT int +int dixRegisterPrivateDeleteFunc(const DevPrivateKey key, CallbackProcPtr callback, pointer data) { @@ -265,7 +265,7 @@ static int offsetsSize = 0; /* * Specify where the devPrivates field is located in a structure type */ -_X_EXPORT int +int dixRegisterPrivateOffset(RESTYPE type, int offset) { type = type & TypeMask; @@ -287,7 +287,7 @@ dixRegisterPrivateOffset(RESTYPE type, int offset) return TRUE; } -_X_EXPORT int +int dixLookupPrivateOffset(RESTYPE type) { type = type & TypeMask; @@ -295,7 +295,7 @@ dixLookupPrivateOffset(RESTYPE type) return offsets[type]; } -_X_EXPORT int +int dixResetPrivates(void) { int i; -- cgit v1.2.3