glibc/libio/bits
Zack Weinberg 26c07172cd Remove getc and putc macros from the public stdio.h.
The getc and putc macros in the public stdio.h expand to call _IO_getc
and _IO_putc respectively.  As _IO_getc, fgetc, and getc are all aliases
for the same function, and _IO_putc, fputc, and putc are also all aliases
for the same function, the macros are pointless.  The C standard does
not require getc and putc to be macros, so let's just not have macros.
All four symbols are exported from libc.so at the same, ancient symbol
version, so there should be no risks for binary compatibility.  Similarly,
the getchar and putchar inlines in bits/stdio.h forward to getc and putc
instead of their _IO_ aliases.

As a change from longstanding historical practice, this does seem
like it might break _something_, so there is a note in NEWS, which
is also a convenient place to advise people that if they thought getc
and putc had reduced per-character overhead they should consider using
getc_unlocked and putc_unlocked instead.  (These are also not macros,
but when optimizing, they are inlines.)

	* libio/stdio.h: Don't define getc or putc as macros.
	* libio/bits/stdio.h (getchar, putchar): Use getc and putc,
	not _IO_getc and _IO_putc.
2018-02-05 19:59:03 -05:00
..
types Remove __need macros from stdio.h and wchar.h. 2017-06-08 13:58:17 -04:00
libio-ldbl.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
libio.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stdio2.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stdio-ldbl.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stdio.h Remove getc and putc macros from the public stdio.h. 2018-02-05 19:59:03 -05:00