1 /* lt__dirent.h -- internal directory entry scanning interface
3 Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc.
4 Written by Bob Friesenhahn, 2001
6 NOTE: The canonical source of this file is maintained with the
7 GNU Libtool package. Report bugs to bug-libtool@gnu.org.
9 GNU Libltdl is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Lesser General Public
11 License as published by the Free Software Foundation; either
12 version 2 of the License, or (at your option) any later version.
14 As a special exception to the GNU Lesser General Public License,
15 if you distribute this file as part of a program or library that
16 is built using GNU Libtool, you may include this file under the
17 same distribution terms that you use for the rest of that program.
19 GNU Libltdl is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU Lesser General Public License for more details.
24 You should have received a copy of the GNU Lesser General Public
25 License along with GNU Libltdl; see the file COPYING.LIB. If not, a
26 copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
27 or obtained by writing to the Free Software Foundation, Inc.,
28 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
31 #if !defined(LT__DIRENT_H)
32 #define LT__DIRENT_H 1
34 #if defined(LT_CONFIG_H)
40 #include "lt_system.h"
43 /* We have a fully operational dirent subsystem. */
45 # define D_NAMLEN(dirent) (strlen((dirent)->d_name))
47 #elif defined __WINDOWS__
48 /* Use some wrapper code to emulate dirent on windows.. */
49 # define WINDOWS_DIRENT_EMULATION 1
53 # define D_NAMLEN(dirent) (strlen((dirent)->d_name))
54 # define dirent lt__dirent
56 # define opendir lt__opendir
57 # define readdir lt__readdir
58 # define closedir lt__closedir
64 char d_name
[LT_FILENAME_MAX
];
71 WIN32_FIND_DATA Win32FindData
;
73 struct dirent file_info
;
77 LT_SCOPE
DIR * opendir (const char *path
);
78 LT_SCOPE
struct dirent
*readdir (DIR *entry
);
79 LT_SCOPE
void closedir (DIR *entry
);
83 #else /* !defined(__WINDOWS__)*/
84 ERROR
- cannot find dirent
85 #endif /*!defined(__WINDOWS__)*/
87 #endif /*!defined(LT__DIRENT_H)*/