autoconf
[Top][All Lists]
Advanced

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

Re: can autoconf determine if a preprocessor macro is defined or not?


From: Ed Hartnett
Subject: Re: can autoconf determine if a preprocessor macro is defined or not?
Date: Mon, 31 Jul 2006 08:57:18 -0600
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Keith MARSHALL <address@hidden> writes:

> Ed Hartnett wrote, quoting me:
>>> However, IMO that's a lazy hack -- it suggests that you aren't
>>> really thinking about *why* you specified those attributes in the
>>> first place, and what the implications are, when you port your code
>>> to a different OS.  But, it's your code -- abuse it as you wish.
>>
>> I know exactly what is happening, and using zeros will work just fine.
>
> You may well know what's happening, and that's fine; but will another
> programmer, especially one who specialises in Woe32 programming, be
> able to read your code, without wondering "What's all this rubbish;
> it doesn't make any sense on Windows?"

Windows programmers just have to take their chances!

> Isn't it cleaner to abstract the platform dependent stuff out of the
> mainstream of the C/C++ code, into a `platform.h' file say, where you
> define your own manifest constants, to represent appropriate grouping
> of the standard definitions in a platform dependent manner, and then
> use those specialised definitions in the mainstream code?
>
> Just my 2p.  As I said, it's your code.
>

It is adequately commented and works fine. Thanks!

Ed


-- 
Ed Hartnett  -- address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]