Skip to content
Snippets Groups Projects
  1. Feb 22, 2007
    • Jakub Jelinek's avatar
      re PR libgcj/17002 (java.util.TimeZone.getDefault() is broken) · b3502aa8
      Jakub Jelinek authored
      libjava/
      	PR libgcj/17002
      	PR classpath/28550
      	* java/util/VMTimeZone.java (getDefaultTimeZoneId): To read
      	/etc/localtime, use ZoneInfo.readTZFile instead of
      	VMTimeZone.readtzFile.  Get better timezone name for /etc/localtime,
      	either if it is a symlink or through /etc/sysconfig/clock.
      	(readSysconfigClockFile): New static method.
      	(readtzFile): Removed.
      	* java/lang/System.java: Add gnu.java.util.zoneinfo.dir to comments.
      	* posix.cc (_Jv_platform_initProperties): Set
      	gnu.java.util.zoneinfo.dir.
      	* sources.am (gnu_java_util_source_files): Add
      	classpath/gnu/java/util/ZoneInfo.java.
      	* Makefile.in: Regenerated.
      	* java/util/VMTimeZone.h: Regenerated.
      	* java/util/TimeZone.h: Regenerated.
      	* gnu/java/util/ZoneInfo.h: Generated.
      libjava/classpath/
      	* java/util/Date.java (parse): Properly parse 09:01:02 as
      	hours/minutes/seconds, not as hours/minutes/year.
      	* java/util/SimpleTimeZone.java (SimpleTimeZone): Simplify
      	{start,end}TimeMode constructor by calling shorter constructor,
      	set {start,end}TimeMode fields after it returns.
      	(setStartRule): Don't adjust startTime into WALL_TIME.  Set
      	startTimeMode to WALL_TIME.
      	(endStartRule): Similarly.
      	(getOffset): Handle properly millis + dstOffset overflowing into the
      	next day.  Adjust startTime resp. endTime based on startTimeMode
      	resp. endTimeMode.
      	* java/util/TimeZone.java (zoneinfo_dir, availableIDs, aliases0): New
      	static fields.
      	(timezones): Remove synchronized keyword.  Set zoneinfo_dir.
      	If non-null, set up aliases0 and don't put anything into
      	timezones0.
      	(defaultZone): Call getTimeZone instead of timezones().get.
      	(getDefaultTimeZone): Fix parsing of EST5 or EST5EDT6.  Use
      	getTimeZoneInternal instead of timezones().get.
      	(parseTime): Parse correctly hour:minute.
      	(getTimeZoneInternal): New private method.
      	(getTimeZone): Do the custom ID checking first, canonicalize
      	ID for custom IDs as required by documentation.  Call
      	getTimeZoneInternal to handle the rest.
      	(getAvailableIDs(int)): Add locking.  Handle zoneinfo_dir != null.
      	(getAvailableIDs(File,String,ArrayList)): New private method.
      	(getAvailableIDs()): Add locking.  Handle zoneinfo_dir != null.
      	* gnu/java/util/ZoneInfo.java: New file.
      
      From-SVN: r122229
      b3502aa8
  2. Sep 14, 2006
    • Geoffrey Keating's avatar
      posix.cc (_Jv_platform_nanotime): Return nanoseconds, not microseconds; use... · 06fcf754
      Geoffrey Keating authored
      posix.cc (_Jv_platform_nanotime): Return nanoseconds, not microseconds; use gettimeofday when available.
      
      	* posix.cc (_Jv_platform_nanotime): Return nanoseconds, not
      	microseconds; use gettimeofday when available.
      	* posix-threads.cc (_Jv_CondWait): Improve accuracy and range of
      	timeout calculation.
      	* testsuite/libjava.lang/Thread_Sleep_2.java: New.
      	* testsuite/libjava.lang/Thread_Sleep_2.out: New.
      	* testsuite/libjava.lang/Thread_Sleep_2.xfail: New.
      
      From-SVN: r116941
      06fcf754
  3. Jul 04, 2006
  4. Jun 29, 2006
    • Ranjit Mathew's avatar
      javaprims.h (_Jv_uintptr_t): New typedef similar to uintptr_t in C99. · 33792684
      Ranjit Mathew authored
      	* gcj/javaprims.h (_Jv_uintptr_t): New typedef similar to uintptr_t in
      	C99.
      	* include/java-stack.h: Include stdlib.h.
      	(_Jv_AddrInfo): New structure to hold address information.
      	* include/posix.h (_Jv_platform_dladdr): Declare.
      	* include/win32.h (_Jv_platform_dladdr): Declare.
      	(backtrace): Remove declaration.
      	* posix.cc: Include dlfcn.h if available.  Include java-stack.h.
      	(_Jv_platform_dladdr): Define.
      	* win32.cc: Include string.h.  Include java-stack.h.
      	(backtrace): Remove.
      	(_Jv_platform_dladdr): Define.
      	* sysdep/i386/backtrace.h (fallback_backtrace): Check that a potential
      	frame pointer value is 32-bit word-aligned.  Use operand of the CALL
      	instruction calling the current function to find its starting address.
      	* stacktrace.cc: Do not include dlfcn.h.  Include platform.h.
      	(_Jv_StackTrace::getLineNumberForFrame): Use _Jv_platform_dladdr()
      	instead of dladdr().
      	(_Jv_StackTrace::GetStackTraceElements): Use nCodeMap even for Windows.
      	(_Jv_StackTrace::GetClassContext): Use fallback_backtrace() for
      	targets with SJLJ exceptions instead of using _Unwind_Backtrace().
      	(_Jv_StackTrace::GetFirstNonSystemClassLoader): Likewise.
      
      From-SVN: r115069
      33792684
  5. Mar 31, 2006
  6. Mar 29, 2006
  7. Mar 09, 2006
    • Tom Tromey's avatar
      win32.cc (_Jv_platform_nanotime): New function. · e59a1e40
      Tom Tromey authored
      	* win32.cc (_Jv_platform_nanotime): New function.
      	* include/win32.h (_Jv_platform_nanotime): Declare.
      	* posix.cc (_Jv_platform_nanotime): New function.
      	* include/posix.h (_Jv_platform_nanotime): Declare.
      	* java/lang/natSystem.cc (nanoTime): New method.
      	* java/lang/System.java (nanoTime): Declare.
      	* include/config.h.in, configure: Rebuilt.
      	* configure.ac: Check for clock_gettime.
      
      From-SVN: r111869
      e59a1e40
  8. Feb 09, 2006
    • Bryce McKinlay's avatar
      re PR libgcj/25187 (dereferencing type-punned pointer warnings while building libgcj) · 1349c688
      Bryce McKinlay authored
      2006-02-08  Bryce McKinlay  <mckinlay@redhat.com>
      
              PR libgcj/25187:
              * gnu/gcj/io/natSimpleSHSStream.cc
              (gnu::gcj::io::SimpleSHSStream::shsFinal): Remove bogus cast.
              * interpret.cc (_Jv_InterpMethod::run): Simplify arguments to
              _Jv_InterpFrame().
              * boehm.cc: #undef some autoconf macros before including gc-config.h.
              (_Jv_MarkObject): Don't mark the class, it is reachable via the vtable.
              (_Jv_MarkArray): Likewise.
              * java/lang/ref/natReference.cc (java::lang::ref::Reference::create):
              Simplify _Jv_GCRegisterDisappearingLink() call.
              * java/lang/Class.h (getComponentType): Use element_type.
              (element_type): New field declaration, as a union with "methods".
              * java/lang/natClassLoader.cc (_Jv_NewArrayClass): Use "element_type".
              * java/net/natVMNetworkInterfacePosix.cc
              (java::net::VMNetworkInterface::getInterfaces): Add "int" cast to
              avoid sign comparison warning.
              * include/java-interp.h (_Jv_InterpFrame): Take thread as second
              argument, not parent call frame.
              * include/x86_64-signal.h (MAKE_THROW_FRAME): Use "gregs" directly,
              without a cast.
              (restore_rt): Declare with hidden visibility, not "static".
              * posix.cc (_Jv_platform_initProperties): Make "tmpdir" a string
              constant.
              * jni.cc (_Jv_JNI_DestroyJavaVM): Use a union to avoid strict alias
              warning
      
      From-SVN: r110783
      1349c688
  9. Jul 08, 2003
  10. Apr 25, 2003
    • Mohan Embar's avatar
      jvm.h: (_Jv_GetNbArgs) added (_Jv_GetSafeArg) added (_Jv_SetArgs) added · c4519773
      Mohan Embar authored
      2003-03-29  Mohan Embar  <gnustuff@thisiscool.com>
      
              * include/jvm.h: (_Jv_GetNbArgs) added
              (_Jv_GetSafeArg) added
              (_Jv_SetArgs) added
              * prims.cc: (_Jv_GetNbArgs) implemented
              (_Jv_GetSafeArg) implemented
              (_Jv_SetArgs) implemented
              (_Jv_RunMain) use _Jv_SetArgs() instead of explicitly
              setting _Jv_argc and _Jv_argv
              * posix.cc: (_Jv_ThisExecutable) use _Jv_GetSafeArg()
              instead of _Jv_argv
              * java/lang/natRuntime.cc: (insertSystemProperties) use
              _Jv_GetSafeArg() instead of _Jv_argv
      
      From-SVN: r66067
      c4519773
  11. Mar 10, 2003
    • Andrew Haley's avatar
      [multiple changes] · c068c638
      Andrew Haley authored
      2003-03-10  2003-02-27  Mohan Embar  <gnustuff@thisiscool.com>
      
              * include/jvm.h: removed declaration of _Jv_ThisExecutable()
              setter; made return value of getter const char* instead of char*
              * prims.cc: removed all references to _Jv_ThisExecutable().
              These are in the platform-specific sections now.
              * posix.cc: define platform-specific _Jv_ThisExecutable().
              Handle DISABLE_MAIN_ARGS and HAVE_PROC_SELF_EXE cases
              * win32.cc: define platform-specific _Jv_ThisExecutable()
              using GetModuleFilename()
              * java/lang/natRuntime.cc: set gnu.gcj.progname property
              to argv[0] instead of _Jv_ThisExecutable()
      
      2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
      
              * gnu/gcj/runtime/NameFinder.java (usingAddr2name): New flag
              that is set if we are using addr2name.awk instead of addr2line.
              (NameFinder): Set usingAddr2name if using addr2name.awk.
              (getExternalLabel): New native method to convert a method
              name to an external label.
              (lookup): Convert name given by addr2line to an external label
              before demangling.
      
              * gnu/gcj/runtime/natNameFinder.cc (LABEL_PREFIX): New string
              constant representing the prefix attached to method names to
              convert them to an external label.
              (gnu::gcj::runtime::NameFinder::getExternalLabel): Define
              using LABEL_PREFIX.
      
      From-SVN: r64111
      c068c638
  12. Apr 07, 2002
    • Adam King's avatar
      natSystem.cc (init_properties): Call new function _Jv_platform_initProperties. · 455cd615
      Adam King authored
      2002-04-07  Adam King <aking@dreammechanics.com>
      
      	* java/lang/natSystem.cc (init_properties): Call new function
      	_Jv_platform_initProperties.
      	* win32 (_Jv_platform_initProperties): New function that adds Win32
      	support for the System properties os.name, os.arch, os.version,
      	user.name, user.home, and user.dir.
      	* include/posix.h, include/win32.h, posix.cc: New function
      	_Jv_platform_initProperties.
      
      From-SVN: r51989
      455cd615
  13. Mar 09, 2002
  14. Mar 08, 2002
    • Tom Tromey's avatar
      posix.cc (internal_gettimeofday): New function. · 7258310a
      Tom Tromey authored
      	* posix.cc (internal_gettimeofday): New function.
      	(_Jv_select): Use it.
      
      From-SVN: r50442
      7258310a
    • Adam Megacz's avatar
      win32.cc (_Jv_platform_gettimeofday): Now takes no args, returns jlong. · 8eeda6e0
      Adam Megacz authored
      2002-03-07  Adam Megacz  <adam@xwt.org>
      
              * win32.cc (_Jv_platform_gettimeofday): Now takes no args,
              returns jlong. Added implementation
              * posix.cc (_Jv_platform_gettimeofday): Now takes no args,
              returns jlong.
              * win32.h (_Jv_platform_gettimeofday): Now takes no args,
              returns jlong.
              * posix.h (_Jv_platform_gettimeofday): Now takes no args,
              returns jlong.
              * java/lang/natSystem.cc (currentTimeMillis): Now uses updated
              _Jv_platform_gettimeofday signature.
      
      From-SVN: r50416
      8eeda6e0
  15. Feb 07, 2002
    • Tom Tromey's avatar
      prims.cc (_Jv_CreateJavaVM): Call _Jv_platform_initialize. · 73272ce6
      Tom Tromey authored
      	* prims.cc (_Jv_CreateJavaVM): Call _Jv_platform_initialize.
      	* win32.cc (win32_exception_handler): Now static.
      	* include/win32.h (_Jv_platform_initialize): Declare.
      	(win32_exception_handler): Don't declare.
      	* java/lang/natSystem.cc (currentTimeMillis): Use
      	_Jv_platform_gettimeofday.
      	* posix.cc (_Jv_platform_gettimeofday): Renamed.
      	(_Jv_select): Use new name.
      	(_Jv_platform_initialize): New function.
      	* include/posix.h (_Jv_platform_gettimeofday): Renamed from
      	_Jv_gettimeofday.
      	(_Jv_platform_initialize): Declare.
      
      From-SVN: r49583
      73272ce6
  16. Feb 13, 2001
  17. Aug 02, 2000
    • Tom Tromey's avatar
      Makefile.in: Rebuilt. · f536cd95
      Tom Tromey authored
      	* Makefile.in: Rebuilt.
      	* Makefile.am (libgcj_la_SOURCES): Added posix.cc.
      	* java/net/natPlainSocketImpl.cc: Include posix.h.
      	(accept): Use _Jv_select.
      	* java/net/natPlainDatagramSocketImpl.cc: Include posix.h.
      	(receive): Use _Jv_select.
      	* java/io/natFileDescriptorPosix.cc: Include posix.h.
      	(available): Use _Jv_select.
      	* java/lang/natSystem.cc: Include posix.h.
      	(currentTimeMillis): Use _Jv_gettimeofday.
      	* include/posix.h: New file.
      	* posix.cc: New file.
      
      From-SVN: r35435
      f536cd95
Loading