jehanne: introduce libposix_getdents machinery
This commit is contained in:
@ -22,14 +22,9 @@
|
||||
|
||||
#define MAXNAMLEN 127 /* sizeof(struct dirent.d_name)-1 */
|
||||
|
||||
struct dirent
|
||||
{
|
||||
ino_t d_ino;
|
||||
char d_name[MAXNAMLEN+1];
|
||||
unsigned int d_reclen;
|
||||
};
|
||||
|
||||
#define _DIRENT_HAVE_D_RECLEN
|
||||
#define _LIBPOSIX_H
|
||||
#include <posix.h> /* get dirent structure from posix.h */
|
||||
#undef _LIBPOSIX_H
|
||||
|
||||
typedef struct {
|
||||
int dd_fd; /* Directory file. */
|
||||
|
@ -250,6 +250,13 @@ getpass(const char *prompt)
|
||||
return POSIX_getpass(errnop, prompt);
|
||||
}
|
||||
|
||||
int
|
||||
getdents (int fd, void *buf, int buf_size)
|
||||
{
|
||||
int *errnop = &_REENT->_errno;
|
||||
return libposix_getdents(errnop, fd, buf, buf_size);
|
||||
}
|
||||
|
||||
#undef pread
|
||||
ssize_t
|
||||
pread(int fd, void *buf, size_t count, off_t offset)
|
||||
|
Reference in New Issue
Block a user