]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix sys/stat.h fchmod namespace (bug 20073).
authorJoseph Myers <joseph@codesourcery.com>
Tue, 10 May 2016 21:52:08 +0000 (21:52 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 10 May 2016 21:52:08 +0000 (21:52 +0000)
sys/stat.h declares fchmod if __USE_POSIX (i.e. POSIX.1:1990).  But it
was actually added in 1993 and also in XPG4.  This patch changes the
conditions to the correct __USE_POSIX199309 || __USE_XOPEN_EXTENDED.

Tested for x86_64 and x86 (testsuite, and that installed shared
libraries are unchanged by the patch).

[BZ #20073]
* io/sys/stat.h (fchmod): Declare for
[__USE_POSIX199309 || __USE_XOPEN_EXTENDED], not [__USE_POSIX].
* conform/Makefile (test-xfail-XPG3/sys/stat.h/conform): Remove
variable.

ChangeLog
conform/Makefile
io/sys/stat.h

index c66244413ca72b7b9f9fe4d58ad5db867ac3c8eb..2baca396c80e8cee8bfd026b61b1d521329568a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2016-05-10  Joseph Myers  <joseph@codesourcery.com>
 
+       [BZ #20073]
+       * io/sys/stat.h (fchmod): Declare for
+       [__USE_POSIX199309 || __USE_XOPEN_EXTENDED], not [__USE_POSIX].
+       * conform/Makefile (test-xfail-XPG3/sys/stat.h/conform): Remove
+       variable.
+
        * conform/data/sys/stat.h-data [XPG3] (S_IFLNK): Do not expect.
        [XPG3] (S_IFSOCK): Likewise.
        [XPG3] (S_ISVTX): Likewise.
index c4412ef36fe587e946be700848e2dd0435694825..6291ca9642ed4283969664e92b78794f45cc7638 100644 (file)
@@ -171,7 +171,6 @@ test-xfail-XPG3/search.h/conform = yes
 test-xfail-XPG3/signal.h/conform = yes
 test-xfail-XPG3/stdlib.h/conform = yes
 test-xfail-XPG3/string.h/conform = yes
-test-xfail-XPG3/sys/stat.h/conform = yes
 test-xfail-XPG3/sys/wait.h/conform = yes
 test-xfail-XPG3/termios.h/conform = yes
 test-xfail-XPG3/time.h/conform = yes
index bf63882c7e58b273b727fef6fa97487b1324a161..416d5647d46084bbfe7fdcf1843c674243e7fa67 100644 (file)
@@ -292,7 +292,7 @@ extern int lchmod (const char *__file, __mode_t __mode)
 #endif
 
 /* Set file access permissions of the file FD is open on to MODE.  */
-#ifdef __USE_POSIX
+#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED
 extern int fchmod (int __fd, __mode_t __mode) __THROW;
 #endif