This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Cleanup configure.in (1/n)
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 31 Dec 2002 13:42:06 +0100 (CET)
- Subject: [PATCH] Cleanup configure.in (1/n)
I've started with some serious cleanups of configure.in. I'll try to
do this incrementally, so expect lots of small patches. Here's the
first one.
Checked in.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* gdb_dirent.h: Cleanup and update code to match the example in
the Autoconf manual.
* configure.in: Call AC_HEADER_DIRENT. Remove dirent.h,
sys/ndir.h, sys/dir.h and ndir.h from call to AC_CHECK_HEADERS.
* configure: Regenerated.
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.96
diff -u -p -r1.96 configure.in
--- configure.in 29 Nov 2002 00:29:27 -0000 1.96
+++ configure.in 31 Dec 2002 12:39:08 -0000
@@ -110,6 +110,7 @@ AC_ARG_PROGRAM
AC_TYPE_SIGNAL
+AC_HEADER_DIRENT
AC_HEADER_STDC
dnl Solaris 7 needs _MSE_INT_H defined to avoid a clash between <widec.h>
@@ -126,7 +127,7 @@ AC_CHECK_HEADERS(ctype.h nlist.h link.h
term.h termio.h termios.h unistd.h wait.h sys/wait.h \
wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
time.h sys/file.h sys/ioctl.h sys/user.h sys/fault.h sys/syscall.h \
- dirent.h sys/ndir.h sys/dir.h ndir.h sys/filio.h \
+ sys/filio.h \
curses.h ncurses.h \
poll.h sys/poll.h)
AC_HEADER_STAT
Index: gdb_dirent.h
===================================================================
RCS file: /cvs/src/src/gdb/gdb_dirent.h,v
retrieving revision 1.1
diff -u -p -r1.1 gdb_dirent.h
--- gdb_dirent.h 25 May 2000 06:49:01 -0000 1.1
+++ gdb_dirent.h 31 Dec 2002 12:39:08 -0000
@@ -1,5 +1,5 @@
-/* Portable <dirent.h>
- Copyright 2000 Free Software Foundation, Inc.
+/* Portable <dirent.h>.
+ Copyright 2000, 2002 Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,14 +18,16 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#if !defined(GDB_DIRENT_H)
-#define GDB_DIRENT_H
-
-/* From bfd/hpux-core.c. */
+#ifndef GDB_DIRENT_H
+#define GDB_DIRENT_H 1
+/* See description of `AC_HEADER_DIRENT' in the Autoconf manual. */
#ifdef HAVE_DIRENT_H
# include <dirent.h>
+# define NAMELEN(dirent) strlen((dirent)->d_name)
#else
+# define dirent direct
+# define NAMELEN(dirent) (dirent)->d_namelen
# ifdef HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif
@@ -37,4 +39,4 @@
# endif
#endif
-#endif /* !defined(GDB_DIRENT_H) */
+#endif /* not GDB_DIRENT_H */