dirent revision da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinset prototyped
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinset nodefine
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinlib stat64 -D_LARGEFILE64_SOURCE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chintyp off64_t -D_LARGEFILE64_SOURCE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinset define
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinlib opendir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinhdr dirent,ndir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinsys dir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinnxt dirent
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chintst botch_d_ino_dirent64 -D_LARGEFILE64_SOURCE note{ dirent64.d_ino vs. readdir64 mismatch }end compile{
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #if !__arm__
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin )
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #include <dirent.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin int
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin main()
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin {
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin struct dirent64 ent;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin char aha[5-((int)sizeof(ent.d_ino))];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return sizeof(aha);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin }
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin}end
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinif ( ! _lib_opendir ) {
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /*
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * <dirent.h> for systems with no opendir()
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifndef _DIRENT_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define _DIRENT_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin typedef struct
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin {
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin int dd_fd; /* file descriptor */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifdef _DIR_PRIVATE_
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin _DIR_PRIVATE_
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin } DIR;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin struct dirent
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin {
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin long d_fileno; /* entry serial number */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin int d_reclen; /* entry length */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin int d_namlen; /* entry name length */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin char d_name[1]; /* entry name */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin };
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifndef _DIR_PRIVATE_
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifdef rewinddir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #undef rewinddir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define rewinddir(p) seekdir(p,0L)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern DIR* opendir(const char*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern void closedir(DIR*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern struct dirent* readdir(DIR*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern void seekdir(DIR*, long);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern long telldir(DIR*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin}
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinelif ( _nxt_dirent && _lib_stat64 && _typ_off64_t && _botch_d_ino_dirent64 ) pass{
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chincat <<!
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /*
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * <dirent.h> for [fl]stat64 and off64_t with sizeof(ino64_t)==4
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifndef _AST_STD_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #include $_nxt_dirent /* the native <dirent.h> */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #else
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifndef _DIR64_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define _DIR64_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #include <ast_std.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #if _typ_off64_t
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #undef off_t
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #undef __ino64_t
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define __ino64_t int64_t
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #include $_nxt_dirent /* the native <dirent.h> */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #undef __ino64_t
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define __ino64_t __ino64_t
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #if _typ_off64_t
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define off_t off64_t
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #if _lib_readdir64 && _typ_struct_dirent64
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifndef dirent
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define dirent dirent64
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifndef readdir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define readdir readdir64
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin!
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin}end
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinelif ( _nxt_dirent && _lib_stat64 && _typ_off64_t ) pass{
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chincat <<!
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /*
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * <dirent.h> for [fl]stat64 and off64_t
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifndef _AST_STD_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #include $_nxt_dirent /* the native <dirent.h> */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #else
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifndef _DIR64_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define _DIR64_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #include <ast_std.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #if _typ_off64_t
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #undef off_t
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #include $_nxt_dirent /* the native <dirent.h> */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #if _typ_off64_t
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define off_t off64_t
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #if _lib_readdir64 && _typ_struct_dirent64
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifndef dirent
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define dirent dirent64
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifndef readdir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define readdir readdir64
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin!
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin}end
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinelif ( _nxt_dirent && _hdr_dirent ) pass{
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chincat <<!
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /*
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * <dirent.h> for systems with ok <dirent.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifndef _DIRENT_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #include $_nxt_dirent /* the native <dirent.h> */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifndef _DIRENT_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define _DIRENT_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin!
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin}end
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinelif ( _hdr_ndir ) {
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /*
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * <dirent.h> for systems with opendir() and <ndir.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifndef _DIRENT_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define _DIRENT_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #if defined(__STDPP__directive) && defined(__STDPP__hide)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin __STDPP__directive pragma pp:hide closedir opendir readdir seekdir telldir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #else
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define closedir ______closedir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define opendir ______opendir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define readdir ______readdir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define seekdir ______seekdir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define telldir ______telldir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #include <ndir.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #if defined(__STDPP__directive) && defined(__STDPP__hide)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin __STDPP__directive pragma pp:nohide closedir opendir readdir seekdir telldir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #else
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #undef closedir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #undef opendir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #undef readdir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #undef seekdir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #undef telldir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifndef dirent
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define dirent direct
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #if !defined(d_fileno) && !defined(d_ino)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define d_fileno d_ino
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifdef rewinddir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #undef rewinddir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define rewinddir(p) seekdir(p,0L)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern DIR* opendir(const char*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern void closedir(DIR*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern struct dirent* readdir(DIR*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern void seekdir(DIR*, long);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern long telldir(DIR*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin}
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinelif ( _sys_dir ) {
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /*
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * <dirent.h> for systems with opendir() and no <ndir.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifndef _DIRENT_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define _DIRENT_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #if defined(__STDPP__directive) && defined(__STDPP__hide)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin __STDPP__directive pragma pp:hide closedir opendir readdir seekdir telldir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #else
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define closedir ______closedir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define opendir ______opendir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define readdir ______readdir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define seekdir ______seekdir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define telldir ______telldir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #include <sys/dir.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #if defined(__STDPP__directive) && defined(__STDPP__hide)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin __STDPP__directive pragma pp:nohide closedir opendir readdir seekdir telldir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #else
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #undef closedir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #undef opendir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #undef readdir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #undef seekdir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #undef telldir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifndef dirent
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define dirent direct
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #if !defined(d_fileno) && !defined(d_ino)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define d_fileno d_ino
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #ifdef rewinddir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #undef rewinddir
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define rewinddir(p) seekdir(p,0L)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern DIR* opendir(const char*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern void closedir(DIR*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern struct dirent* readdir(DIR*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern void seekdir(DIR*, long);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern long telldir(DIR*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin}
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinendif