[GRASS-dev] r.colors: rules file list unsorted

Wolf Bergenheim wolf+grass at bergenheim.net
Sun Jan 28 16:23:58 EST 2007


Hamish wrote:

> from the scandir(3) man page:
> 
> CONFORMING TO
>        None of these functions is in  POSIX.   LSB  has  deprecated  the
>        library call alphasort() and never contained scandir().
> 
>        The  functions  scandir()  and  alphasort() are from BSD 4.3, and
>        have been available under Linux since libc4.  Libc4 and libc5 use
>        the more precise prototype
> 
>        int alphasort(const struct dirent **a, const struct dirent **b);
> 
>        but glibc 2.0 returns to the imprecise BSD prototype.
> 
>        The  function  versionsort()  is a GNU extension, available since
>        glibc 2.1.  Since glibc 2.1, alphasort() calls  strcoll(3);  ear-
>        lier it used strcmp(3).
> 
> 
> 
> .. a POSIX compliant solution would be nice,
> 

My man says:

CONFORMING TO
        None of these functions is in POSIX.1-2001, but  alphasort()  and
        scandir()  are  under  consideration  for  a  future  revision to
        POSIX.1.

So would that satisfy you? Or do you perhaps prefer Daniel's patch, 
which is perhaps better. Mine is more like a quikfix...

--Wolf

-- 

<:3 )---- Wolf Bergenheim ----( 8:>




More information about the grass-dev mailing list