Skip to content

Commit

Permalink
Deprecate readdir_r.
Browse files Browse the repository at this point in the history
I've been campaigning against readdir_r for years:

  http://elliotth.blogspot.com/2012/10/how-not-to-use-readdirr3.html

and glibc deprecated it in 2.24, so we should join the club.

Bug: http://b/32678321
Test: builds
Change-Id: Ie3887ed75989aced9324266aa3b93e85c11bdbc9
  • Loading branch information
enh-google committed Jan 23, 2018
1 parent 86a2fba commit f19af37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libc/include/dirent.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ DIR* opendir(const char* __path);
DIR* fdopendir(int __dir_fd);
struct dirent* readdir(DIR* __dir);
struct dirent64* readdir64(DIR* __dir) __INTRODUCED_IN(21);
int readdir_r(DIR* __dir, struct dirent* __entry, struct dirent** __buffer);
int readdir64_r(DIR* __dir, struct dirent64* __entry, struct dirent64** __buffer) __INTRODUCED_IN(21);
int readdir_r(DIR* __dir, struct dirent* __entry, struct dirent** __buffer) __attribute__((__deprecated__("readdir_r is deprecated; use readdir instead")));
int readdir64_r(DIR* __dir, struct dirent64* __entry, struct dirent64** __buffer) __INTRODUCED_IN(21) __attribute__((__deprecated__("readdir64_r is deprecated; use readdir64 instead")));
int closedir(DIR* __dir);
void rewinddir(DIR* __dir);
void seekdir(DIR* __dir, long __location) __INTRODUCED_IN(23);
Expand Down

0 comments on commit f19af37

Please sign in to comment.