This is the mail archive of the
mailing list for the GCC project.
patch2 darwin & libgcj
- From: Andreas Tobler <toa at pop dot agri dot ch>
- To: GCC-Java <java at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Tom Tromey <tromey at redhat dot com>
- Date: Sat, 29 Dec 2001 18:09:31 +0100
- Subject: patch2 darwin & libgcj
- Organization: zero
this is #2 to get libgcj 'compile' under darwin.
I'm not completely happy with, since I don't know the correct cast, see
below. Also, to apply this patch you have to run autoconf & autoheader
in gcc/libjava to get the new introduced AC_STRUCT_TIMEZONE propagated correctly.
This patch introduces a new configure.in check versus timezone. Darwin
doesn't know tzname so I tried to play.
The two patches make libgcj compile under darwin (ufs) although I have
some linking errors.
I send these patches to gcc-patches since it is noted so and they are
not mainly java related.
Comments welcome for improvements!!
P.S, I don't send the configure diff since I'm not sure about it. Do I
have to provide this or is anyone else able to update it?
P.S2, here I'm completely unsure could someone help, I don't know the
definition of tzname:
tzinfo = &tim->tm_zone
2001-12-29 Andreas Tobler <email@example.com>
add a timezone check
handle the above timezone check
diff -ur gccclean/gcc/libjava/configure.in gccsrc/gcc/libjava/configure.in
--- gccclean/gcc/libjava/configure.in Sat Dec 29 12:43:01 2001
+++ gccsrc/gcc/libjava/configure.in Sat Dec 29 11:30:31 2001
@@ -794,6 +794,8 @@
AC_CHECK_PROGS(PERL, perl, false)
diff -ur gccclean/gcc/libjava/java/lang/natSystem.cc gccsrc/gcc/libjava/java/lan
--- gccclean/gcc/libjava/java/lang/natSystem.cc Sat Dec 29 12:42:31 2001
+++ gccsrc/gcc/libjava/java/lang/natSystem.cc Sat Dec 29 11:30:01 2001
@@ -263,7 +263,17 @@
// issue exists in java/util/natGregorianCalendar.cc.
tzoffset = 0L;
+// check if a system has tzname or not. Not sure how to handle else
+// darwin does not have the tzname so I tried a hack, need help here
+// firstname.lastname@example.org 29122001
tzinfo = tzname;
+ tzinfo = &tim->tm_zone;
+ //what to do else ?
+#error neither tzname nor tm_zone defined
if ((tzoffset % 3600) == 0)
tzoffset = tzoffset / 3600;