OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add default handling for outermost wrappers in voidify_wrapper_expr.
[pf3gnuchains/gcc-fork.git]
/
libjava
/
posix.cc
diff --git
a/libjava/posix.cc
b/libjava/posix.cc
index
41702df
..
5d64094
100644
(file)
--- a/
libjava/posix.cc
+++ b/
libjava/posix.cc
@@
-87,12
+87,20
@@
_Jv_platform_nanotime ()
if (clock_gettime (id, &now) == 0)
{
jlong result = (jlong) now.tv_sec;
if (clock_gettime (id, &now) == 0)
{
jlong result = (jlong) now.tv_sec;
- result = result * 1000
* 1000
+ now.tv_nsec;
+ result = result * 1000
000000LL
+ now.tv_nsec;
return result;
}
// clock_gettime failed, but we can fall through.
#endif // HAVE_CLOCK_GETTIME
return result;
}
// clock_gettime failed, but we can fall through.
#endif // HAVE_CLOCK_GETTIME
- return _Jv_platform_gettimeofday () * 1000LL;
+#if defined (HAVE_GETTIMEOFDAY)
+ {
+ timeval tv;
+ gettimeofday (&tv, NULL);
+ return (tv.tv_sec * 1000000000LL) + tv.tv_usec * 1000LL;
+ }
+#else
+ return _Jv_platform_gettimeofday () * 1000000LL;
+#endif
}
// Platform-specific VM initialization.
}
// Platform-specific VM initialization.
@@
-131,6
+139,10
@@
_Jv_platform_initProperties (java::util::Properties* newprops)
if (! tmpdir)
tmpdir = "/tmp";
SET ("java.io.tmpdir", tmpdir);
if (! tmpdir)
tmpdir = "/tmp";
SET ("java.io.tmpdir", tmpdir);
+ const char *zoneinfodir = ::getenv("TZDATA");
+ if (! zoneinfodir)
+ zoneinfodir = "/usr/share/zoneinfo";
+ SET ("gnu.java.util.zoneinfo.dir", zoneinfodir);
}
static inline void
}
static inline void
@@
-213,7
+225,7
@@
_Jv_select (int n, fd_set *readfds, fd_set *writefds,
// defined symbol to that address. Returns 0 if no object defines this
// address.
int
// defined symbol to that address. Returns 0 if no object defines this
// address.
int
-_Jv_platform_dladdr (
const
void *addr, _Jv_AddrInfo *info)
+_Jv_platform_dladdr (void *addr, _Jv_AddrInfo *info)
{
int ret_val = 0;
{
int ret_val = 0;