This commit was manufactured by cvs2svn to create tag
[kbuild-mirror.git] / src / gmake / w32 / include / dirent.h
blobed182b34e8b013cd6932189a796a5e70e6696db6
1 /* Windows version of dirent.h
2 Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
3 This file is part of GNU Make.
5 GNU Make is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
8 any later version.
10 GNU Make is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNU Make; see the file COPYING. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
18 MA 02111-1307, USA. */
20 #ifndef _DIRENT_H
21 #define _DIRENT_H
23 #ifdef __MINGW32__
24 # include <windows.h>
25 # include_next <dirent.h>
26 #else
28 #include <stdlib.h>
29 #include <windows.h>
30 #include <limits.h>
31 #include <sys/types.h>
33 #ifndef NAME_MAX
34 #define NAME_MAX 255
35 #endif
37 #define __DIRENT_COOKIE 0xfefeabab
40 struct dirent
42 ino_t d_ino; /* unused - no equivalent on WINDOWS32 */
43 char d_name[NAME_MAX+1];
46 typedef struct dir_struct {
47 ULONG dir_ulCookie;
48 HANDLE dir_hDirHandle;
49 DWORD dir_nNumFiles;
50 char dir_pDirectoryName[NAME_MAX+1];
51 struct dirent dir_sdReturn;
52 } DIR;
54 DIR *opendir(const char *);
55 struct dirent *readdir(DIR *);
56 void rewinddir(DIR *);
57 void closedir(DIR *);
58 int telldir(DIR *);
59 void seekdir(DIR *, long);
61 #endif /* !__MINGW32__ */
62 #endif