NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD macros

"Greg A. Woods" <> wrote:

> I would very strongly question the "hundreds of systems" part of that
> claim these days, even if one includes every release of every kind of
> system where these tests have actually been run "hundreds of times"!

The autoconf makros have been tested on more platforms than any other
configure-like thing out there. Sure, the resulting configure script
might be only tested on a few platfomrms. And sure, developers can (and
often do) screw up when writing files - but that's not
autoconf's fault, because many just write stupid tests without
understanding the way autoconf works.

> Even worse, many people use autoconf as a crutch and then fail to
> write good portable code that doesn't need compile-time configuration
> in the first place!

This is not an autoconf problem, but a user-problem. If you want to use
autoconf, you should first understand the philosophy behind it -
testing for features instead of making assumptions based on OS etc.

> To that end one should avoid using system identifiers if possible, but
> sometimes these are indeed the best way to control compile-time
> configuration.

System identifiers are NEVER a good way to control compiler-time
configuration, _NEVER_! You want to know features, _NOT_ operating
systems! The features can and _WILL_ change over time! Just doing
#ifdef __NetBSD__ will horribly fail, as features were removed over
time and others added. And once a new release comes out, you have to
update your code. Good luck updating your code whenever there's a new
release of any OS in the world that changes some feature!


Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index