From: Rich Felker Date: Wed, 22 Apr 2015 07:07:38 +0000 (-0400) Subject: in visibility preinclude, remove overrides for stdin/stdout/stderr X-Git-Tag: v1.1.9~29 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b8dda24fe1caa901a99580f7a52defb95aedb67c;p=oweals%2Fmusl.git in visibility preinclude, remove overrides for stdin/stdout/stderr the motivation for this change is that the extra declaration (with or without visibility) using "struct _IO_FILE" instead of "FILE" seems to trigger a bug in gcc 3.x where it considers the types mismatched. however, this change also results in slightly better code and it is valid because (1) these three objects are constant, and (2) applying the & operator to any of them is invalid C, since they are not even specified to be objects. thus it does not matter if the application and libc see different addresses for them, as long as the (initial, unchanging) value is seen the same by both. --- diff --git a/src/internal/vis.h b/src/internal/vis.h index bf7a5b20..a01fda18 100644 --- a/src/internal/vis.h +++ b/src/internal/vis.h @@ -11,9 +11,6 @@ * fail to support copy relocations for protected data, so exclude all * 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;