aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdb_dirent.h
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2002-12-31 12:41:00 +0000
committerMark Kettenis <kettenis@gnu.org>2002-12-31 12:41:00 +0000
commit9608ab8b2af94439e3dfe07774857cd74a190a08 (patch)
tree8c766260991857daaac2c4efc6863457de72a29b /gdb/gdb_dirent.h
parentbbcc08074ff8a8e6cb1acfe4f59bc827ada47fc6 (diff)
downloadgdb-9608ab8b2af94439e3dfe07774857cd74a190a08.zip
gdb-9608ab8b2af94439e3dfe07774857cd74a190a08.tar.gz
gdb-9608ab8b2af94439e3dfe07774857cd74a190a08.tar.bz2
* 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.
Diffstat (limited to 'gdb/gdb_dirent.h')
-rw-r--r--gdb/gdb_dirent.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/gdb/gdb_dirent.h b/gdb/gdb_dirent.h
index 9cb4006..eb14767 100644
--- a/gdb/gdb_dirent.h
+++ b/gdb/gdb_dirent.h
@@ -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 */