[v2,1/5] Pre-cleanup: Remove unnecessary redefinitions of std symbols.
Commit Message
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.
---
stdio-common/tstgetln.c | 2 --
stdio-common/vfprintf.c | 7 +------
2 files changed, 1 insertion(+), 8 deletions(-)
Comments
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.
@@ -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[])
@@ -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. */