2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / libjava / gnu / java / nio / natPipeImplWin32.cc
blob4f48972e5bc7b77c14e160c059391d4a2cd8a1f4
1 // natPipeImplWin32.cc
3 /* Copyright (C) 2003 Free Software Foundation
5 This file is part of libgcj.
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
9 details. */
11 #include <config.h>
12 #include <platform.h>
14 #include <errno.h>
15 #include <string.h>
16 #include <unistd.h>
18 #include <gnu/java/nio/PipeImpl.h>
19 //#include <gnu/java/nio/PipeImpl$SinkChannelImpl.h>
20 //#include <gnu/java/nio/PipeImpl$SourceChannelImpl.h>
21 #include <java/io/IOException.h>
22 #include <java/nio/channels/spi/SelectorProvider.h>
24 void
25 gnu::java::nio::PipeImpl::nativeInit (::java::nio::channels::spi::SelectorProvider* /*provider*/)
27 int filedes [2];
29 if (_Jv_pipe (filedes) < 0)
30 throw new ::java::io::IOException (JvNewStringUTF (strerror (errno)));
32 /* FIXME
33 source = new gnu::java::nio::PipeImpl$SourceChannelImpl
34 (this, provider, filedes [0]);
35 sink = new gnu::java::nio::PipeImpl$SinkChannelImpl
36 (this, provider, filedes [1]);