Subject: Re: fopen() bug
From: [email-masked] (Dan Olson)

18 Nov 1998 03:45:47 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
To: <[email-masked]>

>Stephen Whiteley <[email-masked]> 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.

Not that this matters if you are trying to handle things like Linux, but I
seem to remember that on SunOS 4.1.x, fopen("", "r") opened the current
directory.  Does anybody remember that?  Is that a BSD behaviour?
--
[email-masked]

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".