From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22171 invoked by alias); 14 Feb 2007 12:36:26 -0000 Received: (qmail 22161 invoked by uid 22791); 14 Feb 2007 12:36:24 -0000 X-Spam-Check-By: sourceware.org Received: from kz-easy.com (HELO almaty.kz-easy.com) (85.214.25.173) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 14 Feb 2007 12:36:17 +0000 Received: from alatau.radix50.net (dslb-088-064-017-148.pools.arcor-ip.net [88.64.17.148]) (authenticated bits=0) by almaty.kz-easy.com (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id l1ECZxEi006222 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 14 Feb 2007 13:36:01 +0100 Received: from alatau.radix50.net (localhost [127.0.0.1]) by alatau.radix50.net (8.13.8/8.13.8/Debian-2) with ESMTP id l1ECZw7h020500 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 14 Feb 2007 13:35:58 +0100 Received: (from ibr@localhost) by alatau.radix50.net (8.13.8/8.13.8/Submit) id l1ECZw7r020499 for gdb@sourceware.org; Wed, 14 Feb 2007 13:35:58 +0100 Date: Wed, 14 Feb 2007 13:25:00 -0000 From: Baurzhan Ismagulov To: gdb@sourceware.org Subject: build problem in tcl/compat/strstr.c Message-ID: <20070214123558.GD10538@radix50.net> Mail-Followup-To: gdb@sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-02/txt/msg00116.txt.bz2 Hello all, I'm building the current HEAD for --host arm-linux --target arm-linux on an i686-linux build. tcl/compat/strstr.c references NULL, but doesn't include anything. So the compilation fails for me. The file gets included in the compilation since tcl/unix/configure apparently tries to run a test, which fails since I cross-build, and concludes that strstr is broken. I've seen other packages recommending hard-coding stuff in cache files for cross-compilation; I don't know whether we do this for gdb. I don't mind having gdb's own strstr implementation compiled in, so I did the hack below. An alternative were to check for stddef.h and include it, otherwise defining NULL ourselves (I guess we shouldn't include string.h since it could have a different prototype, which would produce a warning). How should we proceed? With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.com/ --- src.orig/tcl/compat/strstr.c 2003-01-21 20:39:57.000000000 +0100 +++ src/tcl/compat/strstr.c 2007-02-14 13:09:23.000000000 +0100 @@ -64,5 +64,5 @@ strstr(string, substring) } b = substring; } - return NULL; + return (void *)0; } 2007-02-14 Baurzhan Ismagulov * tcl/compat/strstr.c (strstr): Return (void *)0 instead of NULL.