I: gcc ... -U_WIN32 ... may cause problems
Larry Hall (RFK Partners Inc)
Fri Sep 4 03:17:00 GMT 1998
At 07:18 PM 9/1/98 -0500, Mumit Khan wrote:
>On Mon, 31 Aug 1998, Geoffrey Noer wrote:
>> Perhaps -Dunix should be added to the define list whenever
>> __CYGWIN32__ is defined? Linux includes -Dunix and -Asystem(posix) in
>> CPP_PREDEFINES (looking at gcc/config/i386/linux.h).
>I see no problem in cygwin32 specs defining "unix", but I have yet to
>see a good argument for getting rid of _WIN32 from x86-win32 targets,
>especially from mingw32.
>So far I've seen only a 2 or 3 posts suggesting we get rid of WIN32
>(Earnie Boyd and someone else -- Larry Hall? Sorry, I can't remember),
>but all of these were low on details as to why. If I'm missing a few
>posts that you believe are pertinent, please feel free to shout.
>Granted that lots of code out there IMO incorrectly uses _WIN32 where it
>should be using _MSC_VER or BORLANDC or, better yet, autoconf style macros
>(or some other similar mechanism) to define capabilities of host/target
>system; I think over time we should be getting those packages fixed instead
>of getting rid of WIN32 and temporarily masking the problem.
The best argument I have for getting rid of _WIN32 from cygwin and mingw is
that MS docs claim _WIN32 is MS compiler specific. It says nothing about
WIN32 as far as I know. Since this statement has been made, it seems a
shame to make such a compiler specific define more generic, especially
since it can be used in code to determine whether compiler/platform
specific things need to be considered. Perhaps _MSC_VER can be used for
this too but then again, what's the advantage of making _WIN32 generic,
especially when WIN32, if needed, is available and even more intuitive?
Larry Hall firstname.lastname@example.org
RFK Partners, Inc. (781) 239-1053
8 Grove Street (781) 239-1655 - FAX
Wellesley, MA 02482-7797 http://www.rfk.com
For help on using this list (especially unsubscribing), send a message to
"email@example.com" with one line of text: "help".
More information about the Cygwin