/[make]/make/w32/include/dirent.h
ViewVC logotype

Contents of /make/w32/include/dirent.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Mon Nov 3 22:04:13 2003 UTC (20 years, 6 months ago) by psmith
Branch: MAIN
Changes since 1.3: +62 -37 lines
File MIME type: text/plain
Added MINGW32 changes.

This commits a number of changes from Earnie Boyd that allows GNU make
to build for MINGW32 systems.  Only missing from this commit are the
changes to configure.in etc.; I'm waiting for Earnie to sign papers for
those new files.

Also not here is any README.mingw32 etc. which would explain how to use
this port.

1 /* Windows version of dirent.h
2 Copyright (C) 1996, 1997, 2003 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
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.
9
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.
14
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. */
19
20 #ifndef _DIRENT_H
21 #define _DIRENT_H
22
23 #ifdef __MINGW32__
24 # include <windows.h>
25 # include_next <dirent.h>
26 #else
27
28 #include <stdlib.h>
29 #include <windows.h>
30 #include <limits.h>
31 #include <sys/types.h>
32
33 #ifndef NAME_MAX
34 #define NAME_MAX 255
35 #endif
36
37 #define __DIRENT_COOKIE 0xfefeabab
38
39
40 struct dirent
41 {
42 ino_t d_ino; /* unused - no equivalent on WINDOWS32 */
43 char d_name[NAME_MAX+1];
44 };
45
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;
53
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);
60
61 #endif /* !__MINGW32__ */
62 #endif

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26