From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26842 invoked by alias); 8 Aug 2004 14:00:25 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 26818 invoked from network); 8 Aug 2004 14:00:24 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 8 Aug 2004 14:00:24 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i78E0Je3003737 for ; Sun, 8 Aug 2004 10:00:24 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i78E0Ia30573; Sun, 8 Aug 2004 10:00:18 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 9C0E82B9D; Sun, 8 Aug 2004 10:00:12 -0400 (EDT) Message-ID: <411631EC.8050207@gnu.org> Date: Sun, 08 Aug 2004 14:00:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040801 MIME-Version: 1.0 To: Joel Brobecker Cc: gdb-patches@sources.redhat.com, Andrew Cagney , Peter Schauer , Kevin Buettner Subject: Re: [RFC/AIX] xm-aix4.h - Can we remove NULL re-define? References: <20040808045246.GE24160@gnat.com> In-Reply-To: <20040808045246.GE24160@gnat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00252.txt.bz2 > config/xm-aix4.h contains the following definition: > > | /* Brain death inherited from PC's pervades. */ > | #undef NULL > | #define NULL 0 I'd assume that the PC perversity was along the lines of either: -- NULL not defined -- #define NULL ((void *)0) where PC is AIX running on an i386 (yea, right :-). > Is this still needed? Where does this come from? > > It looks pretty scary that a compiler would actually defined NULL > as being non-zero. I have always heard that NULL is not garantied > to be zero, but I've seen so much code kind of confusing NULL and > zero that I thought nobody in their right mind would actually do > otherwise... > > If still necessary, can this be replaced by something like this in > defs.h? > > #if (NULL != 0) > #undef NULL > #define NULL 0 > #endif So just delete it. Andrew