From owner-freebsd-sparc64@FreeBSD.ORG Mon Oct 27 05:49:54 2003 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1172416A4B3; Mon, 27 Oct 2003 05:49:54 -0800 (PST) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FA9543FBF; Mon, 27 Oct 2003 05:49:52 -0800 (PST) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle (beagle [193.175.132.100])h9RDnpP13160; Mon, 27 Oct 2003 14:49:51 +0100 (MET) Date: Mon, 27 Oct 2003 14:49:51 +0100 (CET) From: Harti Brandt To: sparc64@freebsd.org, standards@freebsd.org Message-ID: <20031027144140.V63585@beagle.fokus.fraunhofer.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: 64bit NULL? X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2003 13:49:54 -0000 Hi all, a question came up wether the NULL should be defined as (0L) on sparc. (Solaris does this). Currently we define NULL as 0. This may cause problems for function with variable argument lists that expect a terminating NULL pointer. A prominent example is execl(). Although POSIX (and our man page) gives the synopsis execl(...., (char *)0) our man pages says that the list must be terminated by a NULL pointer, POSIX speaks 'null pointer'. According to ISO-C NULL is a symbol that defines a null pointer so that: execl(..., NULL) appears to be legal, yet will probably cause failure on FreeBSD-sparc64. Shouldn't we change our NULL definition to #define NULL (0L) ? What would break by this change? Regards, harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org