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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [newlib/] [libc/] [sys/] [rtems/] [sys/] [dirent.h] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
#ifndef _SYS_DIRENT_H
2
# define _SYS_DIRENT_H
3
 
4
#ifdef __cplusplus
5
extern "C" {
6
#endif
7
 
8
/*
9
 * This file was written to be compatible with the BSD directory
10
 * routines, so it looks like it.  But it was written from scratch.
11
 * Sean Eric Fagan, sef@Kithrup.COM
12
 *
13
 *  Copied to RTEMS configuration without modification.
14
 */
15
 
16
typedef struct _dirdesc {
17
        int     dd_fd;
18
        long    dd_loc;
19
        long    dd_size;
20
        char    *dd_buf;
21
        int     dd_len;
22
        long    dd_seek;
23
} DIR;
24
 
25
# define __dirfd(dp)    ((dp)->dd_fd)
26
 
27
DIR *opendir(const char *);
28
struct dirent *readdir(DIR *);
29
void rewinddir(DIR *);
30
int closedir(DIR *);
31
void seekdir(DIR *dir, long loc);
32
long telldir(DIR *dir);
33
 
34
#include <sys/types.h>
35
 
36
#include <limits.h>
37
 
38
struct dirent {
39
        long    d_ino;
40
        off_t   d_off;
41
        unsigned short  d_reclen;
42
        /* we need better syntax for variable-sized arrays */
43
        unsigned short  d_namlen;
44
        char            d_name[NAME_MAX + 1];
45
};
46
 
47
int scandir ( const char *dirname,
48
   struct dirent *** namelist,
49
   int (*select)(struct dirent *),
50
   int (*dcomp)(const struct dirent **, const struct dirent **)
51
);
52
 
53
#ifdef __cplusplus
54
}
55
#endif 
56
 
57
 
58
#endif

powered by: WebSVN 2.1.0

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