delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/11/17/00:20:34

From: khan AT xraylith DOT wisc DOT edu (Mumit Khan)
Subject: Re: fopen() bug
17 Nov 1998 00:20:34 -0800 :
Message-ID: <9811170719.AA26054.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <199811161647 DOT IAA27163 AT shell7 DOT ba DOT best DOT com>
To: Stephen Whiteley <stevew AT best DOT com>
Cc: gnu-win32 AT cygnus DOT com

Stephen Whiteley <stevew AT best DOT com> writes:
> 
> fopen(0, "r") maybe should fault, since that seems to be a common
> result under UNIX.  Otherwise, porting from Cygnus -> UNIX might break
> someone's (buggy) application.

Actually, it's undefined behaviour, and various Unix implementations 
deal with it in different ways (eg., Linux, HPUX, AIX, etc handle
these cases and set errno appropriately). Cygwin b20.1 will handle
it like Linux. 

Regards,
Mumit

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

- Raw text -


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