1130803Smarcel/* Portable <dirent.h>.
2130803Smarcel   Copyright 2000, 2002 Free Software Foundation, Inc.
398944Sobrien
498944Sobrien   This file is part of GDB.
598944Sobrien
698944Sobrien   This program is free software; you can redistribute it and/or modify
798944Sobrien   it under the terms of the GNU General Public License as published by
898944Sobrien   the Free Software Foundation; either version 2 of the License, or
998944Sobrien   (at your option) any later version.
1098944Sobrien
1198944Sobrien   This program is distributed in the hope that it will be useful,
1298944Sobrien   but WITHOUT ANY WARRANTY; without even the implied warranty of
1398944Sobrien   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1498944Sobrien   GNU General Public License for more details.
1598944Sobrien
1698944Sobrien   You should have received a copy of the GNU General Public License
1798944Sobrien   along with this program; if not, write to the Free Software
1898944Sobrien   Foundation, Inc., 59 Temple Place - Suite 330,
1998944Sobrien   Boston, MA 02111-1307, USA.  */
2098944Sobrien
21130803Smarcel#ifndef GDB_DIRENT_H
22130803Smarcel#define GDB_DIRENT_H 1
2398944Sobrien
24130803Smarcel/* See description of `AC_HEADER_DIRENT' in the Autoconf manual.  */
2598944Sobrien#ifdef HAVE_DIRENT_H
26130803Smarcel# include <dirent.h>		/* OK: dirent.h */
27130803Smarcel# define NAMELEN(dirent) strlen ((dirent)->d_name)	/* OK: strlen d_name */
2898944Sobrien#else
29130803Smarcel# define dirent direct
30130803Smarcel# define NAMELEN(dirent) (dirent)->d_namelen	/* OK: d_namelen */
3198944Sobrien# ifdef HAVE_SYS_NDIR_H
3298944Sobrien#  include <sys/ndir.h>
3398944Sobrien# endif
3498944Sobrien# ifdef HAVE_SYS_DIR_H
3598944Sobrien#  include <sys/dir.h>
3698944Sobrien# endif
3798944Sobrien# ifdef HAVE_NDIR_H
3898944Sobrien#  include <ndir.h>
3998944Sobrien# endif
4098944Sobrien#endif
4198944Sobrien
42130803Smarcel#endif /* not GDB_DIRENT_H */
43