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/os-support/linux | |
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/os-support/linux')
-rw-r--r-- | hw/xfree86/os-support/linux/int10/linux.c | 12 | ||||
-rw-r--r-- | hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c | 4 | ||||
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_agp.c | 20 | ||||
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_apm.c | 2 | ||||
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_axp.c | 12 | ||||
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_bell.c | 2 | ||||
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_init.c | 8 | ||||
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_kmod.c | 2 | ||||
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_pci.c | 2 | ||||
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_video.c | 24 |
10 files changed, 44 insertions, 44 deletions
diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c index 45ddaa894..8274bbbfb 100644 --- a/hw/xfree86/os-support/linux/int10/linux.c +++ b/hw/xfree86/os-support/linux/int10/linux.c @@ -71,7 +71,7 @@ static Int10LinuxSubModuleState int10LinuxLoadSubModule(ScrnInfoPtr pScrn); #endif /* DoSubModules */ -_X_EXPORT xf86Int10InfoPtr +xf86Int10InfoPtr xf86ExtendedInitInt10(int entityIndex, int Flags) { xf86Int10InfoPtr pInt = NULL; @@ -334,7 +334,7 @@ error0: return NULL; } -_X_EXPORT Bool +Bool MapCurrentInt10(xf86Int10InfoPtr pInt) { pointer addr; @@ -393,7 +393,7 @@ MapCurrentInt10(xf86Int10InfoPtr pInt) return TRUE; } -_X_EXPORT void +void xf86FreeInt10(xf86Int10InfoPtr pInt) { if (!pInt) @@ -422,7 +422,7 @@ xf86FreeInt10(xf86Int10InfoPtr pInt) xfree(pInt); } -_X_EXPORT void * +void * xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, int *off) { int pagesize = getpagesize(); @@ -451,7 +451,7 @@ xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, int *off) return ((linuxInt10Priv*)pInt->private)->base + ((i + 1) * pagesize); } -_X_EXPORT void +void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num) { int pagesize = getpagesize(); @@ -500,7 +500,7 @@ void write_l(xf86Int10InfoPtr pInt, int addr, CARD32 val) *((CARD32 *)(memType) addr) = val; } -_X_EXPORT pointer +pointer xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr) { if (addr < V_RAM) diff --git a/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c b/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c index ffdc0127f..9412b07a4 100644 --- a/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c +++ b/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c @@ -20,7 +20,7 @@ static int vm86_rep(struct vm86_struct *ptr); static struct vm86_struct vm86_s; -_X_EXPORT Bool +Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt) { #define VM86S ((struct vm86_struct *)pInt->cpuRegs) @@ -255,7 +255,7 @@ do_vm86(xf86Int10InfoPtr pInt) return 1; } -_X_EXPORT void +void xf86ExecX86int10(xf86Int10InfoPtr pInt) { int sig = setup_int(pInt); diff --git a/hw/xfree86/os-support/linux/lnx_agp.c b/hw/xfree86/os-support/linux/lnx_agp.c index ded9e0fae..4c1722fef 100644 --- a/hw/xfree86/os-support/linux/lnx_agp.c +++ b/hw/xfree86/os-support/linux/lnx_agp.c @@ -43,7 +43,7 @@ static Bool initDone = FALSE; * Close /dev/agpgart. This frees all associated memory allocated during * this server generation. */ -_X_EXPORT Bool +Bool xf86GARTCloseScreen(int screenNum) { if(gartFd != -1) { @@ -116,13 +116,13 @@ GARTInit(int screenNum) return TRUE; } -_X_EXPORT Bool +Bool xf86AgpGARTSupported() { return GARTInit(-1); } -_X_EXPORT AgpInfoPtr +AgpInfoPtr xf86GetAGPInfo(int screenNum) { struct _agp_info agpinf; @@ -165,7 +165,7 @@ xf86GetAGPInfo(int screenNum) * count instead of using acquiredScreen? */ -_X_EXPORT Bool +Bool xf86AcquireGART(int screenNum) { if (screenNum != -1 && !GARTInit(screenNum)) @@ -183,7 +183,7 @@ xf86AcquireGART(int screenNum) return TRUE; } -_X_EXPORT Bool +Bool xf86ReleaseGART(int screenNum) { if (screenNum != -1 && !GARTInit(screenNum)) @@ -213,7 +213,7 @@ xf86ReleaseGART(int screenNum) return FALSE; } -_X_EXPORT int +int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, unsigned long *physical) { @@ -251,7 +251,7 @@ xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, return alloc.key; } -_X_EXPORT Bool +Bool xf86DeallocateGARTMemory(int screenNum, int key) { if (!GARTInit(screenNum) || acquiredScreen != screenNum) @@ -278,7 +278,7 @@ xf86DeallocateGARTMemory(int screenNum, int key) } /* Bind GART memory with "key" at "offset" */ -_X_EXPORT Bool +Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset) { struct _agp_bind bind; @@ -321,7 +321,7 @@ xf86BindGARTMemory(int screenNum, int key, unsigned long offset) /* Unbind GART memory with "key" */ -_X_EXPORT Bool +Bool xf86UnbindGARTMemory(int screenNum, int key) { struct _agp_unbind unbind; @@ -353,7 +353,7 @@ xf86UnbindGARTMemory(int screenNum, int key) /* XXX Interface may change. */ -_X_EXPORT Bool +Bool xf86EnableAGP(int screenNum, CARD32 mode) { agp_setup setup; diff --git a/hw/xfree86/os-support/linux/lnx_apm.c b/hw/xfree86/os-support/linux/lnx_apm.c index b1328cd64..16ac80db8 100644 --- a/hw/xfree86/os-support/linux/lnx_apm.c +++ b/hw/xfree86/os-support/linux/lnx_apm.c @@ -133,7 +133,7 @@ lnxPMConfirmEventToOs(int fd, pmEvent event) #endif // HAVE_APM -_X_EXPORT PMClose +PMClose xf86OSPMOpen(void) { PMClose ret = NULL; diff --git a/hw/xfree86/os-support/linux/lnx_axp.c b/hw/xfree86/os-support/linux/lnx_axp.c index e8b6d4749..f7151c8f4 100644 --- a/hw/xfree86/os-support/linux/lnx_axp.c +++ b/hw/xfree86/os-support/linux/lnx_axp.c @@ -131,12 +131,12 @@ extern unsigned int _dense_inb(unsigned long); extern unsigned int _dense_inw(unsigned long); extern unsigned int _dense_inl(unsigned long); -_X_EXPORT void (*_alpha_outb)(char, unsigned long) = _outb; -_X_EXPORT void (*_alpha_outw)(short, unsigned long) = _outw; -_X_EXPORT void (*_alpha_outl)(int, unsigned long) = _outl; -_X_EXPORT unsigned int (*_alpha_inb)(unsigned long) = _inb; -_X_EXPORT unsigned int (*_alpha_inw)(unsigned long) = _inw; -_X_EXPORT unsigned int (*_alpha_inl)(unsigned long) = _inl; +void (*_alpha_outb)(char, unsigned long) = _outb; +void (*_alpha_outw)(short, unsigned long) = _outw; +void (*_alpha_outl)(int, unsigned long) = _outl; +unsigned int (*_alpha_inb)(unsigned long) = _inb; +unsigned int (*_alpha_inw)(unsigned long) = _inw; +unsigned int (*_alpha_inl)(unsigned long) = _inl; static long _alpha_iobase_query(unsigned, int, int, int); long (*_iobase)(unsigned, int, int, int) = _alpha_iobase_query; diff --git a/hw/xfree86/os-support/linux/lnx_bell.c b/hw/xfree86/os-support/linux/lnx_bell.c index 702dfa675..75cdd3ebc 100644 --- a/hw/xfree86/os-support/linux/lnx_bell.c +++ b/hw/xfree86/os-support/linux/lnx_bell.c @@ -34,7 +34,7 @@ #include "xf86Priv.h" #include "xf86_OSproc.h" -_X_EXPORT void +void xf86OSRingBell(int loudness, int pitch, int duration) { if (xf86Info.consoleFd == -1 || !pitch || !loudness) diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c index d37242ff3..da5ca57cc 100644 --- a/hw/xfree86/os-support/linux/lnx_init.c +++ b/hw/xfree86/os-support/linux/lnx_init.c @@ -93,7 +93,7 @@ drain_console(int fd, void *closure) tcflush(fd, TCIOFLUSH); } -_X_EXPORT void +void xf86OpenConsole(void) { int i, fd = -1; @@ -347,7 +347,7 @@ xf86OpenConsole(void) return; } -_X_EXPORT void +void xf86CloseConsole() { struct vt_mode VT; @@ -419,7 +419,7 @@ xf86CloseConsole() return; } -_X_EXPORT int +int xf86ProcessArgument(int argc, char *argv[], int i) { /* @@ -454,7 +454,7 @@ xf86ProcessArgument(int argc, char *argv[], int i) return(0); } -_X_EXPORT void +void xf86UseMsg() { ErrorF("vtXX use the specified VT number\n"); diff --git a/hw/xfree86/os-support/linux/lnx_kmod.c b/hw/xfree86/os-support/linux/lnx_kmod.c index 4e6f2d25d..0b9493d27 100644 --- a/hw/xfree86/os-support/linux/lnx_kmod.c +++ b/hw/xfree86/os-support/linux/lnx_kmod.c @@ -36,7 +36,7 @@ * Return: * 0 for failure, 1 for success */ -_X_EXPORT int +int xf86LoadKernelModule(const char *modName) { char mpPath[MAX_PATH] = ""; diff --git a/hw/xfree86/os-support/linux/lnx_pci.c b/hw/xfree86/os-support/linux/lnx_pci.c index 2b8356159..8eedfa49f 100644 --- a/hw/xfree86/os-support/linux/lnx_pci.c +++ b/hw/xfree86/os-support/linux/lnx_pci.c @@ -138,7 +138,7 @@ static struct pci_dev *xf86OSLinuxGetPciDevs(void) { } /* Query the kvirt address (64bit) of a BAR range from size for a given TAG */ -_X_EXPORT unsigned long +unsigned long xf86GetOSOffsetFromPCI(PCITAG tag, int space, unsigned long base) { unsigned int ndx; diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c index 688106af4..ed3576638 100644 --- a/hw/xfree86/os-support/linux/lnx_video.c +++ b/hw/xfree86/os-support/linux/lnx_video.c @@ -494,7 +494,7 @@ unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) /***************************************************************************/ #if defined(__powerpc__) -_X_EXPORT volatile unsigned char *ioBase = NULL; +volatile unsigned char *ioBase = NULL; #ifndef __NR_pciconfig_iobase #define __NR_pciconfig_iobase 200 @@ -502,7 +502,7 @@ _X_EXPORT volatile unsigned char *ioBase = NULL; #endif -_X_EXPORT Bool +Bool xf86EnableIO(void) { #if defined(__powerpc__) @@ -551,7 +551,7 @@ xf86EnableIO(void) return TRUE; } -_X_EXPORT void +void xf86DisableIO(void) { if (!ExtendedEnabled) @@ -869,23 +869,23 @@ writeSparseNB32(int Value, pointer Base, register unsigned long Offset) return; } -_X_EXPORT void (*xf86WriteMmio8)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio8)(int Value, pointer Base, unsigned long Offset) = writeDense8; -_X_EXPORT void (*xf86WriteMmio16)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio16)(int Value, pointer Base, unsigned long Offset) = writeDense16; -_X_EXPORT void (*xf86WriteMmio32)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio32)(int Value, pointer Base, unsigned long Offset) = writeDense32; -_X_EXPORT void (*xf86WriteMmioNB8)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB8)(int Value, pointer Base, unsigned long Offset) = writeDenseNB8; -_X_EXPORT void (*xf86WriteMmioNB16)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB16)(int Value, pointer Base, unsigned long Offset) = writeDenseNB16; -_X_EXPORT void (*xf86WriteMmioNB32)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB32)(int Value, pointer Base, unsigned long Offset) = writeDenseNB32; -_X_EXPORT int (*xf86ReadMmio8)(pointer Base, unsigned long Offset) +int (*xf86ReadMmio8)(pointer Base, unsigned long Offset) = readDense8; -_X_EXPORT int (*xf86ReadMmio16)(pointer Base, unsigned long Offset) +int (*xf86ReadMmio16)(pointer Base, unsigned long Offset) = readDense16; -_X_EXPORT int (*xf86ReadMmio32)(pointer Base, unsigned long Offset) +int (*xf86ReadMmio32)(pointer Base, unsigned long Offset) = readDense32; #endif /* __alpha__ */ |