|
From: Danny S. <dan...@cl...> - 2002-10-02 22:31:58
|
----- Original Message ----- From: "Veldkamp, Michiel" <mic...@at...> To: "'min...@li...'" <min...@li...> Sent: Wednesday, 2 October 2002 17:33 Subject: Re: [Mingw-users] Initializing _fmode > "Earnie Boyd" wrote: > > > What happens with `unsigned int _fmode = _O_BINARY;'? > > It builds, but has no effect. It seems as if a new > variable is created. > Two points: 1) according to MSDN docs http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/h tml/_crt__fmode.asp _fmode is declared as int , not unsigned it is declared in stdlib.h, not fcntl.h 2) The _CRT_fmode mechanism in place in current mingw does a bit more than what Michiel's example would do: It also changes mode of stdin, stderr, and stdout. It is possible to have the _fmode/binmode.o mechanism working as per MSDN docs (set mode of everyhing except std file handles) as well as the mingw specific _CRT_fmode mechanism. Is that desirable? Danny Danny |