From: Andrew Cagney <cagney@gnu.org>
To: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: sim/common/callback.c: autoconf tests for struct stat members, more added.
Date: Fri, 03 Dec 2004 18:14:00 -0000 [thread overview]
Message-ID: <41B0AC91.4000209@gnu.org> (raw)
In-Reply-To: <200412021752.iB2Hqppc004660@ignucius.se.axis.com>
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
prev parent reply other threads:[~2004-12-03 18:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-02 17:53 Hans-Peter Nilsson
2004-12-02 18:01 ` Hans-Peter Nilsson
2004-12-03 18:14 ` Andrew Cagney [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41B0AC91.4000209@gnu.org \
--to=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=hans-peter.nilsson@axis.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox