This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

patch2 darwin & libgcj


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 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 <>

        	* libjava/
		add a timezone check
		* libjava/java/lang/
		handle the above timezone check

diff -ur gccclean/gcc/libjava/ gccsrc/gcc/libjava/
--- gccclean/gcc/libjava/   Sat Dec 29 12:43:01 2001
+++ gccsrc/gcc/libjava/     Sat Dec 29 11:30:31 2001
@@ -794,6 +794,8 @@


 AC_CHECK_PROGS(PERL, perl, false)

diff -ur gccclean/gcc/libjava/java/lang/ gccsrc/gcc/libjava/java/lan
--- gccclean/gcc/libjava/java/lang/ Sat Dec 29 12:42:31 2001
+++ gccsrc/gcc/libjava/java/lang/   Sat Dec 29 11:30:01 2001
@@ -263,7 +263,17 @@
   // issue exists in java/util/
   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
+// 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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]