Subject: Re: qsort problems
To: None <netbsd-help@NetBSD.ORG>
From: Berndt Josef Wulf <wulf@ping.net.au>
List: netbsd-help
Date: 11/09/1996 19:50:12
Peter Seebach wrote
>
> >In article <199611070727.RAA01792@hotdog.ping.net.au> wulf@ping.net.au (Berndt Josef Wulf) writes:
> >>int comparison( TTY_NODE **arg1, TTY_NODE **arg2 )
>
> >change it to:
> >int comparison(const void *v1, const void *v2)
> >{
> > TTY_NODE **arg1 = v1, **arg2 = v2;
>
> Very, very close; unfortunately, you need to cast away the const here,
> or have those be "const TTY_NODE **"'s.
>
> (This is why I dislike const.)
>
Many thanks to all of you who helped!!! I've got it working now and the
package compiles cleanly.
One more point though. Whilest *BSD man-pages seem to agree in the
definition of qsort() most packages implementing qsort seem to have a
different ideas and hence the problems I experience on attempts in
porting them to NetBSD. This includes some of the commercial
packages too....
Why is qsort on *BSD different to the rest of the world? There are
quite a number of other functions which are affected in the same way.
sys_errlist, malloc(), wait3() etc. pp. are some which come to my mind
right now. Is there a historical reason for it?
cheerio Berndt
--
Name : Berndt Josef Wulf
E-Mail : wulf@ping.net.au
Sysinfo : DEC AXPpci33+, NetBSD-1.2