To view parent comment, click here.
To read all comments associated with this story, please click here.
Apple is working on LLVM and BSD Foundation is apparently getting behind pcc; what I hope is that they refuse to support GNU'isms. It would require massive code replacements for the various components but hopefully what it'll mean is cleaner code that is compatible with the standards rather than deviating from them for the sake of convenience.
There needs to be a line drawn in the sand where incompatibilities are heaved out because ultimately it is these compiler and operating system specific calls in code (rather than creating an abstraction layer) that fracture the open source community and result in duplication by way of numerous patches for non-Linux operating systems and non-gnu compilers.
Edited 2009-05-05 01:24 UTC
The LinuxOnly-crowd is rapidly becomming as big a problem for the Unix-world as they often seem to think that Windows is.
I have to say that one the most stupid example of this is the god-awful code in the FastCGI part of XSP-server (Mono-project) to detect if a system supports pipes:
src/Mono.WebServer.FastCgi/UnmanagedSocket.cs
using (Stream st = File.OpenRead (
"/proc/sys/kernel/ostype")) {
StreamReader sr = new StreamReader (st);
os = sr.ReadToEnd ();
}
supports_libc = os.StartsWith ("Linux");
Now, there's not only "one" fault within this small portion of code, it actually does not work very well on Linux either in several situations.
First assumption: reading from /proc/sys/kernel/ostype
While other Unices support /proc it is not guaranteed to exist
Second assumption: Checking if the OS-name is Linux
As far as I know, nothing guarantees that /proc/sys/kernel/ostype starts with "Linux" even on Linux but on other Unices it definetly doesn't
Now, one coulde use a counter argument and say that Mono and XSP is targetted only towards Linux, fine, lets forget that the above code is C#, what about running the code on a virtual installation of Linux say using VServer or OpenVZ, will it work? No
While a small and limited example it is symptomatic of what the LinuxOnly crowd is churning out. No wonder the BSD's have to duplicate efforts in open source (even disregarding potential license issues).
While I've singled out the above code it is, apart from the above code snippet, well working code (used in production on a Debian VServer here, hacked of course with patch soon being sent upstream).





Member since:
2006-08-17
Yes .. I think we all three agree on the same thing .. linuxisms and GNUisms .. that´s why I said "written for Linux" .. and yes .. i do agree with you . the problem goes beyond HAL.