diff options
author | Christopher Faylor <me+cygwin@cgf.cx> | 2000-02-17 19:39:46 +0000 |
---|---|---|
committer | Christopher Faylor <me+cygwin@cgf.cx> | 2000-02-17 19:39:46 +0000 |
commit | 43b55bace5fad27af5da7a99784667363b92c45d (patch) | |
tree | 17fe82f6ba0d93b76d10dd73d4945ab81b69db40 /newlib/libc/sys/sparc64/sys/dirent.h | |
parent | 8dabd7496a9eeaca2a7180c0a176059ba9229bb2 (diff) | |
download | gdb-SNAPSHOT.tar.gz |
import newlib-2000-02-17 snapshotnewlib-2000-02-17SNAPSHOT
Diffstat (limited to 'newlib/libc/sys/sparc64/sys/dirent.h')
-rw-r--r-- | newlib/libc/sys/sparc64/sys/dirent.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/newlib/libc/sys/sparc64/sys/dirent.h b/newlib/libc/sys/sparc64/sys/dirent.h new file mode 100644 index 00000000000..864bb5ca19d --- /dev/null +++ b/newlib/libc/sys/sparc64/sys/dirent.h @@ -0,0 +1,48 @@ +/* FIXME: From sys/sysvi386/sys */ +#ifndef _SYS_DIRENT_H +# define _SYS_DIRENT_H + +/* + * This file was written to be compatible with the BSD directory + * routines, so it looks like it. But it was written from scratch. + * Sean Eric Fagan, sef@Kithrup.COM + */ + +typedef struct __dirdesc { + int dd_fd; + long dd_loc; + long dd_size; + char *dd_buf; + int dd_len; + long dd_seek; +} DIR; + +# define __dirfd(dp) ((dp)->dd_fd) + +DIR *opendir (const char *); +struct dirent *readdir (DIR *); +void rewinddir (DIR *); +int closedir (DIR *); + +#include <sys/types.h> + +#undef MAXNAMLEN /* from unistd.h */ +#ifdef __svr4__ +#define MAXNAMLEN 512 +#else +#define MAXNAMLEN 255 +#endif + +#define d_ino d_fileno /* compatibility */ + +struct dirent { + off_t d_off; + unsigned long d_fileno; + unsigned short d_reclen; + unsigned short d_namlen; + char d_name[MAXNAMLEN + 1]; +}; + +/* FIXME: include definition of DIRSIZ() ? */ + +#endif |