summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure14
-rw-r--r--src/internal/vis.h3
2 files changed, 14 insertions, 3 deletions
diff --git a/configure b/configure
index de357bc2..d944a47f 100755
--- a/configure
+++ b/configure
@@ -476,10 +476,18 @@ if test "x$visibility" = xauto ; then
# - the -include option
# - the attributes/pragmas used in vis.h
# - linking code that takes the address of protected symbols
+# - gcc 3.x bug that wrongly claims declarations mismatch
printf "checking whether global visibility preinclude works... "
-echo 'int (*fp)(void);' > "$tmpc"
-echo 'int foo(void) { }' >> "$tmpc"
-echo 'int bar(void) { fp = foo; return foo(); }' >> "$tmpc"
+cat > "$tmpc" <<EOF
+__attribute__((__visibility__("default")))
+extern struct a *const x;
+typedef struct a b;
+extern b *const x;
+b *const x;
+int (*fp)(void);
+int foo(void) { }
+int bar(void) { fp = foo; return foo(); }
+EOF
if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS \
-DSHARED -fPIC -I./src/internal -include vis.h \
-nostdlib -shared -Wl,-Bsymbolic-functions \
diff --git a/src/internal/vis.h b/src/internal/vis.h
index a01fda18..bf7a5b20 100644
--- a/src/internal/vis.h
+++ b/src/internal/vis.h
@@ -12,6 +12,9 @@
* exported data symbols. */
__attribute__((__visibility__("default")))
+extern struct _IO_FILE *const stdin, *const stdout, *const stderr;
+
+__attribute__((__visibility__("default")))
extern int optind, opterr, optopt, optreset, __optreset, getdate_err, h_errno, daylight, __daylight, signgam, __signgam;
__attribute__((__visibility__("default")))