dvitomp fix from Akira
[mplib] / src / texk / kpathsea / c-dir.h
1 /* c-dir.h: directory headers.
2
3    Copyright 1992, 1993, 1994, 2008 Karl Berry.
4    Copyright 1998, 2005 Olaf Weber.
5
6    This library is free software; you can redistribute it and/or
7    modify it under the terms of the GNU Lesser General Public
8    License as published by the Free Software Foundation; either
9    version 2.1 of the License, or (at your option) any later version.
10
11    This library is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    Lesser General Public License for more details.
15
16    You should have received a copy of the GNU Lesser General Public License
17    along with this library; if not, see <http://www.gnu.org/licenses/>.  */
18
19 #ifndef KPATHSEA_C_DIR_H
20 #define KPATHSEA_C_DIR_H
21
22 #ifdef WIN32
23
24 #include <direct.h>
25
26 #else /* not WIN32 */
27
28 /* Use struct dirent instead of struct direct.  */
29 #ifdef HAVE_DIRENT_H
30 #include <dirent.h>
31 #define NAMLEN(dirent) strlen ((dirent)->d_name)
32 #else /* not DIRENT */
33 #define dirent direct
34 #define NAMLEN(dirent) ((dirent)->d_namlen)
35
36 #ifdef HAVE_SYS_NDIR_H
37 #include <sys/ndir.h>
38 #endif
39
40 #ifdef HAVE_SYS_DIR_H
41 #include <sys/dir.h>
42 #endif
43
44 #ifdef HAVE_NDIR_H
45 #include <ndir.h>
46 #endif
47
48 #endif /* not DIRENT */
49
50 #endif /* not WIN32 */
51
52 #endif /* not KPATHSEA_C_DIR_H */