More copyright/license updates.
[make.git] / w32 / include / dirent.h
blob8acce49469d029f7e90e791a1b5c4e4629ff38e6
1 /* Windows version of dirent.h
2 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
3 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
4 This file is part of GNU Make.
6 GNU Make is free software; you can redistribute it and/or modify it under the
7 terms of the GNU General Public License as published by the Free Software
8 Foundation; either version 2, or (at your option) any later version.
10 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License along with
15 GNU Make; see the file COPYING. If not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
18 #ifndef _DIRENT_H
19 #define _DIRENT_H
21 #ifdef __MINGW32__
22 # include <windows.h>
23 # include_next <dirent.h>
24 #else
26 #include <stdlib.h>
27 #include <windows.h>
28 #include <limits.h>
29 #include <sys/types.h>
31 #ifndef NAME_MAX
32 #define NAME_MAX 255
33 #endif
35 #define __DIRENT_COOKIE 0xfefeabab
38 struct dirent
40 ino_t d_ino; /* unused - no equivalent on WINDOWS32 */
41 char d_name[NAME_MAX+1];
44 typedef struct dir_struct {
45 ULONG dir_ulCookie;
46 HANDLE dir_hDirHandle;
47 DWORD dir_nNumFiles;
48 char dir_pDirectoryName[NAME_MAX+1];
49 struct dirent dir_sdReturn;
50 } DIR;
52 DIR *opendir(const char *);
53 struct dirent *readdir(DIR *);
54 void rewinddir(DIR *);
55 void closedir(DIR *);
56 int telldir(DIR *);
57 void seekdir(DIR *, long);
59 #endif /* !__MINGW32__ */
60 #endif