autoconf
[Top][All Lists]
Advanced

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

Handling __STDC__ on Windows


From: Paul D. Smith
Subject: Handling __STDC__ on Windows
Date: 13 Jul 2005 10:01:18 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

I have a bunch of macros in GNU make that try to determine whether the
compiler groks ANSI C, like this:

  #if defined (__cplusplus) || (defined (__STDC__) && __STDC__)

But, that doesn't work on Windows because the Windows compilers do this:

    #define __STDC__ 0

I guess the feeling is they support standard C with extensions so they
define it to 0 or something--seems silly to me but there's not much we
can do about this.


What is the autoconf-recommended, portable way to handle this?

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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