=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/include/dirent.h,v retrieving revision 1.14 retrieving revision 1.15 diff -c -r1.14 -r1.15 *** src/include/dirent.h 2005/06/18 18:09:42 1.14 --- src/include/dirent.h 2005/12/13 00:35:22 1.15 *************** *** 1,4 **** ! /* $OpenBSD: dirent.h,v 1.14 2005/06/18 18:09:42 millert Exp $ */ /* $NetBSD: dirent.h,v 1.9 1995/03/26 20:13:37 jtc Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: dirent.h,v 1.15 2005/12/13 00:35:22 millert Exp $ */ /* $NetBSD: dirent.h,v 1.9 1995/03/26 20:13:37 jtc Exp $ */ /*- *************** *** 35,44 **** #ifndef _DIRENT_H_ #define _DIRENT_H_ /* * POSIX doesn't mandate this, but X/Open XPG 4.2 does. */ ! #ifndef _POSIX_SOURCE #include #endif --- 35,46 ---- #ifndef _DIRENT_H_ #define _DIRENT_H_ + #include + /* * POSIX doesn't mandate this, but X/Open XPG 4.2 does. */ ! #if __BSD_VISIBLE || __XPG_VISIBLE >= 420 #include #endif *************** *** 48,59 **** */ #include ! #ifdef _POSIX_SOURCE ! typedef void * DIR; ! #else ! #define d_ino d_fileno /* backward compatibility */ /* definitions for library routines operating on directories. */ #define DIRBLKSIZ 1024 --- 50,61 ---- */ #include ! #if __BSD_VISIBLE || __XPG_VISIBLE #define d_ino d_fileno /* backward compatibility */ + #endif + #if __BSD_VISIBLE + /* definitions for library routines operating on directories. */ #define DIRBLKSIZ 1024 *************** *** 80,110 **** #define NULL __null #else #define NULL 0L ! #endif ! #endif ! #endif /* _POSIX_SOURCE */ ! #ifndef _KERNEL ! #include __BEGIN_DECLS DIR *opendir(const char *); struct dirent *readdir(DIR *); void rewinddir(DIR *); int closedir(DIR *); ! #ifndef _POSIX_SOURCE DIR *__opendir2(const char *, int); - long telldir(const DIR *); - void seekdir(DIR *, long); int scandir(const char *, struct dirent ***, int (*)(struct dirent *), int (*)(const void *, const void *)); int alphasort(const void *, const void *); int getdirentries(int, char *, int, long *) __attribute__ ((__bounded__(__string__,2,3))); ! #endif /* not POSIX */ int readdir_r(DIR *, struct dirent *, struct dirent **); __END_DECLS #endif /* !_KERNEL */ --- 82,117 ---- #define NULL __null #else #define NULL 0L ! #endif /* __GNUG__ */ ! #endif /* !NULL */ ! #else /* !__BSD_VISIBLE */ ! typedef void * DIR; ! #endif /* !__BSD_VISIBLE */ + #ifndef _KERNEL __BEGIN_DECLS DIR *opendir(const char *); struct dirent *readdir(DIR *); void rewinddir(DIR *); int closedir(DIR *); ! #if __BSD_VISIBLE DIR *__opendir2(const char *, int); int scandir(const char *, struct dirent ***, int (*)(struct dirent *), int (*)(const void *, const void *)); int alphasort(const void *, const void *); int getdirentries(int, char *, int, long *) __attribute__ ((__bounded__(__string__,2,3))); ! #endif /* __BSD_VISIBLE */ ! #if __XPG_VISIBLE ! long telldir(const DIR *); ! void seekdir(DIR *, long); ! #endif ! #if __POSIX_VISIBLE >= 199506 || __XPG_VISIBLE >= 500 int readdir_r(DIR *, struct dirent *, struct dirent **); + #endif __END_DECLS #endif /* !_KERNEL */