Subject: RE: Converting WIN32 HANDLE's to integer file descriptors
From: [email-masked] (Colin Peters)

19 Jun 1998 03:21:25 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
To: "Craig Setera" <[email-masked]>
Cc: "GNU-Win32" <[email-masked]>

Craig Setera <[email-masked]> 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
"[email-masked]" with one line of text: "help".