c30396f5f2
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 |
||
---|---|---|
.. | ||
common/lib/libc | ||
libc | ||
extern.h | ||
fd_setsize.h | ||
namespace.h | ||
netbsd-compat.h | ||
port_after.h | ||
port_before.h | ||
README.txt | ||
reentrant.h |
This directory contains upstream NetBSD source. You should not edit these files directly. Make fixes upstream and then pull down the new version of the file. Note that code in the other 'netbsd' directory contains Android modifications. We should work towards getting as many of those changes as possible upstream and then losing those files in favor of pure upstream copies here instead. TODO: write a script to make this process automated.