summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Rankin <rankincj@yahoo.com>2011-10-05 15:20:37 +0100
committerChris Rankin <rankincj@yahoo.com>2011-10-05 15:20:37 +0100
commitdaa8c4cb3bd3eaf71448cae646fed9cea83ad9d4 (patch)
treeea65123bde09ebc0ec25f8f6c2484ef410a5232e
parent10d79495d21c47a6c890d501d461b62cb46081e1 (diff)
downloadxine-lib-daa8c4cb3bd3eaf71448cae646fed9cea83ad9d4.tar.gz
xine-lib-daa8c4cb3bd3eaf71448cae646fed9cea83ad9d4.tar.bz2
Bring xine_private.h into line with 1.2 branch, which already has this capability, and force an error if someone tries to include xine_private.h in an unsuitable source file.
-rw-r--r--src/xine-engine/xine_private.h19
-rw-r--r--src/xine-utils/attributes.h9
2 files changed, 17 insertions, 11 deletions
diff --git a/src/xine-engine/xine_private.h b/src/xine-engine/xine_private.h
index 1f3564cbc..35005e45d 100644
--- a/src/xine-engine/xine_private.h
+++ b/src/xine-engine/xine_private.h
@@ -21,6 +21,21 @@
#ifndef HAVE_XINE_PRIVATE_H
#define HAVE_XINE_PRIVATE_H
+#ifndef XINE_LIBRARY_COMPILE
+# error xine_private.h is for libxine's private use only!
+#endif
+
+#include "configure.h"
+
+/* Export internal only for functions that are unavailable to plugins */
+#if defined(SUPPORT_ATTRIBUTE_VISIBILITY_INTERNAL)
+# define INTERNAL __attribute__((__visibility__("internal")))
+#elif defined(SUPPORT_ATTRIBUTE_VISIBILITY_DEFAULT)
+# define INTERNAL __attribute__((__visibility__("default")))
+#else
+# define INTERNAL
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -28,9 +43,9 @@ extern "C" {
/*
* make file descriptors and sockets uninheritable
*/
-int _x_set_file_close_on_exec(int fd) XINE_INTERNAL;
+int _x_set_file_close_on_exec(int fd) INTERNAL;
-int _x_set_socket_close_on_exec(int s) XINE_INTERNAL;
+int _x_set_socket_close_on_exec(int s) INTERNAL;
#ifdef __cplusplus
}
diff --git a/src/xine-utils/attributes.h b/src/xine-utils/attributes.h
index 9f02d9b7b..2326dab18 100644
--- a/src/xine-utils/attributes.h
+++ b/src/xine-utils/attributes.h
@@ -66,15 +66,6 @@
# define XINE_PROTECTED
#endif
-/* Export hidden only for private/internal libxine functions */
-#if defined(XINE_LIBRARY_COMPILE) && defined(SUPPORT_ATTRIBUTE_VISIBILITY_INTERNAL)
-# define XINE_INTERNAL __attribute__((__visibility__("internal")))
-#elif defined(XINE_LIBRARY_COMPILE) && defined(SUPPORT_ATTRIBUTE_VISIBILITY_DEFAULT)
-# define XINE_INTERNAL __attribute__((__visibility__("default")))
-#else
-# define XINE_INTERNAL
-#endif
-
#ifdef SUPPORT_ATTRIBUTE_SENTINEL
# define XINE_SENTINEL __attribute__((__sentinel__))
#else