Page 1 of 1

Caveat for BSD proggers...

Posted: Wed Jan 25, 2006 7:11 am
by Solar
I restarted development of PDCLib after switching my laptop from Gentoo Linux to FreeBSD.

And you know what? My test drivers caught an error - in the BSD libc... ;D

Verily, let it be known that you shan't attempt to qsort() an array of length 0 if you're using the BSD libc, for thou shalt find yourself in an endless loop... :o

Re:Caveat for BSD proggers...

Posted: Wed Jan 25, 2006 4:34 pm
by srg
Solar wrote: I restarted development of PDCLib after switching my laptop from Gentoo Linux to FreeBSD.

And you know what? My test drivers caught an error - in the BSD libc... ;D

Verily, let it be known that you shan't attempt to qsort() an array of length 0 if you're using the BSD libc, for thou shalt find yourself in an endless loop... :o
Interesting.

Out of interest, why thou on FreeBSD now :)

Re:Caveat for BSD proggers...

Posted: Wed Jan 25, 2006 6:14 pm
by Kemp
Heh, surely that'd be one of the most obvious boundary cases for the library to account for?

Re:Caveat for BSD proggers...

Posted: Thu Jan 26, 2006 12:24 am
by Solar
srg wrote: Out of interest, why thou on FreeBSD now :)
I was using (Gentoo) Linux before. I was always uneasy about the GPL. With the discussion about non-GPL drivers being disallowed, a recent incompatibility between the Linux kernel and my WLAN drivers (atmel), and the fact that my elderly laptop takes ages to compile and install a package from source... well, the choice was obvious. ;)

Re:Caveat for BSD proggers...

Posted: Thu Jan 26, 2006 7:02 am
by df
i would have thought a bug like that would have already been caught? which libc are you using/linking against? libc or libc_r ?

Re:Caveat for BSD proggers...

Posted: Thu Jan 26, 2006 8:11 am
by foobar3423
The libc_r is dead, no longer development in 6.x and above. Even the build has been disabled in 7.x. To link should be -pthread.

Re:Caveat for BSD proggers...

Posted: Thu Jan 26, 2006 9:51 am
by Solar
FreeBSD 6.0 is the current release, 6 the current "stable" branch. The libc used in that branch falls into an endless loop on a completely trivial corner case. End of story. 8)

Re:Caveat for BSD proggers...

Posted: Thu Jan 26, 2006 12:52 pm
by srg
Solar wrote:
srg wrote: Out of interest, why thou on FreeBSD now :)
I was using (Gentoo) Linux before. I was always uneasy about the GPL. With the discussion about non-GPL drivers being disallowed, a recent incompatibility between the Linux kernel and my WLAN drivers (atmel), and the fact that my elderly laptop takes ages to compile and install a package from source... well, the choice was obvious. ;)
But ports compiles from source?

FreeBSD 6???? :o

what license does PDCLib come under?

Re:Caveat for BSD proggers...

Posted: Thu Jan 26, 2006 2:03 pm
by Candy
srg wrote: what license does PDCLib come under?
PDCLib stands for "Public Domain C Library"... Guess what the license is?

Re:Caveat for BSD proggers...

Posted: Thu Jan 26, 2006 2:23 pm
by srg
Candy wrote:
srg wrote: what license does PDCLib come under?
PDCLib stands for "Public Domain C Library"... Guess what the license is?
I guess there isn't one.

I always misinterpret what Public Domain means.

Re:Caveat for BSD proggers...

Posted: Thu Jan 26, 2006 2:33 pm
by JoeKayzA
srg wrote: But ports compiles from source?
Ports do compile from source, you are right. But under FreeBSD, ports isn't the only way to install packages, there is a binary package manager on top of it (don't remember the name though). Unlike under Gentoo, you'll find a binary package for probably every single port.

cheers Joe

Re:Caveat for BSD proggers...

Posted: Thu Jan 26, 2006 2:35 pm
by srg
JoeKayzA wrote:
srg wrote: But ports compiles from source?
Ports do compile from source, you are right. But under FreeBSD, ports isn't the only way to install packages, there is a binary package manager on top of it (don't remember the name though). Unlike under Gentoo, you'll find a binary package for probably every single port.

cheers Joe
Nice :) I was always annoyed at how long it took to compile ports based apps.

(BTW I've always profered FreeBSD to Linux, I just wish it had the same level of driver support)

Re:Caveat for BSD proggers...

Posted: Thu Jan 26, 2006 4:16 pm
by Solar
Actually, for me the FreeBSD driver support is better, as my WLAN chipset is supported by the kernel directly. ;)

As for Public Domain, German law doesn't really know the concept of "placing into PD", so PDCLib has a bit of legaleze at the top of its Readme file - but it sums up to "take it and be happy". ;)