This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[COMMIT] Use AC_CHECK_MEMBERS for stat.st_blocks check
- From: Mark Kettenis <kettenis at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 21 Jan 2005 12:53:57 +0100 (CET)
- Subject: [COMMIT] Use AC_CHECK_MEMBERS for stat.st_blocks check
Simplifies matters quite a bit.
Committed,
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* configure.ac (targ_archs): Use standard autoconf check for
"struct stat.st_blocks" instead of rolling our own.
* configure: Regenerated.
* acconfig.h (HAVE_STRUCT_STAT_ST_BLOCKS): Remove undef.
* config.in: Regenerated.
Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/configure.ac,v
retrieving revision 1.6
diff -u -p -r1.6 configure.ac
--- configure.ac 20 Jan 2005 23:57:22 -0000 1.6
+++ configure.ac 21 Jan 2005 11:51:18 -0000
@@ -420,25 +420,18 @@ AC_CHECK_HEADERS(term.h, [], [],
# unconditionally, so what's the point in checking these?
AC_CHECK_HEADERS(ctype.h time.h)
-dnl Check for struct stat with an st_blocks member
-AC_MSG_CHECKING(for member st_blocks in struct stat)
-AC_CACHE_VAL(gdb_cv_have_struct_stat_with_st_blocks_member,
- [AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/stat.h>],
- [struct stat st; (void) st.st_blocks;],
- gdb_cv_have_struct_stat_with_st_blocks_member=yes,
- gdb_cv_have_struct_stat_with_st_blocks_member=no)])
-AC_MSG_RESULT($gdb_cv_have_struct_stat_with_st_blocks_member)
-if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
- AC_DEFINE(HAVE_STRUCT_STAT_ST_BLOCKS)
-fi
-
# ------------------------- #
# Checks for declarations. #
# ------------------------- #
gcc_AC_CHECK_DECLS(getopt)
+# ----------------------- #
+# Checks for structures. #
+# ----------------------- #
+
+AC_CHECK_MEMBERS([struct stat.st_blocks])
+
# ------------------ #
# Checks for types. #
# ------------------ #
Index: acconfig.h
===================================================================
RCS file: /cvs/src/src/gdb/acconfig.h,v
retrieving revision 1.32
diff -u -p -r1.32 acconfig.h
--- acconfig.h 20 Jan 2005 23:57:27 -0000 1.32
+++ acconfig.h 21 Jan 2005 11:51:18 -0000
@@ -6,9 +6,6 @@
/* Define if your struct reg has r_fs. */
#undef HAVE_STRUCT_REG_R_FS
-/* Define if your struct stat has st_blocks. */
-#undef HAVE_STRUCT_STAT_ST_BLOCKS
-
/* Define if your struct reg has r_gs. */
#undef HAVE_STRUCT_REG_R_GS