re PR libgcj/31228 (Race condition between setting close-on-exec and Runtime.exec())
[gcc.git] / libjava / include / posix.h
index 63fc135d4d8ea15f267832f8c6882a0e87e1f2a1..5f522a3804aff679fe521598cfc90444e22e1281 100644 (file)
@@ -37,6 +37,12 @@ details.  */
 
 #include <fcntl.h>
 
+/* The header file <sys/rw_lock.h> needs to be included before javaprims.h
+   on HP-UX 11 to avoid a compilation error.  */
+#ifdef HAVE_SYS_RW_LOCK_H
+#include <sys/rw_lock.h>
+#endif
+
 #include <gcj/cni.h>
 #include <java/util/Properties.h>
 
@@ -63,6 +69,13 @@ details.  */
 #define O_DSYNC O_SYNC
 #endif
 
+// Name of the Process implementation.
+#ifdef ECOS
+#define _Jv_platform_process ::java::lang::EcosProcess
+#else
+#define _Jv_platform_process ::java::lang::PosixProcess
+#endif
+
 // Separator for file name components.
 #define _Jv_platform_file_separator ((jchar) '/')
 // Separator for path components.
@@ -85,15 +98,6 @@ extern jlong _Jv_platform_nanotime ();
 extern void _Jv_platform_initialize (void);
 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);
@@ -188,4 +192,11 @@ _Jv_pipe (int filedes[2])
   return ::pipe (filedes);
 }
 
+// Forward declaration.  See java-stack.h for definition.
+struct _Jv_AddrInfo;
+
+// Given an address, determine the executable or shared object that defines
+// it and the nearest named symbol.
+extern int _Jv_platform_dladdr (void *addr, _Jv_AddrInfo *info);
+
 #endif /* __JV_POSIX_H__ */