David 'Digit' Turner c30396f5f2 libc: Fix alphasort() signature (and implementation).
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
2012-10-29 07:44:27 -07:00
..
2010-12-06 12:05:11 +01:00
2011-09-28 12:17:34 -07:00
2012-02-29 18:43:51 -08:00
2010-01-15 15:57:02 -08:00
2012-08-02 15:45:04 -07:00
2012-08-29 12:47:41 -07:00
2010-01-15 15:57:02 -08:00
2012-09-13 16:54:57 -07:00
2009-03-03 19:28:35 -08:00
2012-08-20 14:12:20 -07:00
2010-01-15 15:57:02 -08:00
2009-03-03 19:28:35 -08:00
2010-01-15 15:01:44 -08:00
2012-08-17 14:30:06 -07:00
2012-08-29 12:47:41 -07:00
2010-06-11 14:39:39 -07:00
2012-09-04 14:11:28 +02:00
2012-09-03 01:38:34 +03:00