* win32.cc: (_Jv_pipe) Implemented.
* gnu/java/nio/natPipeImpl.cc: (nativeInit) Use
_Jv_pipe instead of ::pipe.
* include/posix.h: (_Jv_pipe) New inline.
* include/win32.h: (_Jv_pipe) New declaration.
From-SVN: r72616
+2003-10-17 Mohan Embar <gnustuff@thisiscool.com>
+
+ * win32.cc (_Jv_pipe): Implemented.
+ * gnu/java/nio/natPipeImpl.cc (nativeInit): Use
+ _Jv_pipe instead of ::pipe.
+ * include/posix.h (_Jv_pipe): New inline.
+ * include/win32.h (_Jv_pipe): New declaration.
+
2003-10-17 Ralph Loader <rcl@ihug.co.nz>
* java/lang/StringBuffer.java (getChars): Fix array index checks.
{
int filedes [2];
- if (::pipe (filedes) < 0)
+ if (_Jv_pipe (filedes) < 0)
throw new ::java::io::IOException (JvNewStringUTF (strerror (errno)));
/* FIXME
#endif /* DISABLE_JAVA_NET */
+// Wraps ::pipe
+static inline int
+_Jv_pipe (int filedes[2])
+{
+ return ::pipe (filedes);
+}
+
#endif /* __JV_POSIX_H__ */
extern void _Jv_platform_initProperties (java::util::Properties*);
extern jlong _Jv_platform_gettimeofday ();
extern int _Jv_select (int n, fd_set *, fd_set *, fd_set *, struct timeval *);
+extern int _Jv_pipe (int filedes[2]);
inline void
_Jv_platform_close_on_exec (jint)
#include <platform.h>
#include <sys/timeb.h>
#include <stdlib.h>
+#include <fcntl.h>
#include <java/lang/ArithmeticException.h>
#include <java/lang/UnsupportedOperationException.h>
}
return r;
}
+
+int
+_Jv_pipe (int filedes[2])
+{
+ return _pipe (filedes, 4096, _O_BINARY);
+}