PatchSet 4986 Date: 2004/07/19 06:57:16 Author: guilhem Branch: HEAD Tag: (none) Log: Various build fixes + FreeBSD pthreads fixes.
* configure.ac: Use AC_STRUCT_TIMEZONE instead of a personnally built macro. * configure/config.h.in, configure: Regenerated. * libraries/clib/native/TimeZone.c: Use HAVE_TM_ZONE and HAVE_TZNAME. * kaffe/kaffevm/systems/unix-pthreads.c (jthreadedAccept): Fixed value in tv_sec/tv_usec. On FreeBSD, accept does not time out. * libraries/javalib/Makefile.am.in: Removed $(srcdir) as it is not useful and may even cause bugs in some configuration. * libraries/javalib/Makefile.am, libraries/javalib/Makefile.in: Regenerated. Members: ChangeLog:1.2549->1.2550 configure:1.358->1.359 configure.ac:1.56->1.57 kaffe/kaffevm/systems/unix-pthreads/syscalls.c:1.16->1.17 libraries/clib/native/TimeZone.c:1.4->1.5 libraries/javalib/Makefile.am:1.200->1.201 libraries/javalib/Makefile.am.in:1.13->1.14 libraries/javalib/Makefile.in:1.274->1.275 Index: kaffe/ChangeLog diff -u kaffe/ChangeLog:1.2549 kaffe/ChangeLog:1.2550 --- kaffe/ChangeLog:1.2549 Sun Jul 18 17:46:03 2004 +++ kaffe/ChangeLog Mon Jul 19 06:57:16 2004 @@ -1,3 +1,23 @@ +2004-07-18 Guilhem Lavaux <[EMAIL PROTECTED]> + + * configure.ac: Use AC_STRUCT_TIMEZONE instead of a personnally + built macro. + + * configure/config.h.in, configure: Regenerated. + + * libraries/clib/native/TimeZone.c: Use HAVE_TM_ZONE and + HAVE_TZNAME. + + * kaffe/kaffevm/systems/unix-pthreads.c + (jthreadedAccept): Fixed value in tv_sec/tv_usec. On FreeBSD, + accept does not time out. + + * libraries/javalib/Makefile.am.in: Removed $(srcdir) as it is not + useful and may even cause bugs in some configuration. + + * libraries/javalib/Makefile.am, + libraries/javalib/Makefile.in: Regenerated. + 2004-07-18 Dalibor Topic <[EMAIL PROTECTED]> * configure.ac: Index: kaffe/configure diff -u kaffe/configure:1.358 kaffe/configure:1.359 --- kaffe/configure:1.358 Sun Jul 18 17:46:06 2004 +++ kaffe/configure Mon Jul 19 06:57:19 2004 @@ -50395,127 +50395,6 @@ fi -echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 -if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#if defined(HAVE_TIME_H) -#include <time.h> -#endif - - -int -main () -{ -static struct tm ac_aggr; -if (ac_aggr.tm_zone) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_member_struct_tm_tm_zone=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#if defined(HAVE_TIME_H) -#include <time.h> -#endif - - -int -main () -{ -static struct tm ac_aggr; -if (sizeof ac_aggr.tm_zone) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_member_struct_tm_tm_zone=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_member_struct_tm_tm_zone=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 -if test $ac_cv_member_struct_tm_tm_zone = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_TM_TM_ZONE 1 -_ACEOF - - -fi - - KSAVE_LIBS="$LIBS" LIBS="$M_LIBS $LIBS" Index: kaffe/configure.ac diff -u kaffe/configure.ac:1.56 kaffe/configure.ac:1.57 --- kaffe/configure.ac:1.56 Sun Jul 18 17:46:11 2004 +++ kaffe/configure.ac Mon Jul 19 06:57:29 2004 @@ -1351,13 +1351,6 @@ #endif ]) -dnl some Solaris systems don't have a tm_zone member in struct tm. -AC_CHECK_MEMBERS([struct tm.tm_zone],,,[ -#if defined(HAVE_TIME_H) -#include <time.h> -#endif -]) - KSAVE_LIBS="$LIBS" LIBS="$M_LIBS $LIBS" AC_CHECK_FUNCS([remainder remainderf fmod fmodf drem]) Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/syscalls.c diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/syscalls.c:1.16 kaffe/kaffe/kaffevm/systems/unix-pthreads/syscalls.c:1.17 --- kaffe/kaffe/kaffevm/systems/unix-pthreads/syscalls.c:1.16 Sun Jul 4 14:19:58 2004 +++ kaffe/kaffe/kaffevm/systems/unix-pthreads/syscalls.c Mon Jul 19 06:57:31 2004 @@ -468,7 +468,7 @@ int timeout, int* out) { /* absolute time at which time out is reached */ -#if defined(SO_RCVTIMEO) +#if defined(SO_RCVTIMEO) && !defined(__FreeBSD__) int ret; struct timeval old_tv; struct timeval new_tv; @@ -478,10 +478,13 @@ /* Guessed according to the former behaviour of jthreadedAccept * Even if it is wrong */ - if (timeout == NOTIMEOUT) - new_tv.tv_usec = 0; - else - new_tv.tv_usec = timeout*1000; + if (timeout == NOTIMEOUT) { + new_tv.tv_sec = 0; + new_tv.tv_usec = 0; + } else { + new_tv.tv_sec = timeout / 1000; + new_tv.tv_usec = (timeout % 1000) * 1000; + } ret = setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &new_tv, sizeof(new_tv)); if (!ret) { ret = accept (fd, addr, len); Index: kaffe/libraries/clib/native/TimeZone.c diff -u kaffe/libraries/clib/native/TimeZone.c:1.4 kaffe/libraries/clib/native/TimeZone.c:1.5 --- kaffe/libraries/clib/native/TimeZone.c:1.4 Sun Jul 18 17:46:13 2004 +++ kaffe/libraries/clib/native/TimeZone.c Mon Jul 19 06:57:32 2004 @@ -24,17 +24,17 @@ java_util_TimeZone_getDefaultTimeZoneId(void) { char *tempZoneName = NULL; -#if defined(HAVE_STRUCT_TM_TM_ZONE) +#if defined(HAVE_TM_ZONE) struct tm *tempTimeStruct; time_t tempTimeArithm; tempTimeArithm = 0; tempTimeStruct = localtime (&tempTimeArithm); tempZoneName = tempTimeStruct->tm_zone; -#else /* ! defined(HAVE_STRUCT_TM_TM_ZONE) */ +#elif defined(HAVE_TZNAME) tzset(); tempZoneName = tzname[0]; /* read above for this external symbol */ -#endif /* defined(HAVE_STRUCT_TM_TM_ZONE) */ +#endif /* defined(HAVE_TM_ZONE) */ assert(tempZoneName != NULL); return stringC2Java(tempZoneName); } Index: kaffe/libraries/javalib/Makefile.am diff -u kaffe/libraries/javalib/Makefile.am:1.200 kaffe/libraries/javalib/Makefile.am:1.201 --- kaffe/libraries/javalib/Makefile.am:1.200 Sun Jul 18 15:28:07 2004 +++ kaffe/libraries/javalib/Makefile.am Mon Jul 19 06:57:33 2004 @@ -2907,7 +2907,7 @@ rm -rf $(LIBDIR) mkdir $(LIBDIR) if test "$(PROFILE)" = default; then \ - $(SHELL) $(rebuildLib) @$(srcdir)/all.files; \ + $(SHELL) $(rebuildLib) @all.files; \ else \ $(SHELL) $(rebuildLib) @$(PROFILE); \ fi Index: kaffe/libraries/javalib/Makefile.am.in diff -u kaffe/libraries/javalib/Makefile.am.in:1.13 kaffe/libraries/javalib/Makefile.am.in:1.14 --- kaffe/libraries/javalib/Makefile.am.in:1.13 Sun Jul 18 15:28:08 2004 +++ kaffe/libraries/javalib/Makefile.am.in Mon Jul 19 06:57:33 2004 @@ -192,7 +192,7 @@ rm -rf $(LIBDIR) mkdir $(LIBDIR) if test "$(PROFILE)" = default; then \ - $(SHELL) $(rebuildLib) @$(srcdir)/all.files; \ + $(SHELL) $(rebuildLib) @all.files; \ else \ $(SHELL) $(rebuildLib) @$(PROFILE); \ fi Index: kaffe/libraries/javalib/Makefile.in diff -u kaffe/libraries/javalib/Makefile.in:1.274 kaffe/libraries/javalib/Makefile.in:1.275 --- kaffe/libraries/javalib/Makefile.in:1.274 Sun Jul 18 15:28:08 2004 +++ kaffe/libraries/javalib/Makefile.in Mon Jul 19 06:57:33 2004 @@ -3741,7 +3741,7 @@ rm -rf $(LIBDIR) mkdir $(LIBDIR) if test "$(PROFILE)" = default; then \ - $(SHELL) $(rebuildLib) @$(srcdir)/all.files; \ + $(SHELL) $(rebuildLib) @all.files; \ else \ $(SHELL) $(rebuildLib) @$(PROFILE); \ fi _______________________________________________ kaffe mailing list [EMAIL PROTECTED] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe