From: colin@fu.is.saga-u.ac.jp (Colin Peters)
Subject: RE: Converting WIN32 HANDLE's to integer file descriptors
19 Jun 1998 03:21:25 -0700
Message-ID: <002d01bd9b22$624c41c0$fa173185.cygnus.gnu-win32@gbird0.fu.is.saga-u.ac.jp>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
To: "Craig Setera" <setera@us.ibm.com>
Cc: "GNU-Win32" <gnu-win32@cygnus.com>


Craig Setera <setera@us.ibm.com> wrote:

>Is there a way to take the HANDLE structure returned by named
>pipe creation and convert that handle to an integer file descriptor
>for use by read() and write()?


Under Mingw32 (using MS's C run time library) you can use _open_osfhandle to
do this (I think). Since, under it all, newlib is probably using Win32
handles to access files it should be possible to write the equivalent
function for newlib, though it might require a fair bit of work (and the
ability to recompile newlib from source).

Colin.

-- Colin Peters - colin at fu.is.saga-u.ac.jp
-- Saga Univ. Dept. of Information Science
-- http://www.geocities.com/Tokyo/Towers/6162/index.html
-- http://www.fu.is.saga-u.ac.jp/~colin/index.html


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
