[glib/protected-visibility] Include missing header file



commit a8ea6beda7adfd4779507b749aee879b6af32082
Author: Ryan Lortie <desrt desrt ca>
Date:   Sun Mar 14 23:24:50 2010 -0400

    Include missing header file

 glib/glib-compilation.h |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/glib/glib-compilation.h b/glib/glib-compilation.h
new file mode 100644
index 0000000..d4b6bf9
--- /dev/null
+++ b/glib/glib-compilation.h
@@ -0,0 +1,27 @@
+#ifdef GLIB_COMPILATION
+#error Only include glib-compilation.h once.
+#endif
+
+#define GLIB_COMPILATION
+
+#include "config.h"
+
+#ifndef DISABLE_VISIBILITY
+# define G_BEGIN_DECLS  _Pragma ("GCC visibility push (protected)");
+# define G_END_DECLS    _Pragma ("GCC visibility pop");
+
+#define G_INTERNAL_FUNC(func) \
+  (__extension__({\
+    extern __typeof (func) IA__##func __attribute((visibility("hidden")));   \
+    IA__##func;                                                              \
+  }))
+
+#define G_DEFINE_INTERNAL_FUNC(func) \
+  extern __typeof (func) IA__##func __attribute((alias(#func),               \
+                                                 visibility("hidden")))
+#else
+
+#define G_INTERNAL_FUNC
+#define G_DEFINE_INTERNAL_FUNC
+
+#endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]