[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C library problem



On Fri, Apr 27, 2001 at 11:27:52AM +0200, Orjan Friberg wrote:
> They are indeed missing in uC-libc, and also in Lineo's latest sources.
> I just had a look at glibc-2.2.2, and their alphasort
> (dirent/alphasort.c) is 
> 
> int
> alphasort (const void *a, const void *b)
> {
>   return strcoll ((*(const struct dirent **) a)->d_name,
>                   (*(const struct dirent **) b)->d_name);
> }

Makes sense.

> where strcoll == strcmp if your locale is "C" or "POSIX".  scandir
> (dirent/scandir.c) may require some more work before it applies cleanly
> to your uC-libc.  I attach it so you can have a look at it.  Maybe you
> can implement a stripped-down version of it?

Thanks alot, I'll check it out.

-- 
                                    | 1. Wild enthusiam
Historic Project Stages for all     | 2. Gradual disillusionment
Silicon Valley Projects.            | 3. Search for the guilty
                                    | 4. Punishment of the innocents
Where are you at?                   | 5. Promotion of non-participants