> Albrecht Kleine <[EMAIL PROTECTED]> writes:

[....was about japhar 0.08...., deleted]

> 
> > ./japhar xyz  gives ``Segmentation fault''


Mean while I've located the problem in 

lib/libnative/java.lang/system.c related to a call
of localtime().

I applied this patch (not meant as a real patch for you)

--- system.cOrig        Mon Mar 15 15:05:58 1999
+++ system.c    Wed Jul 28 21:34:07 1999
@@ -395,9 +395,9 @@
   key = (*env)->NewStringUTF(env, "user.timezone");
   value = 0;
   t = time(0);
-  tminfo = localtime(&t);
+//  tminfo = localtime(&t);    
+// ********** ^ ^ ^  crash ******* 
 #if HAVE_TM_ZONE
-  value = (*env)->NewStringUTF(env, tminfo->tm_zone);
+//  value = (*env)->NewStringUTF(env, tminfo->tm_zone);
 #elif defined(HAVE_TZNAME)
   value = (*env)->NewStringUTF(env, tzname[tminfo->tm_isdst]);   
 #else


... and no japhar's javac is able to compile java files :)
OTOH it seems to crash if programs are using System.out.println.


So I wanted to know what's going on around localtime() 
and wrote this stand alone prog:

#include <stdio.h>
#include <time.h>
main()
{
   time_t t;
   struct tm *tminfo;
   tminfo = localtime(&t);
   fprintf(stderr,"%s\n",tminfo->tm_zone);
}

It works and it prints ``MET'' on console.

Any ideas ?
Cheers
Albrecht

Reply via email to