Patch: Include platform.h in gnu/gcj/runtime/natStackTrace.cc
Ranjit Mathew
rmathew@hotmail.com
Sun Jan 26 03:46:00 GMT 2003
Andrew Haley wrote:
> For example: say you read your program source and discover that some
> code is conditional on HAVE_BACKTRACE, so you look in include/config.h
> and discover that variable isn't set. However, it *is* set, whatever
> config.h says, just somewhere else. And because you have two
> contradictory defintions of HAVE_BACKTRACE the result depends on what
> order platform.h and config.h are included. ARgh!
I agree totally with what you say and the configure.in thingy is what
I had done on my first attempt. However, you must realise that we also
need the prototype for backtrace( ) which doesn't belong to config.h
AFAICT.
The other choices with me were to either include platform.h or to
have conditional (on WIN32 being defined) code in natStackTrace.cc
that declares the prototype for backtrace( ).
What I can perhaps do is to have configure define HAVE_BACKTRACE
for Win32 (does Cygwin use win32.h as well or is it only MinGW?),
and then have natStackTrace.cc provide a conditional prototype for
backtrace( ) on Win32.
Or does anyone have better ideas?
Ranjit.
--
Ranjit Mathew Email: rmathew AT hotmail DOT com
Bangalore,
INDIA. Web: http://ranjitmathew.tripod.com/
More information about the Java-patches
mailing list