xref: /dflybsd-src/contrib/gdb-7/gdb/common/gdb_dirent.h (revision de8e141f24382815c10a4012d209bbbf7abf1112)
1a45ae5f8SJohn Marino /* Portable <dirent.h>.
2*ef5ccd6cSJohn Marino    Copyright (C) 2000-2013 Free Software Foundation, Inc.
3a45ae5f8SJohn Marino 
4a45ae5f8SJohn Marino    This file is part of GDB.
5a45ae5f8SJohn Marino 
6a45ae5f8SJohn Marino    This program is free software; you can redistribute it and/or modify
7a45ae5f8SJohn Marino    it under the terms of the GNU General Public License as published by
8a45ae5f8SJohn Marino    the Free Software Foundation; either version 3 of the License, or
9a45ae5f8SJohn Marino    (at your option) any later version.
10a45ae5f8SJohn Marino 
11a45ae5f8SJohn Marino    This program is distributed in the hope that it will be useful,
12a45ae5f8SJohn Marino    but WITHOUT ANY WARRANTY; without even the implied warranty of
13a45ae5f8SJohn Marino    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14a45ae5f8SJohn Marino    GNU General Public License for more details.
15a45ae5f8SJohn Marino 
16a45ae5f8SJohn Marino    You should have received a copy of the GNU General Public License
17a45ae5f8SJohn Marino    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
18a45ae5f8SJohn Marino 
19a45ae5f8SJohn Marino #ifndef GDB_DIRENT_H
20a45ae5f8SJohn Marino #define GDB_DIRENT_H 1
21a45ae5f8SJohn Marino 
22a45ae5f8SJohn Marino /* See description of `AC_HEADER_DIRENT' in the Autoconf manual.  */
23a45ae5f8SJohn Marino #ifdef HAVE_DIRENT_H
24a45ae5f8SJohn Marino # include <dirent.h>		/* ARI: dirent.h */
25a45ae5f8SJohn Marino # define NAMELEN(dirent) strlen ((dirent)->d_name)    /* ARI: strlen d_name */
26a45ae5f8SJohn Marino #else
27a45ae5f8SJohn Marino # define dirent direct
28a45ae5f8SJohn Marino # define NAMELEN(dirent) (dirent)->d_namelen	/* ARI: d_namelen */
29a45ae5f8SJohn Marino # ifdef HAVE_SYS_NDIR_H
30a45ae5f8SJohn Marino #  include <sys/ndir.h>
31a45ae5f8SJohn Marino # endif
32a45ae5f8SJohn Marino # ifdef HAVE_SYS_DIR_H
33a45ae5f8SJohn Marino #  include <sys/dir.h>
34a45ae5f8SJohn Marino # endif
35a45ae5f8SJohn Marino # ifdef HAVE_NDIR_H
36a45ae5f8SJohn Marino #  include <ndir.h>
37a45ae5f8SJohn Marino # endif
38a45ae5f8SJohn Marino #endif
39a45ae5f8SJohn Marino 
40a45ae5f8SJohn Marino #endif /* not GDB_DIRENT_H */
41