From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To: "Frank Ch. Eigler" <fche@redhat.com>, Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sources.redhat.com, bonzini@gnu.org
Subject: fixup SIM_CHECK_* (was: [PATCH 3/N] some minor fixes in sim, gold, gdb)
Date: Tue, 25 Aug 2009 20:05:00 -0000 [thread overview]
Message-ID: <20090825195545.GC5034@gmx.de> (raw)
In-Reply-To: <y0md46rfvhu.fsf@fche.csb>
* Frank Ch. Eigler wrote on Wed, Aug 19, 2009 at 09:34:37PM CEST:
> According to the FIXME note in that file, please excise SIM_CHECK_*
> altogether if it has been mooted by a modern autoconf.
This was still left TODO. Of course, I managed to actually commit a
patch, that would not expand AC_CHECK_MEMBERS correctly, as that uses
_$0_BODY internally, and $0 is still SIM_CHECK_MEMBER (Paolo, it's ugly
to have to remember this, so we maybe shouldn't use m4_defn so much):
ac_fn_c_check_member ()
{
_SIM_CHECK_MEMBER_BODY
}
So I propose to fix this in two steps, first fixing up my blunder, for
documentation purposes, then removing SIM_CHECK_MEMBER*.
I've (hopefully) managed to test this a bit better now, at least the
generated sim/common/cconfig.h file looks sane to me now.
OK to commit both?
Thanks, and sorry for the blunder,
Ralf
Fix SIM_CHECK_MEMBER definition with Autoconf 2.64.
sim/common/ChangeLog:
2009-08-25 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* aclocal.m4 (_SIM_CHECK_MEMBER_BODY): New define.
* configure: Regenerate.
diff --git a/sim/common/aclocal.m4 b/sim/common/aclocal.m4
index 24b1aa2..80d3b4b 100644
--- a/sim/common/aclocal.m4
+++ b/sim/common/aclocal.m4
@@ -946,6 +946,7 @@ dnl ---------------------------------------------------------
dnl AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell
dnl variables are not a valid argument.
AC_DEFUN([SIM_CHECK_MEMBER], defn([AC_CHECK_MEMBER]))
+AC_DEFUN([_SIM_CHECK_MEMBER_BODY], defn([_AC_CHECK_MEMBER_BODY]))
dnl
dnl Translated from a FC2 autoconf-2.59-3 installation.
dnl SIM_CHECK_MEMBERS([AGGREGATE.MEMBER, ...])
Remove SIM_CHECK_MEMBER*.
sim/common/ChangeLog:
2009-08-25 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* aclocal.m4 (SIM_CHECK_MEMBER, SIM_CHECK_MEMBERS)
(SIM_CHECK_MEMBERS_1, _SIM_CHECK_MEMBER_BODY): Remove.
* configure.ac: Replace SIM_CHECK_MEMBERS call with equivalent
AC_CHECK_MEMBERS one.
* configure: Regenerate.
diff --git a/sim/common/aclocal.m4 b/sim/common/aclocal.m4
index 80d3b4b..7beaebd 100644
--- a/sim/common/aclocal.m4
+++ b/sim/common/aclocal.m4
@@ -933,51 +933,3 @@ AC_SUBST(CGEN_MAINT)
AC_SUBST(cgendir)
AC_SUBST(cgen)
])
-dnl FIXME: When upgrading to modern autoconf, remove
-dnl SIM_CHECK_MEMBER and SIM_CHECK_MEMBERS et al and use
-dnl AC_CHECK_MEMBERS from autoconf.
-dnl
-dnl Translated from a FC2 autoconf-2.59-3 installation.
-dnl AC_CHECK_MEMBER(AGGREGATE.MEMBER,
-dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-dnl [INCLUDES])
-dnl
-dnl ---------------------------------------------------------
-dnl AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell
-dnl variables are not a valid argument.
-AC_DEFUN([SIM_CHECK_MEMBER], defn([AC_CHECK_MEMBER]))
-AC_DEFUN([_SIM_CHECK_MEMBER_BODY], defn([_AC_CHECK_MEMBER_BODY]))
-dnl
-dnl Translated from a FC2 autoconf-2.59-3 installation.
-dnl SIM_CHECK_MEMBERS([AGGREGATE.MEMBER, ...])
-dnl except we just work with a limited set of fixed includes.
-dnl
-AC_DEFUN([SIM_CHECK_MEMBERS_1],
-[ifelse($#, 1,
-[SIM_CHECK_MEMBER([$1],
-AC_DEFINE_UNQUOTED([HAVE_]translit([$1], [a-z .], [A-Z__]), 1,
-[Define to 1 if ]patsubst([$1],
-[^[^.]*\.])[ is a member of ]patsubst([$1], [\..*])[. ]),,
-[#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif])],
-[SIM_CHECK_MEMBER([$1],
-AC_DEFINE_UNQUOTED([HAVE_]translit([$1], [a-z .], [A-Z__]), 1,
-[Define to 1 if ]patsubst([$1],
-[^[^.]*\.])[ is a member of ]patsubst([$1], [\..*])[. ]),,
-[#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif])
-SIM_CHECK_MEMBERS_1(builtin(shift,$@))])])dnl SIM_CHECK_MEMBERS
-dnl
-AC_DEFUN([SIM_CHECK_MEMBERS],
-[ifelse($#, 1, [SIM_CHECK_MEMBERS_1($1)],
-[errprint(__file__:__line__:
-[This SIM_CHECK_MEMBERS only supports one argument,]
-[the list of struct tests])])])dnl SIM_CHECK_MEMBERS
diff --git a/sim/common/configure.ac b/sim/common/configure.ac
index 5516d9e..5f5845a 100644
--- a/sim/common/configure.ac
+++ b/sim/common/configure.ac
@@ -38,10 +38,16 @@ AC_SUBST(TARGET_SUBDIR)
# These aren't all needed yet, but will be eventually.
AC_CHECK_HEADERS(stdlib.h string.h strings.h time.h sys/times.h sys/stat.h sys/mman.h)
AC_CHECK_FUNCS(mmap munmap lstat truncate ftruncate)
-SIM_CHECK_MEMBERS([[struct stat.st_dev], [struct stat.st_ino],
+AC_CHECK_MEMBERS([[struct stat.st_dev], [struct stat.st_ino],
[struct stat.st_mode], [struct stat.st_nlink], [struct stat.st_uid],
[struct stat.st_gid], [struct stat.st_rdev], [struct stat.st_size],
[struct stat.st_blksize], [struct stat.st_blocks], [struct stat.st_atime],
-[struct stat.st_mtime], [struct stat.st_ctime]])
+[struct stat.st_mtime], [struct stat.st_ctime]], [], [],
+[[#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif]])
AC_OUTPUT(Makefile,
[case x$CONFIG_HEADERS in xcconfig.h:config.in) echo > stamp-h ;; esac])
next prev parent reply other threads:[~2009-08-25 19:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090815112928.GB5396@gmx.de>
[not found] ` <20090815113302.GC20172@gmx.de>
2009-08-18 18:56 ` [PATCH 3/N] some minor fixes in sim, gold, gdb Ralf Wildenhues
2009-08-19 18:43 ` Tom Tromey
2009-08-19 19:34 ` Ralf Wildenhues
2009-08-19 21:57 ` Frank Ch. Eigler
2009-08-22 17:35 ` Ralf Wildenhues
2009-08-25 20:05 ` Ralf Wildenhues [this message]
2009-08-26 12:04 ` fixup SIM_CHECK_* Paolo Bonzini
2009-08-26 20:08 ` Ralf Wildenhues
[not found] ` <alpine.LSU.1.99.0908151331010.19553@acrux.dbai.tuwien.ac.at>
[not found] ` <20090816094922.GB25721@gmx.de>
[not found] ` <83ocqfitb3.fsf@gnu.org>
2009-08-25 19:55 ` Do not point to sources.redhat.com for autotools tarballs Ralf Wildenhues
2009-08-25 20:57 ` Eli Zaretskii
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=20090825195545.GC5034@gmx.de \
--to=ralf.wildenhues@gmx.de \
--cc=bonzini@gnu.org \
--cc=fche@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=tromey@redhat.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