Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!gatech!bloom-beacon!husc6!cmcl2!brl-adm!brl-smoke!gwyn
From: gwyn@brl-smoke.ARPA (Doug Gwyn )
Newsgroups: comp.lang.c
Subject: Re: Distinguished pointers (was Re: Weird syscall returns)
Message-ID: <6129@brl-smoke.ARPA>
Date: Thu, 16-Jul-87 15:15:09 EDT
Article-I.D.: brl-smok.6129
Posted: Thu Jul 16 15:15:09 1987
Date-Received: Sat, 18-Jul-87 08:19:37 EDT
References: <1158@copper.TEK.COM> <6858@auspyr.UUCP>
Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) )
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 14

In article <846@bsu-cs.UUCP> dhesi@bsu-cs.UUCP (Rahul Dhesi) writes:
>We already have a (char *) -1; let's just give it a different name and keep it.

You missed my point entirely!  "(char *)-1" is MEANINGLESS in some C
implementations and CANNOT be returned as a function value.  Sure, using
symbolic names such as SIG_ERR is helpful, since that permits all
implementations to provide a meaningful definition.  However, my specific
recommendation that routines such as sbrk() be changed to return NULL
((char *)0) instead of (char *)-1 is based on there being just one
"failed" value, along with the desire to be able to "phase in" the new
semantics.  If you really want to have to test for multiple failure modes
every time you use such a function, more power to you, but PLEASE do not
attempt to dictate the numeric values for pointers -- use symbolic names
in the specification.