tech-pkg archive

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

Re: Testing NetBSD Versions



> Testing system version numbers is rarely the right option, it's just the easy 
> way...

I strongly agree this.  Testing things with ${OPSYS} is considered
harmful.  Please don't do that anywhere.  The right way it to
conditionalize a function.  So the resulting code should have

- code with a conditional switched by a function, and
- what versions have the function and what not.

So there's one indirection introduced here.  Otherwise the code would
be unmaintainable.  (It's still hard even with useful comments.)

Masao


Home | Main Index | Thread Index | Old Index