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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [sys/] [cygwin/] [sys/] [dirent.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1010 ivang
/* Posix dirent.h for WIN32.
2
 
3
   Copyright 2001 Red Hat, Inc.
4
 
5
   This software is a copyrighted work licensed under the terms of the
6
   Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
7
   details. */
8
 
9
/* Including this file should not require any Windows headers.  */
10
 
11
#ifndef _SYS_DIRENT_H
12
#define _SYS_DIRENT_H
13
 
14
#include <sys/types.h>
15
 
16
#define __DIRENT_VERSION        1
17
 
18
struct dirent
19
{
20
  long d_version;       /* Used since Cygwin 1.3.3. */
21
  long __d_reserved[2];
22
  long d_fd;            /* File descriptor of open directory.
23
                           Used since Cygwin 1.3.3. */
24
  ino_t d_ino;          /* Just for compatibility, it's junk */
25
  char d_name[256];     /* FIXME: use NAME_MAX? */
26
};
27
 
28
#define __DIRENT_COOKIE 0xdede4242
29
 
30
typedef struct __DIR
31
{
32
  /* This is first to set alignment in non _COMPILING_NEWLIB case.  */
33
  unsigned long __d_cookie;
34
  struct dirent *__d_dirent;
35
  char *__d_dirname;            /* directory name with trailing '*' */
36
  off_t __d_position;           /* used by telldir/seekdir */
37
  unsigned long __d_dirhash;    /* hash of directory name for use by
38
                                   readdir */
39
  union
40
    {
41
#ifdef _COMPILING_NEWLIB
42
      struct
43
        {
44
          void *__handle;
45
          void *__fh;
46
        } __d_data;
47
#endif
48
      char __d_filler[16];
49
    } __d_u;
50
} DIR;
51
 
52
DIR *opendir (const char *);
53
struct dirent *readdir (DIR *);
54
void rewinddir (DIR *);
55
int closedir (DIR *);
56
 
57
int dirfd (DIR *);
58
 
59
#ifndef _POSIX_SOURCE
60
off_t telldir (DIR *);
61
void seekdir (DIR *, off_t loc);
62
 
63
int scandir (const char *__dir,
64
             struct dirent ***__namelist,
65
             int (*select) (const struct dirent *),
66
             int (*compar) (const struct dirent **, const struct dirent **));
67
 
68
int alphasort (const struct dirent **__a, const struct dirent **__b);
69
#endif /* _POSIX_SOURCE */
70
 
71
#endif

powered by: WebSVN 2.1.0

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