summaryrefslogtreecommitdiff
path: root/hw/xfree86/ddc
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-12-03 05:43:34 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-12-03 05:43:34 -0200
commit49f77fff1495c0a2050fb18f9b1fc627839bbfc2 (patch)
treeeebaec908150abfc0159d9ee941404918f553113 /hw/xfree86/ddc
parent0b8f8b24f718820a72ebdc52423c2e6a44e848c5 (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/ddc')
-rw-r--r--hw/xfree86/ddc/ddcProperty.c2
-rw-r--r--hw/xfree86/ddc/edid.h2
-rw-r--r--hw/xfree86/ddc/interpret_edid.c6
-rw-r--r--hw/xfree86/ddc/print_edid.c2
-rw-r--r--hw/xfree86/ddc/xf86DDC.c6
-rw-r--r--hw/xfree86/ddc/xf86DDC.h20
6 files changed, 19 insertions, 19 deletions
diff --git a/hw/xfree86/ddc/ddcProperty.c b/hw/xfree86/ddc/ddcProperty.c
index 124abd7ec..a4384f1d3 100644
--- a/hw/xfree86/ddc/ddcProperty.c
+++ b/hw/xfree86/ddc/ddcProperty.c
@@ -108,7 +108,7 @@ addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC)
}
}
-_X_EXPORT Bool
+Bool
xf86SetDDCproperties(ScrnInfoPtr pScrn, xf86MonPtr DDC)
{
if (!pScrn || !pScrn->monitor || !DDC)
diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h
index 45caf6ea9..aeda6b30c 100644
--- a/hw/xfree86/ddc/edid.h
+++ b/hw/xfree86/ddc/edid.h
@@ -547,6 +547,6 @@ typedef struct {
Uchar *rawData;
} xf86Monitor, *xf86MonPtr;
-extern xf86MonPtr ConfiguredMonitor;
+extern _X_EXPORT xf86MonPtr ConfiguredMonitor;
#endif /* _EDID_H_ */
diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c
index 588e2547b..c0e3df96c 100644
--- a/hw/xfree86/ddc/interpret_edid.c
+++ b/hw/xfree86/ddc/interpret_edid.c
@@ -132,7 +132,7 @@ handle_edid_quirks(xf86MonPtr m)
}
}
-_X_EXPORT xf86MonPtr
+xf86MonPtr
xf86InterpretEDID(int scrnIndex, Uchar *block)
{
xf86MonPtr m;
@@ -163,7 +163,7 @@ xf86InterpretEDID(int scrnIndex, Uchar *block)
return NULL;
}
-_X_EXPORT xf86MonPtr
+xf86MonPtr
xf86InterpretEEDID(int scrnIndex, Uchar *block)
{
xf86MonPtr m;
@@ -463,7 +463,7 @@ validate_version(int scrnIndex, struct edid_version *r)
/*
* Returns true if HDMI, false if definitely not or unknown.
*/
-_X_EXPORT Bool
+Bool
xf86MonitorIsHDMI(xf86MonPtr mon)
{
int i = 0, version, offset;
diff --git a/hw/xfree86/ddc/print_edid.c b/hw/xfree86/ddc/print_edid.c
index 7708889a8..7b6e2989a 100644
--- a/hw/xfree86/ddc/print_edid.c
+++ b/hw/xfree86/ddc/print_edid.c
@@ -460,7 +460,7 @@ print_number_sections(int scrnIndex, int num)
num);
}
-_X_EXPORT xf86MonPtr
+xf86MonPtr
xf86PrintEDID(xf86MonPtr m)
{
CARD16 i, j, n;
diff --git a/hw/xfree86/ddc/xf86DDC.c b/hw/xfree86/ddc/xf86DDC.c
index da7b34e51..e3f40ec12 100644
--- a/hw/xfree86/ddc/xf86DDC.c
+++ b/hw/xfree86/ddc/xf86DDC.c
@@ -63,7 +63,7 @@ static const OptionInfoRec DDCOptions[] = {
* @return pointer to a new xf86MonPtr containing the EDID information.
* @return NULL if no monitor attached or failure to interpret the EDID.
*/
-_X_EXPORT xf86MonPtr
+xf86MonPtr
xf86DoEDID_DDC1(
int scrnIndex, DDC1SetSpeedProc DDC1SetSpeed,
unsigned int (*DDC1Read)(ScrnInfoPtr)
@@ -206,7 +206,7 @@ DDC2Read(I2CDevPtr dev, int block, unsigned char *R_Buffer)
* @return pointer to a new xf86MonPtr containing the EDID information.
* @return NULL if no monitor attached or failure to interpret the EDID.
*/
-_X_EXPORT xf86MonPtr
+xf86MonPtr
xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool complete)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
@@ -267,7 +267,7 @@ xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool complete)
* @return pointer to a new xf86MonPtr containing the EDID information.
* @return NULL if no monitor attached or failure to interpret the EDID.
*/
-_X_EXPORT xf86MonPtr
+xf86MonPtr
xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus)
{
return xf86DoEEDID(scrnIndex, pBus, FALSE);
diff --git a/hw/xfree86/ddc/xf86DDC.h b/hw/xfree86/ddc/xf86DDC.h
index 3172b555d..07411b849 100644
--- a/hw/xfree86/ddc/xf86DDC.h
+++ b/hw/xfree86/ddc/xf86DDC.h
@@ -24,42 +24,42 @@ typedef enum {
typedef void (* DDC1SetSpeedProc)(ScrnInfoPtr, xf86ddcSpeed);
-extern xf86MonPtr xf86DoEDID_DDC1(
+extern _X_EXPORT xf86MonPtr xf86DoEDID_DDC1(
int scrnIndex,
DDC1SetSpeedProc DDC1SetSpeed,
unsigned int (*DDC1Read)(ScrnInfoPtr)
);
-extern xf86MonPtr xf86DoEDID_DDC2(
+extern _X_EXPORT xf86MonPtr xf86DoEDID_DDC2(
int scrnIndex,
I2CBusPtr pBus
);
-extern xf86MonPtr xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool);
+extern _X_EXPORT xf86MonPtr xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool);
-extern xf86MonPtr xf86PrintEDID(
+extern _X_EXPORT xf86MonPtr xf86PrintEDID(
xf86MonPtr monPtr
);
-extern xf86MonPtr xf86InterpretEDID(
+extern _X_EXPORT xf86MonPtr xf86InterpretEDID(
int screenIndex, Uchar *block
);
-extern xf86MonPtr xf86InterpretEEDID(
+extern _X_EXPORT xf86MonPtr xf86InterpretEEDID(
int screenIndex, Uchar *block
);
-extern void
+extern _X_EXPORT void
xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC);
-extern Bool xf86SetDDCproperties(
+extern _X_EXPORT Bool xf86SetDDCproperties(
ScrnInfoPtr pScreen,
xf86MonPtr DDC
);
-DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC);
+extern _X_EXPORT DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC);
-extern Bool
+extern _X_EXPORT Bool
xf86MonitorIsHDMI(xf86MonPtr mon);
#endif