aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dirent_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* implement missing seekdir and telldirYabin Cui2014-11-071-0/+47
| | | | | Bug: 18266863 Change-Id: I189ee949d4f7ccee099f3341e349cd969d25480f
* Implement some of the missing LFS64 support.Elliott Hughes2014-02-181-7/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives us: * <dirent.h> struct dirent64 readdir64, readdir64_r, alphasort64, scandir64 * <fcntl.h> creat64, openat64, open64. * <sys/stat.h> struct stat64 fstat64, fstatat64, lstat64, stat64. * <sys/statvfs.h> struct statvfs64 statvfs64, fstatvfs64. * <sys/vfs.h> struct statfs64 statfs64, fstatfs64. This also removes some of the incorrect #define hacks we've had in the past (for stat64, for example, which we promised to clean up way back in bug 8472078). Bug: 11865851 Bug: 8472078 Change-Id: Ia46443521918519f2dfa64d4621027dfd13ac566
* Fix __pthread_clone on ARM to set errno on failure.Elliott Hughes2013-02-111-8/+8
| | | | | | | | | | MIPS and x86 appear to have been correct already. (Also fix unit tests that ASSERT_EQ with errno so that the arguments are in the retarded junit order.) Bug: 3461078 Change-Id: I2418ea98927b56e15b4ba9cfec97f5e7094c6291
* libc: Fix alphasort() signature (and implementation).David 'Digit' Turner2012-10-291-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The declaration for alphasort() in <dirent.h> used the deprecated: int alphasort(const void*, const void*); while both Posix and GLibc use instead: int alphasort(const struct dirent** a, const struct dirent** b); See: http://pubs.opengroup.org/onlinepubs/9699919799/functions/alphasort.html This patch does the following: - Update the declaration to match Posix/GLibc - Get rid of the upstream BSD code which isn't compatible with the new signature. - Implement a new trivial alphasort() with the right signature, and ensure that it uses strcoll() instead of strcmp(). - Remove Bionic-specific #ifdef .. #else .. #endif block in dirent_test.cpp which uses alphasort(). Even through strcoll() currently uses strcmp(), this does the right thing in the case where we decide to update strcoll() to properly implement locale-specific ordered comparison. Change-Id: I4fd45604d8a940aaf2eb0ecd7d73e2f11c9bca96
* Clean up the implementation of the <dirent.h> functions.Elliott Hughes2012-10-261-0/+191
Change-Id: I3c647cc9588525afc41fee90ee468d58cd13503a