[VDPAU] [PATCHv2] vdpau: do not export _vdp_DRI2* functions

Emil Velikov emil.l.velikov at gmail.com
Sat Jul 19 11:01:47 PDT 2014


Neither one is part of the public API, thus should never be used outside
of the library itself.

Add macro PRIVATE, that is used to annotate the function visibility by
setting __attribute__((visibility("hidden"))).

v2: Provide only PRIVATE macro. Requested by Aaron.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/mesa_dri2.h | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/mesa_dri2.h b/src/mesa_dri2.h
index 09bde8c..369b271 100644
--- a/src/mesa_dri2.h
+++ b/src/mesa_dri2.h
@@ -37,17 +37,24 @@
 
 #include <X11/extensions/dri2tokens.h>
 
-extern Bool
+#if (defined(__GNUC__) && __GNUC__ >= 4)
+  #define PRIVATE __attribute__ ((visibility("hidden")))
+#else
+  #define PRIVATE
+#endif
+
+
+PRIVATE extern Bool
 _vdp_DRI2QueryExtension(Display * display, int *eventBase, int *errorBase);
 
-extern Bool
+PRIVATE extern Bool
 _vdp_DRI2QueryVersion(Display * display, int *major, int *minor);
 
-extern Bool
+PRIVATE extern Bool
 _vdp_DRI2Connect(Display * display, XID window, char **driverName,
                  char **deviceName);
 
-extern void
+PRIVATE extern void
 _vdp_DRI2RemoveExtension(Display * display);
 
 #endif
-- 
2.0.0



More information about the VDPAU mailing list