mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Update.
* include/dirent.h: Remove __getdirentries declaration, add __getdents and __getdents64. * sysdeps/unix/readdir.c: Use __getdents, not __getdirentries. * sysdeps/unix/readdir_r.c: Likewise. * sysdeps/unix/sysv/linux/readdir64.c: Likewise. * sysdeps/unix/sysv/linux/readdir64_r.c: Likewise. * sysdeps/unix/sysv/linux/getdents.c: Define __getdents, not __getdirentries. Remove fourth argument. * sysdeps/unix/sysv/linux/getdirentries.c: New file. * sysdeps/unix/sysv/linux/getdirentries64.c: New file. * sysdeps/unix/sysv/linux/Makefile [subdir=dirent] (sysdep_routines): Add getdirentries and getdirentries64. * sysdeps/unix/sysv/linux/Dist: Add getdirentries and getdirentries64.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991,92,93,94,95,96,97,98 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -44,7 +44,6 @@ __readdir_r (DIR *dirp, struct dirent *entry, struct dirent **result)
|
||||
/* We've emptied out our buffer. Refill it. */
|
||||
|
||||
size_t maxread;
|
||||
off_t base;
|
||||
ssize_t bytes;
|
||||
|
||||
#ifndef _DIRENT_HAVE_D_RECLEN
|
||||
@ -54,8 +53,7 @@ __readdir_r (DIR *dirp, struct dirent *entry, struct dirent **result)
|
||||
maxread = dirp->allocation;
|
||||
#endif
|
||||
|
||||
base = dirp->filepos;
|
||||
bytes = __getdirentries (dirp->fd, dirp->data, maxread, &base);
|
||||
bytes = __getdents (dirp->fd, dirp->data, maxread);
|
||||
if (bytes <= 0)
|
||||
{
|
||||
dp = NULL;
|
||||
|
Reference in New Issue
Block a user