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/Flags.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/Flags.c')
-rw-r--r-- | hw/xfree86/parser/Flags.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/hw/xfree86/parser/Flags.c b/hw/xfree86/parser/Flags.c index 6eb48e367..8f44ea5ec 100644 --- a/hw/xfree86/parser/Flags.c +++ b/hw/xfree86/parser/Flags.c @@ -216,7 +216,7 @@ addNewOption2 (XF86OptionPtr head, char *name, char *val, int used) return ((XF86OptionPtr) xf86addListItem ((glp) head, (glp) new)); } -_X_EXPORT XF86OptionPtr +XF86OptionPtr xf86addNewOption (XF86OptionPtr head, char *name, char *val) { return addNewOption2(head, name, val, 0); @@ -232,7 +232,7 @@ xf86freeFlags (XF86ConfFlagsPtr flags) xf86conffree (flags); } -_X_EXPORT XF86OptionPtr +XF86OptionPtr xf86optionListDup (XF86OptionPtr opt) { XF86OptionPtr newopt = NULL; @@ -249,7 +249,7 @@ xf86optionListDup (XF86OptionPtr opt) return newopt; } -_X_EXPORT void +void xf86optionListFree (XF86OptionPtr opt) { XF86OptionPtr prev; @@ -265,7 +265,7 @@ xf86optionListFree (XF86OptionPtr opt) } } -_X_EXPORT char * +char * xf86optionName(XF86OptionPtr opt) { if (opt) @@ -273,7 +273,7 @@ xf86optionName(XF86OptionPtr opt) return 0; } -_X_EXPORT char * +char * xf86optionValue(XF86OptionPtr opt) { if (opt) @@ -281,7 +281,7 @@ xf86optionValue(XF86OptionPtr opt) return 0; } -_X_EXPORT XF86OptionPtr +XF86OptionPtr xf86newOption(char *name, char *value) { XF86OptionPtr opt; @@ -298,7 +298,7 @@ xf86newOption(char *name, char *value) return opt; } -_X_EXPORT XF86OptionPtr +XF86OptionPtr xf86nextOption(XF86OptionPtr list) { if (!list) @@ -312,7 +312,7 @@ xf86nextOption(XF86OptionPtr list) * NULL */ -_X_EXPORT XF86OptionPtr +XF86OptionPtr xf86findOption (XF86OptionPtr list, const char *name) { while (list) @@ -331,7 +331,7 @@ xf86findOption (XF86OptionPtr list, const char *name) * returned. If the option is not found, a NULL is returned. */ -_X_EXPORT char * +char * xf86findOptionValue (XF86OptionPtr list, const char *name) { XF86OptionPtr p = xf86findOption (list, name); @@ -346,7 +346,7 @@ xf86findOptionValue (XF86OptionPtr list, const char *name) return (NULL); } -_X_EXPORT XF86OptionPtr +XF86OptionPtr xf86optionListCreate( const char **options, int count, int used ) { XF86OptionPtr p = NULL; @@ -383,7 +383,7 @@ xf86optionListCreate( const char **options, int count, int used ) * is used. The end result is a single valid list of options. Duplicates * are freed, and the original lists are no longer guaranteed to be complete. */ -_X_EXPORT XF86OptionPtr +XF86OptionPtr xf86optionListMerge (XF86OptionPtr head, XF86OptionPtr tail) { XF86OptionPtr a, b, ap = NULL, bp = NULL; @@ -428,7 +428,7 @@ xf86optionListMerge (XF86OptionPtr head, XF86OptionPtr tail) return (head); } -_X_EXPORT char * +char * xf86uLongToString(unsigned long i) { char *s; @@ -442,7 +442,7 @@ xf86uLongToString(unsigned long i) return s; } -_X_EXPORT XF86OptionPtr +XF86OptionPtr xf86parseOption(XF86OptionPtr head) { XF86OptionPtr option, cnew, old; @@ -493,7 +493,7 @@ xf86parseOption(XF86OptionPtr head) return (head); } -_X_EXPORT void +void xf86printOptionList(FILE *fp, XF86OptionPtr list, int tabs) { int i; |