diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-12-03 05:43:34 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-12-03 05:43:34 -0200 |
commit | 49f77fff1495c0a2050fb18f9b1fc627839bbfc2 (patch) | |
tree | eebaec908150abfc0159d9ee941404918f553113 /xfixes | |
parent | 0b8f8b24f718820a72ebdc52423c2e6a44e848c5 (diff) |
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).
Diffstat (limited to 'xfixes')
-rw-r--r-- | xfixes/Makefile.am | 4 | ||||
-rw-r--r-- | xfixes/region.c | 2 | ||||
-rw-r--r-- | xfixes/xfixes.c | 2 | ||||
-rw-r--r-- | xfixes/xfixes.h | 6 |
4 files changed, 9 insertions, 5 deletions
diff --git a/xfixes/Makefile.am b/xfixes/Makefile.am index 2a95c065b..a8425e8ea 100644 --- a/xfixes/Makefile.am +++ b/xfixes/Makefile.am @@ -2,6 +2,10 @@ noinst_LTLIBRARIES = libxfixes.la AM_CFLAGS = $(DIX_CFLAGS) +if XORG +sdk_HEADERS = xfixes.h +endif + libxfixes_la_SOURCES = \ cursor.c \ region.c \ diff --git a/xfixes/region.c b/xfixes/region.c index ae4805894..6db787f60 100644 --- a/xfixes/region.c +++ b/xfixes/region.c @@ -34,7 +34,7 @@ extern int RenderErrBase; #include <gcstruct.h> #include <window.h> -_X_EXPORT RESTYPE RegionResType; +RESTYPE RegionResType; static int RegionResFree (pointer data, XID id) diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c index aadbc0d10..d1225c6f3 100644 --- a/xfixes/xfixes.c +++ b/xfixes/xfixes.c @@ -55,7 +55,7 @@ static unsigned char XFixesReqCode; int XFixesEventBase; -_X_EXPORT int XFixesErrorBase; +int XFixesErrorBase; static int XFixesClientPrivateKeyIndex; static DevPrivateKey XFixesClientPrivateKey = &XFixesClientPrivateKeyIndex; diff --git a/xfixes/xfixes.h b/xfixes/xfixes.h index 81dd83daf..ade2f8236 100644 --- a/xfixes/xfixes.h +++ b/xfixes/xfixes.h @@ -29,8 +29,8 @@ #include "resource.h" -extern RESTYPE RegionResType; -extern int XFixesErrorBase; +extern _X_EXPORT RESTYPE RegionResType; +extern _X_EXPORT int XFixesErrorBase; #define VERIFY_REGION(pRegion, rid, client, mode) { \ pRegion = SecurityLookupIDByType (client, rid, RegionResType, mode); \ @@ -45,7 +45,7 @@ extern int XFixesErrorBase; if (rid) VERIFY_REGION(pRegion, rid, client, mode); \ } -RegionPtr +extern _X_EXPORT RegionPtr XFixesRegionCopy (RegionPtr pRegion); |