From: jqb AT netcom DOT com (Jim Balter) Subject: Re: Resetting options on STDIN/STDOUT 6 Nov 1996 17:24:41 -0800 Sender: daemon AT cygnus DOT com Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199611070058.QAA17321.cygnus.gnu-win32@netcom23.netcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Original-To: jeremy AT datachannel DOT com (Jeremy Blackman) Original-Cc: gnu-win32 AT cygnus DOT com In-Reply-To: <328112A8.1F86@datachannel.com> from "Jeremy Blackman" at Nov 6, 96 02:35:20 pm X-Mailer: ELM [version 2.4 PL23] Content-Length: 596 Original-Sender: owner-gnu-win32 AT cygnus DOT com Jeremy Blackman wrote: > > Is there a way to set stdin and stdout into binary mode under gnu-win32, > cleanly? Some code I am attempting to port simply does an > fdopen(0,"rb"); fdopen(1,"wb"); which works fine under Linux, or BSD, > but ends up with no output when compiled with gnu-win32 and then run. > > Suggestions? I've tried several hacks around this already. The code > requires that stdout and stdin be in binary mode and also be actually > stdout and stdin - the program runs as a cgi script. _setmode(fileno(stdin), O_BINARY); _setmode(fileno(stdout), O_BINARY); -- - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".