+
+#if defined (HAVE_PROC_SELF_EXE)
+ // Compute our executable name
+ sprintf (exec_name, "/proc/%d/exe", getpid ());
+#endif
+}
+
+// Set platform-specific System properties.
+void
+_Jv_platform_initProperties (java::util::Properties* newprops)
+{
+ // A convenience define.
+#define SET(Prop,Val) \
+ newprops->put(JvNewStringLatin1 (Prop), JvNewStringLatin1 (Val))
+
+ SET ("file.separator", "/");
+ SET ("path.separator", ":");
+ SET ("line.separator", "\n");
+ const char *tmpdir = ::getenv("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
+internal_gettimeofday (struct timeval *result)
+{
+#if defined (HAVE_GETTIMEOFDAY)
+ gettimeofday (result, NULL);
+#else
+ jlong val = _Jv_platform_gettimeofday ();
+ result->tv_sec = val / 1000;
+ result->tv_usec = (val % 1000) * 1000;
+#endif /* HAVE_GETTIMEOFDAY */