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 | |
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.
-rw-r--r-- | gdb/ChangeLog | 15 | ||||
-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 | ||||
-rw-r--r-- | gdb/config.in | 15 | ||||
-rwxr-xr-x | gdb/configure | 318 | ||||
-rw-r--r-- | gdb/configure.ac | 1 | ||||
-rw-r--r-- | gdb/gdbserver/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbserver/config.in | 15 | ||||
-rwxr-xr-x | gdb/gdbserver/configure | 318 | ||||
-rw-r--r-- | gdb/gdbserver/configure.ac | 1 | ||||
-rw-r--r-- | gdb/linux-fork.c | 2 | ||||
-rw-r--r-- | gdb/linux-nat.c | 2 | ||||
-rw-r--r-- | gdb/nto-procfs.c | 2 | ||||
-rw-r--r-- | gdb/procfs.c | 2 |
16 files changed, 29 insertions, 715 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4371147..fc6336c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,20 @@ 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> + * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add dirent. * gnulib/aclocal.m4: Update. * gnulib/config.in: Update. 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. */ diff --git a/gdb/config.in b/gdb/config.in index 7dfb5c7..4e3f6de 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -120,10 +120,6 @@ */ #undef HAVE_DECL_STRSTR -/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. - */ -#undef HAVE_DIRENT_H - /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H @@ -253,9 +249,6 @@ /* Define to 1 if you have the <ncurses/term.h> header file. */ #undef HAVE_NCURSES_TERM_H -/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ -#undef HAVE_NDIR_H - /* Define to 1 if you have the <nlist.h> header file. */ #undef HAVE_NLIST_H @@ -430,10 +423,6 @@ /* Define to 1 if you have the <sys/debugreg.h> header file. */ #undef HAVE_SYS_DEBUGREG_H -/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. - */ -#undef HAVE_SYS_DIR_H - /* Define to 1 if you have the <sys/fault.h> header file. */ #undef HAVE_SYS_FAULT_H @@ -446,10 +435,6 @@ /* Define to 1 if you have the <sys/ioctl.h> header file. */ #undef HAVE_SYS_IOCTL_H -/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. - */ -#undef HAVE_SYS_NDIR_H - /* Define to 1 if you have the <sys/param.h> header file. */ #undef HAVE_SYS_PARAM_H diff --git a/gdb/configure b/gdb/configure index ae24ca5..b1a4d48 100755 --- a/gdb/configure +++ b/gdb/configure @@ -8642,165 +8642,6 @@ fi # Checks for header files. # # ------------------------- # -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 -$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> -#include <$ac_hdr> - -int -main () -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_ac_Header=yes" -else - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_ac_Header - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -_ACEOF - -ac_header_dirent=$ac_hdr; break -fi - -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dir; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then : - -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' x; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then : - -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : @@ -10282,165 +10123,6 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi - ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 -$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> -#include <$ac_hdr> - -int -main () -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_ac_Header=yes" -else - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_ac_Header - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -_ACEOF - -ac_header_dirent=$ac_hdr; break -fi - -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dir; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then : - -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' x; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then : - -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -fi - # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 diff --git a/gdb/configure.ac b/gdb/configure.ac index 88db73a..6025e89 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -1072,7 +1072,6 @@ fi # Checks for header files. # # ------------------------- # -AC_HEADER_DIRENT AC_HEADER_STDC # elf_hp.h is for HP/UX 64-bit shared library support. AC_CHECK_HEADERS([nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 96d598d..6e38797 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,11 @@ 2013-11-18 Tom Tromey <tromey@redhat.com> + * config.in: Rebuild. + * configure: Rebuild. + * configure.ac: Don't use AC_HEADER_DIRENT. + +2013-11-18 Tom Tromey <tromey@redhat.com> + * server.h: Don't check HAVE_STRING_H. * gdbreplay.c: Don't check HAVE_STRING_H. * configure: Rebuild. diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in index d0976c1..e33cdea 100644 --- a/gdb/gdbserver/config.in +++ b/gdb/gdbserver/config.in @@ -42,10 +42,6 @@ don't. */ #undef HAVE_DECL_VSNPRINTF -/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. - */ -#undef HAVE_DIRENT_H - /* Define to 1 if you have the `dladdr' function. */ #undef HAVE_DLADDR @@ -109,9 +105,6 @@ /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H -/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ -#undef HAVE_NDIR_H - /* Define to 1 if you have the <netdb.h> header file. */ #undef HAVE_NETDB_H @@ -185,20 +178,12 @@ /* Define to 1 if the target supports __sync_*_compare_and_swap */ #undef HAVE_SYNC_BUILTINS -/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. - */ -#undef HAVE_SYS_DIR_H - /* Define to 1 if you have the <sys/file.h> header file. */ #undef HAVE_SYS_FILE_H /* Define to 1 if you have the <sys/ioctl.h> header file. */ #undef HAVE_SYS_IOCTL_H -/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. - */ -#undef HAVE_SYS_NDIR_H - /* Define to 1 if you have the <sys/procfs.h> header file. */ #undef HAVE_SYS_PROCFS_H diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure index 096c7b3..d75ec1f 100755 --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure @@ -4131,165 +4131,6 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 -$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> -#include <$ac_hdr> - -int -main () -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_ac_Header=yes" -else - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_ac_Header - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -_ACEOF - -ac_header_dirent=$ac_hdr; break -fi - -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dir; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then : - -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' x; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then : - -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -fi - # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! @@ -5035,165 +4876,6 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi - ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 -$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> -#include <$ac_hdr> - -int -main () -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_ac_Header=yes" -else - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_ac_Header - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -_ACEOF - -ac_header_dirent=$ac_hdr; break -fi - -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dir; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then : - -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' x; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then : - -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -fi - # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac index 3bed876..87146c1 100644 --- a/gdb/gdbserver/configure.ac +++ b/gdb/gdbserver/configure.ac @@ -37,7 +37,6 @@ AC_PROG_RANLIB AC_ARG_PROGRAM AC_HEADER_STDC -AC_HEADER_DIRENT AC_FUNC_ALLOCA diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c index 0f27d68..1c325ef 100644 --- a/gdb/linux-fork.c +++ b/gdb/linux-fork.c @@ -33,7 +33,7 @@ #include <sys/ptrace.h> #include "gdb_wait.h" -#include "gdb_dirent.h" +#include <dirent.h> #include <ctype.h> struct fork_info *fork_list; diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index bccd583..e9613ac 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -54,7 +54,7 @@ #include "event-top.h" #include <pwd.h> #include <sys/types.h> -#include "gdb_dirent.h" +#include <dirent.h> #include "xml-support.h" #include "terminal.h" #include <sys/vfs.h> diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c index 424a91b..1c2f298 100644 --- a/gdb/nto-procfs.c +++ b/gdb/nto-procfs.c @@ -28,7 +28,7 @@ #include <sys/procfs.h> #include <sys/neutrino.h> #include <sys/syspage.h> -#include "gdb_dirent.h" +#include <dirent.h> #include <sys/netmgr.h> #include "exceptions.h" diff --git a/gdb/procfs.c b/gdb/procfs.c index c0004f2..7a2aeb8 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -89,7 +89,7 @@ #ifdef NEW_PROC_API #include <sys/types.h> -#include "gdb_dirent.h" /* opendir/readdir, for listing the LWP's */ +#include <dirent.h> /* opendir/readdir, for listing the LWP's */ #endif #include <fcntl.h> /* for O_RDONLY */ |