summaryrefslogtreecommitdiff
path: root/src/check-has-hidden-symbols.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-01-11 18:47:19 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2008-01-11 20:27:23 +0000
commit8a6a0b43dc249acb0ad8cb9c6f16360294bcfdc3 (patch)
tree8bad2da44c69344dc808e294f9d413df31829070 /src/check-has-hidden-symbols.c
parent982f65081f987e2c44f05942411c031bd32fd968 (diff)
downloadcairo-8a6a0b43dc249acb0ad8cb9c6f16360294bcfdc3.tar.gz
[check] Replace compiled symbol visibility checker with shell script.
Behdad Esfahbod objected to the execution of a compiled program to check symbol visibility as it makes cross-compilation more difficult. Instead of executing the program, this method conditionally exports a variable if cairo uses symbol hiding and scans the executable for that symbol in a similar manner to check-def.sh. This has the slight advantage of using the Makefile for performing the compilation, rather than attempting to invoke $(CPP) from a shell script within the test environment.
Diffstat (limited to 'src/check-has-hidden-symbols.c')
-rw-r--r--src/check-has-hidden-symbols.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/check-has-hidden-symbols.c b/src/check-has-hidden-symbols.c
new file mode 100644
index 000000000..2fb120d87
--- /dev/null
+++ b/src/check-has-hidden-symbols.c
@@ -0,0 +1,12 @@
+#include "cairoint.h"
+
+#if CAIRO_HAS_HIDDEN_SYMBOLS
+extern cairo_public int cairo_has_hidden_symbols;
+int cairo_has_hidden_symbols;
+#endif
+
+int
+main (void)
+{
+ return 0;
+}