www.delorie.com/djgpp/bugs/show.cgi   search  
Bug 000004

When Created: 06/29/1995 12:13:00
Against DJGPP version: 2.00.beta1
By whom: eliz@is.elta.co.il
Abstract: open(..., O_BINARY) doesn't set raw mode on devices
If you call open("con", O_RDONLY | O_BINARY), you don't get raw reads
from the console.  This works in v1.12m4 and also in Borland C.  It
appears that ioctl function 01 isn't called to set raw mode on standard
input device which is open in binary mode.

Note added: 06/29/1995 12:18:37
By whom: eliz@is.elta.co.il
I tested this with the last alpha release, but beta1 doesn't seem
to change anything in the source files involved.

Note added: 06/29/1995 18:40:47
By whom: terra@diku.dk
There's something severely bogus here.  I checked the source and
it turns out that open() calls __file_handle_set() which only
records the status (for cr-lf processing, presumable).  Why doesn't
it call setmode() and why are there two functions whose purpose
I'm not sure I can tell apart?

Workaround added: 07/03/1995 11:27:02
By whom: eliz@is.elta.co.il
The obvious, of course: just call setmode(..., O_BINARY) on the file
handle you get from open().

Fixed in version 2.00.beta2 on 07/08/1995 23:29:10
By whom: dj@delorie.com



  webmaster     delorie software   privacy  
  Copyright © 2010   by DJ Delorie     Updated Jul 2010