From 2978b11100a6318e05b8bc2d7923d9f735ef5c6e Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 6 Nov 2013 07:28:57 -0700 Subject: remove gdb_dirent.h This removes gdb_dirent.h and updates the code to use dirent.h instead. It also removes the now-useless configure checks. 2013-11-18 Tom Tromey * common/common.m4 (GDB_AC_COMMON): Don't use AC_HEADER_DIRENT. * common/gdb_dirent.h: Remove. * common/filestuff.c: Use dirent.h. * common/linux-osdata.c: Use dirent.h. (NAMELEN): Define. * config.in: Rebuild. * configure: Rebuild. * configure.ac: Don't use AC_HEADER_DIRENT. * linux-fork.c: Use dirent.h * linux-nat.c: Use dirent.h. * nto-procfs.c: Use dirent.h. * procfs.c: Use dirent.h. 2013-11-18 Tom Tromey * config.in: Rebuild. * configure: Rebuild. * configure.ac: Don't use AC_HEADER_DIRENT. --- gdb/common/common.m4 | 1 - gdb/common/filestuff.c | 2 +- gdb/common/gdb_dirent.h | 40 ---------------------------------------- gdb/common/linux-osdata.c | 4 +++- 4 files changed, 4 insertions(+), 43 deletions(-) delete mode 100644 gdb/common/gdb_dirent.h (limited to 'gdb/common') diff --git a/gdb/common/common.m4 b/gdb/common/common.m4 index b1abc4d..29debd1 100644 --- a/gdb/common/common.m4 +++ b/gdb/common/common.m4 @@ -19,7 +19,6 @@ dnl along with this program. If not, see . dnl Invoke configury needed by the files in 'common'. AC_DEFUN([GDB_AC_COMMON], [ AC_HEADER_STDC - AC_HEADER_DIRENT AC_FUNC_ALLOCA dnl Note that this requires codeset.m4, which is included diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c index ff6d54f..bbb60a7 100644 --- a/gdb/common/filestuff.c +++ b/gdb/common/filestuff.c @@ -58,7 +58,7 @@ #ifndef HAVE_FDWALK -#include "gdb_dirent.h" +#include /* Replacement for fdwalk, if the system doesn't define it. Walks all open file descriptors (though this implementation may walk closed diff --git a/gdb/common/gdb_dirent.h b/gdb/common/gdb_dirent.h deleted file mode 100644 index f86f128..0000000 --- a/gdb/common/gdb_dirent.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Portable . - Copyright (C) 2000-2013 Free Software Foundation, Inc. - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef GDB_DIRENT_H -#define GDB_DIRENT_H 1 - -/* See description of `AC_HEADER_DIRENT' in the Autoconf manual. */ -#ifdef HAVE_DIRENT_H -# include /* ARI: dirent.h */ -# define NAMELEN(dirent) strlen ((dirent)->d_name) /* ARI: strlen d_name */ -#else -# define dirent direct -# define NAMELEN(dirent) (dirent)->d_namelen /* ARI: d_namelen */ -# ifdef HAVE_SYS_NDIR_H -# include -# endif -# ifdef HAVE_SYS_DIR_H -# include -# endif -# ifdef HAVE_NDIR_H -# include -# endif -#endif - -#endif /* not GDB_DIRENT_H */ diff --git a/gdb/common/linux-osdata.c b/gdb/common/linux-osdata.c index 37a31f2..0ff10c6 100644 --- a/gdb/common/linux-osdata.c +++ b/gdb/common/linux-osdata.c @@ -42,10 +42,12 @@ #include "xml-utils.h" #include "buffer.h" #include "gdb_assert.h" -#include "gdb_dirent.h" +#include #include "gdb_stat.h" #include "filestuff.h" +#define NAMELEN(dirent) strlen ((dirent)->d_name) + /* Define PID_T to be a fixed size that is at least as large as pid_t, so that reading pid values embedded in /proc works consistently. */ -- cgit v1.1