Replace <sys/dir.h> (and <dirent.h>) with "gdb_dirent.h".

This commit is contained in:
Andrew Cagney 2000-05-25 06:49:01 +00:00
parent 944d780c6e
commit 4b14d3e4e0
8 changed files with 257 additions and 192 deletions

View file

@ -1,3 +1,14 @@
Thu May 25 15:22:12 2000 Andrew Cagney <cagney@b1.cygnus.com>
* configure.in (AC_CHECK_HEADERS): Check for <dirent.h>,
<sys/ndir.h>, <sys/dir.h> and <ndir.h>.
* config.in, configure: Re-generate.
* gdb_dirent.h: New file
* infptrace.c: Include "gdb_dirent.h" instead of <sys/dir.h>.
* core-aout.c: Ditto.
* procfs.c: Include "gdb_dirent.h" instead of <dirent.h>.
Thu May 25 14:43:30 2000 Andrew Cagney <cagney@b1.cygnus.com>
* config.in: Regenerate.

View file

@ -210,6 +210,9 @@
/* Define if you have the <curses.h> header file. */
#undef HAVE_CURSES_H
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
/* Define if you have the <endian.h> header file. */
#undef HAVE_ENDIAN_H
@ -228,6 +231,9 @@
/* Define if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
/* Define if you have the <nl_types.h> header file. */
#undef HAVE_NL_TYPES_H
@ -258,9 +264,15 @@
/* Define if you have the <sys/debugreg.h> header file. */
#undef HAVE_SYS_DEBUGREG_H
/* Define if you have the <sys/dir.h> header file. */
#undef HAVE_SYS_DIR_H
/* Define if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define if you have the <sys/ndir.h> header file. */
#undef HAVE_SYS_NDIR_H
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H

375
gdb/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -102,7 +102,8 @@ AC_CHECK_HEADERS(ctype.h curses.h endian.h link.h thread_db.h proc_service.h \
string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.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/ioctl.h sys/user.h)
time.h sys/ioctl.h sys/user.h \
dirent.h sys/ndir.h sys/dir.h ndir.h)
AC_HEADER_STAT
AC_C_CONST

View file

@ -41,7 +41,7 @@
/* These are needed on various systems to expand REGISTER_U_ADDR. */
#ifndef USG
#include <sys/dir.h>
#include "gdb_dirent.h"
#include <sys/file.h>
#include "gdb_stat.h"
#include <sys/user.h>

40
gdb/gdb_dirent.h Normal file
View file

@ -0,0 +1,40 @@
/* Portable <dirent.h>
Copyright 2000 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 2 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, write to the Free Software
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. */
#ifdef HAVE_DIRENT_H
# include <dirent.h>
#else
# 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 /* !defined(GDB_DIRENT_H) */

View file

@ -34,7 +34,7 @@
#endif
#include <sys/param.h>
#include <sys/dir.h>
#include "gdb_dirent.h"
#include <signal.h>
#include <sys/ioctl.h>

View file

@ -1,5 +1,5 @@
/* Machine independent support for SVR4 /proc (process file system) for GDB.
Copyright 1999 Free Software Foundation, Inc.
Copyright 1999-2000 Free Software Foundation, Inc.
Written by Michael Snyder at Cygnus Solutions.
Based on work by Fred Fish, Stu Grossman, Geoff Noer, and others.
@ -76,7 +76,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef NEW_PROC_API
#include <sys/types.h>
#include <dirent.h> /* opendir/readdir, for listing the LWP's */
#include "gdb_dirent.h" /* opendir/readdir, for listing the LWP's */
#endif
#include <fcntl.h> /* for O_RDONLY */