w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

dirent.h
Go to the documentation of this file.
1 /* Windows version of dirent.h
2 Copyright (C) 1996-2020 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 __MINGW32__
21 # include <windows.h>
22 # include_next <dirent.h>
23 #else
24 
25 #include <stdlib.h>
26 #include <windows.h>
27 #include <limits.h>
28 #include <sys/types.h>
29 
30 #ifndef NAME_MAX
31 #define NAME_MAX 255
32 #endif
33 
34 #define __DIRENT_COOKIE 0xfefeabab
35 
36 /* File types for `d_type'.
37  Windows only supports DT_CHR, DT_DIR, and DT_REG. */
38 enum
39  {
41 # define DT_UNKNOWN DT_UNKNOWN
42  DT_FIFO = 1,
43 # define DT_FIFO DT_FIFO
44  DT_CHR = 2,
45 # define DT_CHR DT_CHR
46  DT_DIR = 4,
47 # define DT_DIR DT_DIR
48  DT_BLK = 6,
49 # define DT_BLK DT_BLK
50  DT_REG = 8,
51 # define DT_REG DT_REG
52  DT_LNK = 10,
53 # define DT_LNK DT_LNK
54  DT_SOCK = 12,
55 # define DT_SOCK DT_SOCK
56  DT_WHT = 14
57 # define DT_WHT DT_WHT
58  };
59 
60 
61 struct dirent
62  {
63  ino_t d_ino; /* unused - no equivalent on WINDOWS32. */
64  unsigned char d_type;
65  char d_name[NAME_MAX+1]; /* must come last due to dir.c assumptions. */
66  };
67 
68 typedef struct dir_struct
69  {
74  struct dirent dir_sdReturn;
75  } DIR;
76 
77 DIR *opendir(const char *);
78 struct dirent *readdir(DIR *);
79 void rewinddir(DIR *);
80 void closedir(DIR *);
81 void seekdir(DIR *, long);
82 
83 #endif /* !__MINGW32__ */
84 #endif
KPSEDLL int closedir(DIR *__dir)
Definition: dirent.c:123
KPSEDLL struct dirent * readdir(DIR *__dir)
Definition: dirent.c:138
KPSEDLL DIR * opendir(char *__dirname)
Definition: dirent.c:60
void rewinddir()
void seekdir()
#define NAME_MAX
Definition: dirent.h:16
unsigned short ino_t
Definition: types.h:10
#define DT_DIR
Definition: dirent.h:47
#define DT_BLK
Definition: dirent.h:49
#define DT_UNKNOWN
Definition: dirent.h:41
#define DT_FIFO
Definition: dirent.h:43
#define DT_CHR
Definition: dirent.h:45
struct dir_struct DIR
#define DT_WHT
#define DT_REG
Definition: dirent.h:51
#define DT_LNK
Definition: dirent.h:53
#define DT_SOCK
Definition: dirent.h:55
unsigned int DWORD
Definition: mktexlib.h:49
unsigned long ULONG
Definition: pdfgen.h:158
Definition: dirent.h:44
DWORD dir_nNumFiles
Definition: dirent.h:72
ULONG dir_ulCookie
Definition: dirent.h:70
struct dirent dir_sdReturn
Definition: dirent.h:74
HANDLE dir_hDirHandle
Definition: dirent.h:71
char dir_pDirectoryName[256+1]
Definition: dirent.h:73
Definition: dirent.h:34
char d_name[260]
Definition: dirent.h:37
ino_t d_ino
Definition: DIRENT.H:24
unsigned char d_type
Definition: dirent.h:64