From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12186 invoked by alias); 3 Dec 2004 18:14:06 -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 11876 invoked from network); 3 Dec 2004 18:13:59 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 3 Dec 2004 18:13:59 -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.11) with ESMTP id iB3IDrBq013336 for ; Fri, 3 Dec 2004 13:13:54 -0500 Received: from localhost.redhat.com (vpn50-46.rdu.redhat.com [172.16.50.46]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id iB3IDrr20174; Fri, 3 Dec 2004 13:13:53 -0500 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 8DD1D969F2; Fri, 3 Dec 2004 13:12:36 -0500 (EST) Message-ID: <41B0AC91.4000209@gnu.org> Date: Fri, 03 Dec 2004 18:14:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: Hans-Peter Nilsson Cc: gdb-patches@sources.redhat.com Subject: Re: sim/common/callback.c: autoconf tests for struct stat members, more added. References: <200412021752.iB2Hqppc004660@ignucius.se.axis.com> In-Reply-To: <200412021752.iB2Hqppc004660@ignucius.se.axis.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-12/txt/msg00071.txt.bz2 Hans-Peter Nilsson wrote: > I have a need for more of the GNU/Linux struct stat members. At > the same time, it looked like adding them would plausibly break > some non-GNU/Linux hosts, which I guess is the reason there were > only two st_ino and st_dev present in cb_host_to_target_stat. > All would have been *much* simpler if sim/common used a modern > autoconf (with AC_CHECK_MEMBERS), because then I wouldn't have > to translate that macro into something that works with > autoconf-2.13. Pain. :-( Arguably some st_* members possibly > don't translate very well to a simulated environment, but that's > up to the user of the simulator to decide. Regrettably, I did > not find a way to make the cb_host_to_target_stat more agreeable > to the eye. Tested by observing that a few more of my C-based > simulator tests (developed without the st_* #ifdefs) now pass, > and testing that configuring a non-present struct stat member > works. > > Ok to commit? > > sim/common: > * configure.in (SIM_CHECK_MEMBERS): Call for struct stat members > st_dev, st_ino, st_mode, st_nlink, st_uid, st_gid, st_rdev, > st_size, st_blksize, st_blocks, st_atime, st_mtime and st_ctime. > * aclocal.m4 (SIM_CHECK_MEMBER, SIM_CHECK_MEMBERS_1) > (SIM_CHECK_MEMBERS): New macros. > * callback.c (cb_host_to_target_stat): Use temporary macro ST_x > for struct stat member test and write. Add ST_x calls for each > struct stat member tested in configure.in. Wrap each ST_x call in > #ifdef of configure macro for that member. > * configure, config.in: Regenerate. Sure! Thanks. Andrew