Received via the public mailing lists from ###@###.###:
I've been involved with porting the jdk to BSD for
several years now. One of the first things I need
to do is fix some improper datatypes only seen in
the x86 portion of hotspot where it assumes that
an intptr_t is the same datatype as an int. On at
least one BSD, intptr_t is defined as a long on x86,
which reveals the places in the x86 code where it
is assumed intptr_t is an int.
To see the problems I need to fix use the following
diff on linux/x86:
diff -ur hotspot.orig/src/share/vm/utilities/globalDefinitions_gcc.hpp hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
--- hotspot.orig/src/share/vm/utilities/globalDefinitions_gcc.hpp 2006-11-30 12:22:09.000000000 -0800
+++ hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2006-12-01 07:51:09.000000000 -0800
@@ -76,6 +76,8 @@
# endif
#ifdef LINUX
+typedef long intptr_t;
+#define __intptr_t_defined
#include <inttypes.h>
#include <signal.h>
#include <ucontext.h>
Attached is a diff that corrects the improper datatype
assumptions. I don't have access to solaris/x86 or
windows/x86 so there could be additional changes needed
there.
Feeback, review and acceptance of this patch would be
much appreciated.
[patch omitted]
|