beta-0.89.2
[luatex.git] / source / texk / kpathsea / c-dir.h
blobae177faf31e4937bff5751650008f103bd209b94
1 /* c-dir.h: directory headers.
3 Copyright 1992, 1993, 1994, 2008 Karl Berry.
4 Copyright 1998, 2005 Olaf Weber.
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.
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.
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/>. */
19 #ifndef KPATHSEA_C_DIR_H
20 #define KPATHSEA_C_DIR_H
22 #ifdef WIN32
24 #include <direct.h>
26 #else /* not WIN32 */
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)
36 #ifdef HAVE_SYS_NDIR_H
37 #include <sys/ndir.h>
38 #endif
40 #ifdef HAVE_SYS_DIR_H
41 #include <sys/dir.h>
42 #endif
44 #ifdef HAVE_NDIR_H
45 #include <ndir.h>
46 #endif
48 #endif /* not DIRENT */
50 #endif /* not WIN32 */
52 #endif /* not KPATHSEA_C_DIR_H */