diff options
author | Tom Tromey <tromey@redhat.com> | 2013-11-06 07:28:57 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-11-18 13:29:01 -0700 |
commit | 2978b11100a6318e05b8bc2d7923d9f735ef5c6e (patch) | |
tree | 512725acc4ebc8bfc389d3b44c52aaea6f7c377f /gdb/common | |
parent | e26b6bb047e55e8c1465691886ee21117394b7a6 (diff) | |
download | gdb-2978b11100a6318e05b8bc2d7923d9f735ef5c6e.zip gdb-2978b11100a6318e05b8bc2d7923d9f735ef5c6e.tar.gz gdb-2978b11100a6318e05b8bc2d7923d9f735ef5c6e.tar.bz2 |
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 <tromey@redhat.com>
* 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 <tromey@redhat.com>
* config.in: Rebuild.
* configure: Rebuild.
* configure.ac: Don't use AC_HEADER_DIRENT.
Diffstat (limited to 'gdb/common')
-rw-r--r-- | gdb/common/common.m4 | 1 | ||||
-rw-r--r-- | gdb/common/filestuff.c | 2 | ||||
-rw-r--r-- | gdb/common/gdb_dirent.h | 40 | ||||
-rw-r--r-- | gdb/common/linux-osdata.c | 4 |
4 files changed, 4 insertions, 43 deletions
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 <http://www.gnu.org/licenses/>. 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 <dirent.h> /* 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 <dirent.h>. - 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 <http://www.gnu.org/licenses/>. */ - -#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> /* 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 <sys/ndir.h> -# endif -# ifdef HAVE_SYS_DIR_H -# include <sys/dir.h> -# endif -# ifdef HAVE_NDIR_H -# include <ndir.h> -# 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 <dirent.h> #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. */ |