+extern void _Jv_platform_initProperties (java::util::Properties*);
+
+inline void
+_Jv_platform_close_on_exec (jint fd)
+{
+ // Ignore errors.
+ ::fcntl (fd, F_SETFD, FD_CLOEXEC);
+}
+
+#undef fcntl
+
+#ifdef JV_HASH_SYNCHRONIZATION
+#ifndef HAVE_USLEEP_DECL
+extern "C" int usleep (useconds_t useconds);
+#endif /* not HAVE_USLEEP_DECL */
+
+inline void
+_Jv_platform_usleep (unsigned long usecs)
+{
+ usleep (usecs);
+}
+#endif /* JV_HASH_SYNCHRONIZATION */
+
+#ifndef DISABLE_JAVA_NET
+
+#ifndef HAVE_SOCKLEN_T
+#define socklen_t int
+#endif
+
+static inline int
+_Jv_socket (int domain, int type, int protocol)
+{
+ return ::socket (domain, type, protocol);
+}
+
+#undef socket
+
+inline int
+_Jv_connect (jint fd, sockaddr *ptr, int len)
+{
+ return ::connect (fd, ptr, len);
+}
+
+#undef connect
+
+inline int
+_Jv_close (jint fd)
+{
+ return ::close (fd);
+}
+
+#undef close
+
+// Avoid macro definitions of bind from system headers, e.g. on
+// Solaris 7 with _XOPEN_SOURCE. FIXME
+inline int
+_Jv_bind (int fd, struct sockaddr *addr, int addrlen)
+{
+ return ::bind (fd, addr, addrlen);
+}
+
+#undef bind
+
+// Same problem with accept on Tru64 UNIX with _POSIX_PII_SOCKET
+inline int
+_Jv_accept (int fd, struct sockaddr *addr, socklen_t *addrlen)
+{
+ return ::accept (fd, addr, addrlen);
+}
+
+#undef accept
+
+inline int
+_Jv_listen (int fd, int backlog)
+{
+ return ::listen (fd, backlog);
+}
+
+#undef listen
+
+inline int
+_Jv_write(int s, void *buf, int len)
+{
+ return ::write (s, buf, len);
+}
+
+#undef write
+
+inline int
+_Jv_read(int s, void *buf, int len)
+{
+ return ::read (s, buf, len);
+}
+
+#undef read
+
+#endif /* DISABLE_JAVA_NET */
+
+// Wraps ::pipe
+static inline int
+_Jv_pipe (int filedes[2])
+{
+ return ::pipe (filedes);
+}
+
+#endif /* __JV_POSIX_H__ */