glibc/io/sys
Stefan Liebler e1fd4bbe31 Fix namespace violation in stdio.h and sys/stat.h if build with optimization. [BZ #26376]
If build with optimization, stdio.h and sys/stat.h are defining some inlining
functions.  This leads to test fails if glibc is build with the following
commands. (Note that the conformtests usually builds without optimization or
other CFLAGS):
<glibc>/configure CC="gcc -O3" --prefix=/usr
make
make subdirs=conform check
- FAIL: conform/XPG4/stdio.h/conform
- FAIL: conform/XPG42/stdio.h/conform
out-files:
...
PASSCOMBINED: Availability of variable optopt
PASSCOMBINED: Type of variable optopt
    Namespace violation: "getc_unlocked"
    Namespace violation: "getchar_unlocked"
    Namespace violation: "putc_unlocked"
    Namespace violation: "putchar_unlocked"
FAIL: Namespace of <stdio.h>
----------------------------------------------------------------------------
  Total number of tests   :  168
  Number of failed tests  :    1
  Number of xfailed tests :    0
  Number of skipped tests :    0

- FAIL: conform/POSIX2008/sys/stat.h/conform
out-file:
...
PASSCOMBINED: Availability of function utimensat
PASSCOMBINED: Type of function utimensat
    Namespace violation: "mknodat"
FAIL: Namespace of <sys/stat.h>
----------------------------------------------------------------------------
  Total number of tests   :   97
  Number of failed tests  :    1
  Number of xfailed tests :    0
  Number of skipped tests :    0

For getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked in stdio.h,
those are defined "# ifdef __USE_POSIX" instead of "#ifdef __USE_POSIX199506"
for the non-inlining declaration. See also
"Bug 20014 - stdio.h namespace for pre-threads POSIX"
(https://sourceware.org/bugzilla/show_bug.cgi?id=20014).

For mknodat in sys/stat.h, those are defined "# ifdef __USE_ATFILE" instead of
the additional guard "# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED".
2020-08-20 10:45:26 +02:00
..
fcntl.h initial import 1995-02-18 01:27:10 +00:00
poll.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
sendfile.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
stat.h Fix namespace violation in stdio.h and sys/stat.h if build with optimization. [BZ #26376] 2020-08-20 10:45:26 +02:00
statfs.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
statvfs.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
vfs.h * io/Makefile (headers): Add sys/vfs.h. 1996-07-07 23:23:51 +00:00