]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: Fix `revoke' symbol exposition from `unlockpt'
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Wed, 27 Sep 2017 22:01:40 +0000 (00:01 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Wed, 27 Sep 2017 22:49:05 +0000 (00:49 +0200)
`revoke' is MISC only, it should not be exposed along `unlockpt' which is
XOPEN.

* include/unistd.h (__revoke): New declaration.
* misc/revoke.c (revoke): Rename to __revoke, and redefine as weak
alias.
* sysdeps/mach/hurd/revoke.c (revoke): Likewise.
* sysdeps/unix/bsd/unlockpt.c (unlockpt): Use __revoke instead of
revoke.

ChangeLog
include/unistd.h
misc/revoke.c
sysdeps/mach/hurd/revoke.c
sysdeps/unix/bsd/unlockpt.c

index a535da875c53c5d18d22b63be5c81f12b725bd58..ff321d7e2b16317474c1d1eb2c9f6e8f78a7cbf2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,12 @@
        * sysdeps/posix/dirfd/dirfd.c (dirfd): Likewise.
        * sysdeps/mach/hurd/dirfd.c (dirfd): Likewise.
        * io/ftw.c (open_dir_stream, ftw_dir): Use __dirfd instead of dirfd.
+       * include/unistd.h (__revoke): New declaration.
+       * misc/revoke.c (revoke): Rename to __revoke, and redefine as weak
+       alias.
+       * sysdeps/mach/hurd/revoke.c (revoke): Likewise.
+       * sysdeps/unix/bsd/unlockpt.c (unlockpt): Use __revoke instead of
+       revoke.
 
 2017-09-26  H.J. Lu  <hongjiu.lu@intel.com>
 
index a5625ed7f48d8561d34fb90c5d3c3659c3df1ea5..bfe0e4de47a5ad53aa8572a5a702ba831424eda5 100644 (file)
@@ -130,6 +130,7 @@ extern int __symlink (const char *__from, const char *__to);
 extern ssize_t __readlink (const char *__path, char *__buf, size_t __len);
 extern int __unlink (const char *__name);
 extern int __gethostname (char *__name, size_t __len);
+extern int __revoke (const char *__file);
 extern int __profil (unsigned short int *__sample_buffer, size_t __size,
                     size_t __offset, unsigned int __scale);
 extern int __getdtablesize (void);
index d953216246024159f90545ca91c1b088b9e63520..21df2bbf9072db7c0410b2adf8be983cfd01a88a 100644 (file)
 #include <errno.h>
 
 int
-revoke (const char *file)
+__revoke (const char *file)
 {
   __set_errno (ENOSYS);
   return -1;
 }
+
+weak_alias (__revoke, revoke)
 stub_warning (revoke)
index 15b955b733c614b4d52f6bb9034e2bca18498a3a..2f47f42de68d184d7e3623a59651ca19235d39c2 100644 (file)
@@ -21,7 +21,7 @@
 #include <hurd.h>
 
 int
-revoke (const char *file_name)
+__revoke (const char *file_name)
 {
   error_t err;
   file_t file = __file_name_lookup (file_name, 0, 0);
@@ -36,3 +36,5 @@ revoke (const char *file_name)
     return __hurd_fail (err);
   return 0;
 }
+
+weak_alias (__revoke, revoke)
index 7388c985238bf8aceee905cf6fd4068fc2bf45d5..ca4e7c654e0860366286d310df75cbb0f412d75c 100644 (file)
@@ -32,5 +32,5 @@ unlockpt (int fd)
   /* BSD doesn't have a lock, but it does have `revoke'.  */
   if (__ptsname_r (fd, buf, sizeof (buf)))
     return -1;
-  return revoke (buf);
+  return __revoke (buf);
 }