Hello, Archie.
Thank you. Succesfully merged your changes and now everything looks better..
Still havn't solved problem with
jc: assertion failure: _r == 0
jc: location: file `thread.c' line 1023
This one is the reason for simple thread test crash after few itterations

Well after merging just compared differences of my local copy against repository' Just for your interest. This difference includes changes proposed by you and Enrico.

1.   in \libjc\arch\i386\i386_definitions.h this format differs.
#define _JC_LIBRARY_FMT        "cyg%s-0.dll"
Probably because classpath while build in my case generates dll names with major version number in name

2.  in  \libjc\arch\i386\i386_libjc.h I added this cygwin specific branch

#elif defined(__CYGWIN__)
extern inline const void *
_jc_jmpbuf_sp(const sigjmp_buf buf)
{
return (const void *)buf[7]; }

3. in \libjc\definitions.h added
#if defined (__CYGWIN__)
#define PTHREAD_STACK_MIN 1024
#endif

4. in \libjc\jc_invoke.c in struct poptOption jc_popt_options[] = { .... }
commented out POPT_AUTOHELP

5. in \libjc\native\java_lang_VMThread.c added /* Cygwin pthread_create() with supplied attributes is completely broken! */
#ifdef __CYGWIN__
#define _JC_NO_THREAD_ATTRIBUTES    1
#endif

6. in libjc\os_functions.c  cygwin specific branch added
/************************************************************************
*                CYGWIN                    *
************************************************************************/
#elif defined(__CYGWIN__)
#include <unistd.h>
int
_jc_num_cpus(_jc_env *env)
{
      return (int)sysconf(_SC_NPROCESSORS_ONLN);
}


7. in libjc/properties.c cygwin specific branch added so Set user timezone block now looks as :
   /* Set user timezone */
       now = time(NULL);

#if defined(__CYGWIN__)
   if (_jc_set_property(env,
       "user.timezone", _tzname[0]) != JNI_OK)
       return JNI_ERR;
#else

   if (_jc_set_property(env,
       "user.timezone", localtime(&now)->tm_zone) != JNI_OK)
       return JNI_ERR;
#endif

8. in libjc\zip.c   pread(..) replaced with lseek + read calls


Thanks
Ivan


Reply via email to