jehanne: add lstat (as alias of stat), dup and dup2

This commit is contained in:
Giacomo Tesio 2017-09-03 22:18:20 +02:00
parent bae05fec4e
commit ed6683643a
1 changed files with 21 additions and 0 deletions

View File

@ -153,6 +153,13 @@ _stat_r(struct _reent *r, const char *file, struct stat *pstat)
return POSIX_stat(errnop, file, pstat);
}
int
lstat(const char *file, struct stat *pstat)
{
int *errnop = &_REENT->_errno;
return POSIX_lstat(errnop, file, pstat);
}
clock_t
_times_r(struct _reent *r, struct tms *buf)
{
@ -285,6 +292,20 @@ access(const char *path, int amode)
return POSIX_access(errnop, path, amode);
}
int
dup(int fildes)
{
int *errnop = &_REENT->_errno;
return POSIX_dup(errnop, fildes);
}
int
dup2(int fildes, int fildes2)
{
int *errnop = &_REENT->_errno;
return POSIX_dup2(errnop, fildes, fildes2);
}
#undef pread
ssize_t
pread(int fd, void *buf, size_t count, off_t offset)