Aaron Stone wrote:
Magnus has an important point: don't check for an OS, check for what its
behavior is. I believe that in this case, we're talking about activating
parts of a system-dependent header with this flag. That the flag is system
dependent is not at issue; it's how we test that.

If the approach is like this...

 "Does blah.h work? No? What about if we add -D__LINUX__? Works? Good!"

then we're doing The Right Thing (TM). If the approach is like this:

 "if( uname -a | grep Linux )"

then we're way off in left field.


Aaron

Hello,
Yes,
But I agree, but I beleive LINUX is a stupid name, because it would quite fast become something that configure test for capability X.
Everything working alright.
Then comes next programmer who needs capability Y, which he knows always is present in linux, he will just add something like
#ifdef __LINUX__
to his code and everything will work,
but what happens if some later linux API is changed, kernel revision 2.8 (or whatever) What about porting to other operating system. This operating system supports capability X, you need to add -D__LINUX__ to the compiling environment. Now you just have system administrators compiling code. I beleive they will be very puzzled when the compile script defines __LINUX__ on their non linux system, even if it is correct.

But as I said before. I watch your mailing list to get an idea of when I should install dbmail and I have not looked into your code at all.


Magnus



Reply via email to