Message ID | e919a51368f17eaf8d20bb82a2831c790c8b5e19.1517872307.git.zackw@panix.com |
---|---|
State | New |
Headers | show |
Series | Don't install libio.h or _G_config.h. | expand |
On Mon, 5 Feb 2018, Zack Weinberg wrote: > Two files in stdio-common were unnecessarily redefining some standard > symbols as their _IO_ aliases, which causes problems for a build with > the visibility of libio.h reduced. > > This changes installed stripped libraries, because the line numbering > changes in vfprintf.c, which changes the messages associated with a > bunch of assertions. However, if it weren't entangled with a scary > change I wouldn't be hesitating to call it an obvious cleanup. > > * stdio-common/vfprintf.c: Don't redefine FILE, va_list, or BUFSIZ. > * stdio-common/tstgetln.c: Don't redefine ssize_t. OK, please commit.
diff --git a/stdio-common/tstgetln.c b/stdio-common/tstgetln.c index a18f754e354..6960e686200 100644 --- a/stdio-common/tstgetln.c +++ b/stdio-common/tstgetln.c @@ -16,8 +16,6 @@ <http://www.gnu.org/licenses/>. */ #include <stdio.h> -#undef ssize_t -#define ssize_t _IO_ssize_t int main (int argc, char *argv[]) diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index 3b87740dd99..a2cab306855 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -39,13 +39,8 @@ Beside this it is also shared between the normal and wide character implementation as defined in ISO/IEC 9899:1990/Amendment 1:1995. */ - #include <libioP.h> -#define FILE _IO_FILE -#undef va_list -#define va_list _IO_va_list -#undef BUFSIZ -#define BUFSIZ _IO_BUFSIZ + /* In some cases we need extra space for all the output which is not counted in the width of the string. We assume 32 characters is enough. */