Message ID | 20200417132209.22065-10-adhemerval.zanella@linaro.org |
---|---|
State | New |
Headers | show |
Series | [01/10] linux: Move posix dir implementations to Linux | expand |
* Adhemerval Zanella via Libc-alpha: > diff --git a/NEWS b/NEWS > index 2424fecdc0..58d9db6d00 100644 > --- a/NEWS > +++ b/NEWS > @@ -22,6 +22,9 @@ Deprecated and removed features, and other changes affecting compatibility: > but always fails with ENOSYS. This reflects the removal of the system > call from all architectures, starting with Linux 5.5. > > +* The function getdirentries is now deprecated, applications should use > + either getdents or POSIX readdir instead. getdents64, readdir64 or readdir > diff --git a/dirent/dirent.h b/dirent/dirent.h > index 92d0925047..4ee60471f7 100644 > --- a/dirent/dirent.h > +++ b/dirent/dirent.h > @@ -353,14 +353,15 @@ extern int alphasort64 (const struct dirent64 **__e1, > extern __ssize_t getdirentries (int __fd, char *__restrict __buf, > size_t __nbytes, > __off_t *__restrict __basep) > - __THROW __nonnull ((2, 4)); > + __THROW __nonnull ((2, 4)) __attribute_deprecated__; > # else > # ifdef __REDIRECT > extern __ssize_t __REDIRECT_NTH (getdirentries, > (int __fd, char *__restrict __buf, > size_t __nbytes, > __off64_t *__restrict __basep), > - getdirentries64) __nonnull ((2, 4)); > + getdirentries64) > + __THROW __nonnull ((2, 4)) __attribute_deprecated__; > # else > # define getdirentries getdirentries64 > # endif > @@ -370,7 +371,7 @@ extern __ssize_t __REDIRECT_NTH (getdirentries, > extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf, > size_t __nbytes, > __off64_t *__restrict __basep) > - __THROW __nonnull ((2, 4)); > + __THROW __nonnull ((2, 4)) __attribute_deprecated__; > # endif > #endif /* Use misc. */ Please add a message pointing to readdir64 (probably in both cases).
diff --git a/NEWS b/NEWS index 2424fecdc0..58d9db6d00 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,9 @@ Deprecated and removed features, and other changes affecting compatibility: but always fails with ENOSYS. This reflects the removal of the system call from all architectures, starting with Linux 5.5. +* The function getdirentries is now deprecated, applications should use + either getdents or POSIX readdir instead. + Changes to build and runtime requirements: [Add changes to build and runtime requirements here] diff --git a/dirent/dirent.h b/dirent/dirent.h index 92d0925047..4ee60471f7 100644 --- a/dirent/dirent.h +++ b/dirent/dirent.h @@ -353,14 +353,15 @@ extern int alphasort64 (const struct dirent64 **__e1, extern __ssize_t getdirentries (int __fd, char *__restrict __buf, size_t __nbytes, __off_t *__restrict __basep) - __THROW __nonnull ((2, 4)); + __THROW __nonnull ((2, 4)) __attribute_deprecated__; # else # ifdef __REDIRECT extern __ssize_t __REDIRECT_NTH (getdirentries, (int __fd, char *__restrict __buf, size_t __nbytes, __off64_t *__restrict __basep), - getdirentries64) __nonnull ((2, 4)); + getdirentries64) + __THROW __nonnull ((2, 4)) __attribute_deprecated__; # else # define getdirentries getdirentries64 # endif @@ -370,7 +371,7 @@ extern __ssize_t __REDIRECT_NTH (getdirentries, extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf, size_t __nbytes, __off64_t *__restrict __basep) - __THROW __nonnull ((2, 4)); + __THROW __nonnull ((2, 4)) __attribute_deprecated__; # endif #endif /* Use misc. */