mirror of git://sourceware.org/git/glibc.git
hurd: Fix `seekdir' symbol exposition from `rewinddir'
`seekdir' is MISC || XOPEN, it should not be exposed along `rewinddir' which is POSIX. * include/dirent.h (__seekdir): New declaration. * sysdeps/mach/hurd/seekdir.c (seekdir): Rename to __seekdir and redefine as weak alias. * sysdeps/mach/hurd/rewinddir.c (__rewinddir): Use __seekdir instead of seekdir.
This commit is contained in:
parent
52a1f1814e
commit
64a4af28a6
|
@ -12,6 +12,11 @@
|
|||
* sysdeps/mach/hurd/revoke.c (revoke): Likewise.
|
||||
* sysdeps/unix/bsd/unlockpt.c (unlockpt): Use __revoke instead of
|
||||
revoke.
|
||||
* include/dirent.h (__seekdir): New declaration.
|
||||
* sysdeps/mach/hurd/seekdir.c (seekdir): Rename to __seekdir and
|
||||
redefine as weak alias.
|
||||
* sysdeps/mach/hurd/rewinddir.c (__rewinddir): Use __seekdir instead
|
||||
of seekdir.
|
||||
|
||||
2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ extern int __versionsort64 (const struct dirent64 **a,
|
|||
extern DIR *__alloc_dir (int fd, bool close_fd, int flags,
|
||||
const struct stat64 *statp) attribute_hidden;
|
||||
extern __typeof (rewinddir) __rewinddir;
|
||||
extern __typeof (seekdir) __seekdir;
|
||||
extern __typeof (dirfd) __dirfd;
|
||||
|
||||
extern void __scandir_cancel_handler (void *arg) attribute_hidden;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
void
|
||||
__rewinddir (DIR *dirp)
|
||||
{
|
||||
seekdir (dirp, (off_t) 0L);
|
||||
__seekdir (dirp, (off_t) 0L);
|
||||
}
|
||||
libc_hidden_def (__rewinddir)
|
||||
weak_alias (__rewinddir, rewinddir)
|
||||
|
|
|
@ -22,9 +22,8 @@
|
|||
#include "dirstream.h"
|
||||
|
||||
/* Seek to position POS in DIRP. */
|
||||
/* XXX should be __seekdir ? */
|
||||
void
|
||||
seekdir (DIR *dirp, long int pos)
|
||||
__seekdir (DIR *dirp, long int pos)
|
||||
{
|
||||
__libc_lock_lock (dirp->__lock);
|
||||
/* Change our entry index pointer to POS and discard any data already
|
||||
|
@ -35,3 +34,5 @@ seekdir (DIR *dirp, long int pos)
|
|||
dirp->__size = 0;
|
||||
__libc_lock_unlock (dirp->__lock);
|
||||
}
|
||||
|
||||
weak_alias (__seekdir, seekdir)
|
||||
|
|
Loading…
Reference in New Issue