Steve Greenland <[EMAIL PROTECTED]> writes: > You figure out where the incompatability points are, and you write > functions to mask them. Of course the functions themselves have > #ifdefs (or some other way of controlling compilation), but you get it > *out* of your main code base.
Gee sounds like a _perfect_ application of ... autoconf! > I spend quite a bit of my life working on non-Linux platforms (as well > as a variety of Linux ones). I've built *lots* of free software on these > platforms. My experience is that the ones whose build instructions say > "edit the makefile to pick your platform and compiler" compile and work, > and when they don't, they're easy to fix. The ones that use autoconf > tend to blow up on non-Linux[1], in ways that are hard to debug and damn > near impossible to fix. This is a cultural artifact (of a monoculture made possible by the relative dominance of linux in its niche), not a result of using autoconf. [In the early days of linux, it was much, _much_ worse, because not only didn't they use autoconf, they didn't even _try_ to be portable, simply assumed everything was exactly like the exact linux distribution they happened to be using.] Programs that work well with "edit the makefile and define SYS to be sys-FOO.c" style tend to program to the lowest common denominator, because doing anything else simply becomes too painful with this style of portability. This is fine for some apps (and indeed autoconf supports this sort of thing quite well), but in cases where you _need_ to use more esoteric functionality, it quickly becomes a real pain; autoconf's emphasis on finer-granularity helps considerably (though it's always going to be a pain). The main problem with your argument is that you seem to be looking at poorly written programs that use autoconf, and jumping to the conclusion that autoconf is the reason for the poor programming -- it's not. Bad programmers made a hash of it no matter what style of portability they choose. -Miles -- o The existentialist, not having a pillow, goes everywhere with the book by Sullivan, _I am going to spit on your graves_. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]