1 /* Posix dirent.h for WIN32.
3 Copyright 2001 Red Hat, Inc.
5 This software is a copyrighted work licensed under the terms of the
6 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
9 /* Including this file should not require any Windows headers. */
14 #include <sys/types.h>
16 #define __DIRENT_VERSION 1
20 long d_version
; /* Used since Cygwin 1.3.3. */
22 long d_fd
; /* File descriptor of open directory. Used since Cygwin 1.3.3. */
23 ino_t d_ino
; /* Just for compatibility, it's junk */
24 char d_name
[256]; /* FIXME: use NAME_MAX? */
27 #define __DIRENT_COOKIE 0xdede4242
31 /* This is first to set alignment in non _COMPILING_NEWLIB case. */
32 unsigned long __d_cookie
;
33 struct dirent
*__d_dirent
;
34 char *__d_dirname
; /* directory name with trailing '*' */
35 off_t __d_position
; /* used by telldir/seekdir */
36 unsigned long __d_dirhash
; /* hash of directory name for use by
40 #ifdef _COMPILING_NEWLIB
51 DIR *opendir (const char *);
52 struct dirent
*readdir (DIR *);
53 void rewinddir (DIR *);
59 off_t
telldir (DIR *);
60 void seekdir (DIR *, off_t loc
);
62 int scandir (const char *__dir
,
63 struct dirent
***__namelist
,
64 int (*select
) (const struct dirent
*),
65 int (*compar
) (const struct dirent
**, const struct dirent
**));
67 int alphasort (const struct dirent
**__a
, const struct dirent
**__b
);
68 #endif /* _POSIX_SOURCE */