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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libc/] [sys/] [linux/] [sys/] [dirent.h] - Blame information for rev 207

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
/* libc/sys/linux/sys/dirent.h - Directory entry as returned by readdir */
2
 
3
/* Written 2000 by Werner Almesberger */
4
 
5
 
6
#ifndef _SYS_DIRENT_H
7
#define _SYS_DIRENT_H
8
 
9
#include <sys/types.h>
10
#include <bits/dirent.h>
11
#define _LIBC 1
12
#define  NOT_IN_libc 1
13
#include <sys/lock.h>
14
#undef _LIBC
15
 
16
#define HAVE_NO_D_NAMLEN        /* no struct dirent->d_namlen */
17
#define HAVE_DD_LOCK            /* have locking mechanism */
18
 
19
#define MAXNAMLEN 255           /* sizeof(struct dirent.d_name)-1 */
20
 
21
 
22
typedef struct {
23
    int dd_fd;          /* directory file */
24
    int dd_loc;         /* position in buffer */
25
    int dd_seek;
26
    char *dd_buf;       /* buffer */
27
    int dd_len;         /* buffer length */
28
    int dd_size;        /* amount of data in buffer */
29
    _LOCK_RECURSIVE_T dd_lock;
30
} DIR;
31
 
32
 
33
#define __dirfd(dir) (dir)->dd_fd
34
 
35
/* --- redundant --- */
36
 
37
DIR *opendir(const char *);
38
struct dirent *readdir(DIR *);
39
void rewinddir(DIR *);
40
int closedir(DIR *);
41
 
42
/* internal prototype */
43
void _seekdir(DIR *dir,off_t offset);
44
DIR *_opendir(const char *);
45
 
46
#ifndef _POSIX_SOURCE
47
long 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-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.