| Line | |
|---|
| 1 | /* Windows version of dirent.h
|
|---|
| 2 | Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
|---|
| 3 | This file is part of GNU Make.
|
|---|
| 4 |
|
|---|
| 5 | GNU Make is free software; you can redistribute it and/or modify it under the
|
|---|
| 6 | terms of the GNU General Public License as published by the Free Software
|
|---|
| 7 | Foundation; either version 3 of the License, or (at your option) any later
|
|---|
| 8 | version.
|
|---|
| 9 |
|
|---|
| 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.
|
|---|
| 13 |
|
|---|
| 14 | You should have received a copy of the GNU General Public License along with
|
|---|
| 15 | this program. If not, see <http://www.gnu.org/licenses/>. */
|
|---|
| 16 |
|
|---|
| 17 | #ifndef _DIRENT_H
|
|---|
| 18 | #define _DIRENT_H
|
|---|
| 19 |
|
|---|
| 20 | #ifdef KMK
|
|---|
| 21 | # include <windows.h>
|
|---|
| 22 | # include "nt/ntdir.h"
|
|---|
| 23 |
|
|---|
| 24 | #else /* !KMK */
|
|---|
| 25 |
|
|---|
| 26 | #ifdef __MINGW32__
|
|---|
| 27 | # include <windows.h>
|
|---|
| 28 | # include_next <dirent.h>
|
|---|
| 29 | #else
|
|---|
| 30 |
|
|---|
| 31 | #include <stdlib.h>
|
|---|
| 32 | #include <windows.h>
|
|---|
| 33 | #include <limits.h>
|
|---|
| 34 | #include <sys/types.h>
|
|---|
| 35 |
|
|---|
| 36 | #ifndef NAME_MAX
|
|---|
| 37 | #define NAME_MAX 255
|
|---|
| 38 | #endif
|
|---|
| 39 |
|
|---|
| 40 | #define __DIRENT_COOKIE 0xfefeabab
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 | struct dirent
|
|---|
| 44 | {
|
|---|
| 45 | ino_t d_ino; /* unused - no equivalent on WINDOWS32 */
|
|---|
| 46 | char d_name[NAME_MAX+1];
|
|---|
| 47 | };
|
|---|
| 48 |
|
|---|
| 49 | typedef struct dir_struct {
|
|---|
| 50 | ULONG dir_ulCookie;
|
|---|
| 51 | HANDLE dir_hDirHandle;
|
|---|
| 52 | DWORD dir_nNumFiles;
|
|---|
| 53 | char dir_pDirectoryName[NAME_MAX+1];
|
|---|
| 54 | struct dirent dir_sdReturn;
|
|---|
| 55 | } DIR;
|
|---|
| 56 |
|
|---|
| 57 | DIR *opendir(const char *);
|
|---|
| 58 | struct dirent *readdir(DIR *);
|
|---|
| 59 | void rewinddir(DIR *);
|
|---|
| 60 | void closedir(DIR *);
|
|---|
| 61 | int telldir(DIR *);
|
|---|
| 62 | void seekdir(DIR *, long);
|
|---|
| 63 |
|
|---|
| 64 | #endif /* !__MINGW32__ */
|
|---|
| 65 | #endif /* !KMK */
|
|---|
| 66 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.