Loading...
include/dirent.h Libc-262.3.2 Libc-320
--- Libc/Libc-262.3.2/include/dirent.h
+++ Libc/Libc-320/include/dirent.h
@@ -64,6 +64,7 @@
  * The kernel defines the format of directory entries returned by 
  * the getdirentries(2) system call.
  */
+#include <sys/types.h>
 #include <sys/dirent.h>
 
 #ifdef _POSIX_SOURCE
@@ -75,6 +76,8 @@
 /* definitions for library routines operating on directories. */
 #define	DIRBLKSIZ	1024
 
+struct _telldir;		/* see telldir.h */
+
 /* structure describing an open directory. */
 typedef struct _dirdesc {
 	int	dd_fd;		/* file descriptor associated with directory */
@@ -85,6 +88,8 @@
 	long	dd_seek;	/* magic cookie returned by getdirentries */
 	long	dd_rewind;	/* magic cookie for rewinding */
 	int	dd_flags;	/* flags for readdir */
+	pthread_mutex_t	dd_lock; /* for thread locking */
+	struct _telldir *dd_td;	/* telldir position recording */
 } DIR;
 
 #define	dirfd(dirp)	((dirp)->dd_fd)
@@ -106,19 +111,19 @@
 #include <sys/cdefs.h>
 
 __BEGIN_DECLS
-DIR *opendir __P((const char *));
-struct dirent *readdir __P((DIR *));
-void rewinddir __P((DIR *));
-int closedir __P((DIR *));
+DIR *opendir(const char *);
+struct dirent *readdir(DIR *);
+void rewinddir(DIR *);
+int closedir(DIR *);
 #ifndef _POSIX_SOURCE
-DIR *__opendir2 __P((const char *, int));
-long telldir __P((const DIR *));
-void seekdir __P((DIR *, long));
-int scandir __P((const char *, struct dirent ***,
-    int (*)(struct dirent *), int (*)(const void *, const void *)));
-int alphasort __P((const void *, const void *));
-int getdirentries __P((int, char *, int, long *));
-int readdir_r __P((DIR *, struct dirent *, struct dirent **));
+DIR *__opendir2(const char *, int);
+long telldir(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 *);
+int readdir_r(DIR *, struct dirent *, struct dirent **);
 #endif /* not POSIX */
 __END_DECLS