VirtualBox

source: kBuild/trunk/src/kmk/w32/include/dirent.h@ 2702

Last change on this file since 2702 was 2702, checked in by bird, 11 years ago

kmk/WindowsNT: Avoiding unnecessary stat() calls. Reimplemented stat(), lstat(), fstat(), opendir(), readdir(), and closedir() using native NT APIs.

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1/* Windows version of dirent.h
2Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
32007, 2008, 2009, 2010 Free Software Foundation, Inc.
4This file is part of GNU Make.
5
6GNU Make is free software; you can redistribute it and/or modify it under the
7terms of the GNU General Public License as published by the Free Software
8Foundation; either version 3 of the License, or (at your option) any later
9version.
10
11GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License along with
16this program. If not, see <http://www.gnu.org/licenses/>. */
17
18#ifndef _DIRENT_H
19#define _DIRENT_H
20
21#ifdef KMK
22# include <windows.h>
23# include "nt/ntdir.h"
24
25#else /* !KMK */
26
27#ifdef __MINGW32__
28# include <windows.h>
29# include_next <dirent.h>
30#else
31
32#include <stdlib.h>
33#include <windows.h>
34#include <limits.h>
35#include <sys/types.h>
36
37#ifndef NAME_MAX
38#define NAME_MAX 255
39#endif
40
41#define __DIRENT_COOKIE 0xfefeabab
42
43
44struct dirent
45{
46 ino_t d_ino; /* unused - no equivalent on WINDOWS32 */
47 char d_name[NAME_MAX+1];
48};
49
50typedef struct dir_struct {
51 ULONG dir_ulCookie;
52 HANDLE dir_hDirHandle;
53 DWORD dir_nNumFiles;
54 char dir_pDirectoryName[NAME_MAX+1];
55 struct dirent dir_sdReturn;
56} DIR;
57
58DIR *opendir(const char *);
59struct dirent *readdir(DIR *);
60void rewinddir(DIR *);
61void closedir(DIR *);
62int telldir(DIR *);
63void seekdir(DIR *, long);
64
65#endif /* !__MINGW32__ */
66#endif /* !KMK */
67#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette