Patch: Include platform.h in gnu/gcj/runtime/natStackTrace.cc

Ranjit Mathew rmathew@hotmail.com
Sun Jan 26 20:14:00 GMT 2003


Ranjit Mathew wrote:
> How about this: we define HAVE_BACKTRACE for MinGW as well
> as NEED_BACKTRACE_PROTOTYPE in configure - the latter
> is then used by natStackTrace.cc to conditionally define
> an explicit function prototype for backtrace( ).

Ignore the previous patch please - I had not read your messages
before posting it - here's a revised (and simpler) one. Sorry
for generating all the noise!

This patch makes configure specifically define HAVE_BACKTRACE for
MinGW, removes the HAVE_BACKTRACE from win32.h and makes
natStackTrace.cc include platform.h.

(NOTE: configure needs to be rebuilt after this.)

Checked with 3.3 on MinGW.

------------------------------- 8< -------------------------------
2003-01-27  Ranjit Mathew  <rmathew@hotmail.com>

         * configure.in: Specifically define HAVE_BACKTRACE if building
         for MinGW.
         * include/win32.h: Remove HAVE_BACKTRACE definition.
         * gnu/gcj/runtime/natStackTrace.cc: Include platform.h.
         * configure: Rebuilt.


--- configure.in	2003-01-26 23:18:05.000000000 +0530
+++ configure.in	2003-01-27 01:00:25.000000000 +0530
@@ -523,4 +523,11 @@
  	 ;;
       esac
+   ], [
+     case "$host" in
+       *mingw*)
+         # Has backtrace() defined in libgcj itself
+         AC_DEFINE(HAVE_BACKTRACE)
+         ;;
+     esac
     ])

--- include/win32.h	2003-01-26 23:27:34.000000000 +0530
+++ include/win32.h	2003-01-27 01:01:37.000000000 +0530
@@ -116,6 +116,4 @@
  #endif /* DISABLE_JAVA_NET */

-#define HAVE_BACKTRACE
-
  /* Store up to SIZE return address of the current program state in
     ARRAY and return the exact number of values stored.  */
--- gnu/gcj/runtime/natStackTrace.cc	2003-01-26 23:36:46.000000000 +0530
+++ gnu/gcj/runtime/natStackTrace.cc	2003-01-27 01:00:57.000000000 +0530
@@ -32,4 +32,6 @@
  #include <java/lang/ArrayIndexOutOfBoundsException.h>

+#include "platform.h"
+
  #include <sys/types.h>

------------------------------- 8< -------------------------------

Sincerely Yours,
Ranjit.

-- 
Ranjit Mathew        Email: rmathew AT hotmail DOT com
Bangalore,
INDIA.               Web: http://ranjitmathew.tripod.com/




More information about the Java-patches mailing list