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 /hw/xfree86/parser/scan.c | |
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 'hw/xfree86/parser/scan.c')
-rw-r--r-- | hw/xfree86/parser/scan.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c index 4d7508773..7a9bb9305 100644 --- a/hw/xfree86/parser/scan.c +++ b/hw/xfree86/parser/scan.c @@ -522,7 +522,7 @@ xf86tokenString (void) return configRBuf; } -_X_EXPORT int +int xf86pathIsAbsolute(const char *path) { if (path && path[0] == '/') @@ -531,7 +531,7 @@ xf86pathIsAbsolute(const char *path) } /* A path is "safe" if it is relative and if it contains no ".." elements. */ -_X_EXPORT int +int xf86pathIsSafe(const char *path) { if (xf86pathIsAbsolute(path)) @@ -777,7 +777,7 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot, "%P/lib/X11/%X" #endif -_X_EXPORT const char * +const char * xf86openConfigFile(const char *path, const char *cmdline, const char *projroot) { char *pathcopy; @@ -854,7 +854,7 @@ xf86openConfigFile(const char *path, const char *cmdline, const char *projroot) return configPath; } -_X_EXPORT void +void xf86closeConfigFile (void) { xf86conffree (configPath); @@ -873,7 +873,7 @@ xf86closeConfigFile (void) } } -_X_EXPORT void +void xf86setBuiltinConfig(const char *config[]) { builtinConfig = config; @@ -948,7 +948,7 @@ StringToToken (char *str, xf86ConfigSymTabRec * tab) * Compare two names. The characters '_', ' ', and '\t' are ignored * in the comparison. */ -_X_EXPORT int +int xf86nameCompare (const char *s1, const char *s2) { char c1, c2; @@ -982,7 +982,7 @@ xf86nameCompare (const char *s1, const char *s2) return (c1 - c2); } -_X_EXPORT char * +char * xf86addComment(char *cur, char *add) { char *str; |