From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4638 invoked by alias); 24 Sep 2004 18:11:17 -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 4509 invoked from network); 24 Sep 2004 18:11:16 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 24 Sep 2004 18:11:16 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i8OIBE01020120; Fri, 24 Sep 2004 14:11:15 -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 i8OIBEr18045; Fri, 24 Sep 2004 14:11:14 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id A29F428D2; Fri, 24 Sep 2004 14:08:57 -0400 (EDT) Message-ID: <415462B9.1000906@gnu.org> Date: Fri, 24 Sep 2004 18:11:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040831 MIME-Version: 1.0 To: Ian Lance Taylor Cc: gdb-patches@sourceware.org Subject: Re: PATCH RFA: Handle lack of struct statfs in ppc/sim/emul_netbsd.c References: <20040921022638.24707.qmail@gossamer.airs.com> In-Reply-To: <20040921022638.24707.qmail@gossamer.airs.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-09/txt/msg00407.txt.bz2 > NetBSD post 2.0 has deprecated statfs in favor of statvfs. The statfs > system call still exists for compatibility purposes (if COMPAT_20), > but struct statfs has been removed from the header files. > > This breaks the PowerPC simulator, which assumes that the existence of > the statfs function implies the existence of struct statfs. > > This patch fixes this problem in the obvious way. > > I'm not sure why the NetBSD emulation implements fstatfs(). With this > patch, it will stop doing so. If implementing fstatfs() is important, > somebody will have to add support for the new fstatvfs() system call. GCC, or similar, in the very distant past must have needed it. > OK for mainline? I've checked it in (well will, once my build comes back). thanks, Andrew > Ian > > * configure.in: Check for sys/mount.h, sys/vfs.h, sys/statfs.h. > Check for struct statfs. > * emul_netbsd.c: If not HAVE_STRUCT_STATFS, #undef HAVE_FSTATFS. > * configure, config.in: Regenerate.