OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [branches/] [newlib/] [newlib/] [newlib/] [libc/] [sys/] [cygwin/] [sys/] [dirent.h] - Blame information for rev 1771

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 56 joel
/* Posix dirent.h for WIN32.  */
2
 
3
/* Including this file should not require any Windows headers.  */
4
 
5
#ifndef _SYS_DIRENT_H
6
#define _SYS_DIRENT_H
7
 
8
#include <sys/types.h>
9
 
10
struct dirent
11
{
12
  long __d_reserved[4];
13
  ino_t d_ino; /* Just for compatibility, it's junk */
14
  char d_name[256];             /* FIXME: use NAME_MAX? */
15
};
16
 
17
#define __DIRENT_COOKIE 0xdede4242
18
 
19
typedef struct
20
{
21
  /* This is first to set alignment in non _COMPILING_NEWLIB case.  */
22
  unsigned long __d_cookie;
23
  struct dirent *__d_dirent;
24
  char *__d_dirname;            /* directory name with trailing '*' */
25
  off_t __d_position;           /* used by telldir/seekdir */
26
  unsigned long __d_dirhash;    /* hash of directory name for use by
27
                                   readdir */
28
  union
29
    {
30
#ifdef _COMPILING_NEWLIB
31
      struct
32
        {
33
          HANDLE __handle;
34
          char __open_p;
35
        } __d_data;
36
#endif
37
      char __d_filler[16];
38
    } __d_u;
39
} DIR;
40
 
41
DIR *opendir (const char *);
42
struct dirent *readdir (DIR *);
43
void rewinddir (DIR *);
44
int closedir (DIR *);
45
 
46
#ifndef _POSIX_SOURCE
47
off_t telldir (DIR *);
48
void seekdir (DIR *, off_t loc);
49
 
50
int scandir (const char *__dir,
51
             struct dirent ***__namelist,
52
             int (*select) (const struct dirent *),
53
             int (*compar) (const struct dirent **, const struct dirent **));
54
 
55
int alphasort (const struct dirent **__a, const struct dirent **__b);
56
#endif /* _POSIX_SOURCE */
57
 
58
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.