Caveat for BSD proggers...

Programming, for all ages and all languages.
Post Reply
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Caveat for BSD proggers...

Post 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
Every good solution is obvious once you've found it.
srg

Re:Caveat for BSD proggers...

Post 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 :)
Kemp

Re:Caveat for BSD proggers...

Post by Kemp »

Heh, surely that'd be one of the most obvious boundary cases for the library to account for?
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Caveat for BSD proggers...

Post 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. ;)
Every good solution is obvious once you've found it.
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re:Caveat for BSD proggers...

Post 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 ?
-- Stu --
foobar3423

Re:Caveat for BSD proggers...

Post 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.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Caveat for BSD proggers...

Post 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)
Every good solution is obvious once you've found it.
srg

Re:Caveat for BSD proggers...

Post 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?
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Caveat for BSD proggers...

Post by Candy »

srg wrote: what license does PDCLib come under?
PDCLib stands for "Public Domain C Library"... Guess what the license is?
srg

Re:Caveat for BSD proggers...

Post 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.
JoeKayzA

Re:Caveat for BSD proggers...

Post 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
srg

Re:Caveat for BSD proggers...

Post 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)
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Caveat for BSD proggers...

Post 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". ;)
Every good solution is obvious once you've found it.
Post Reply