* Added fdopendir() (POSIX).
* Got rid of <dirent_private.h> -- the __DIR structure is private to dirent.c, now. The attribute directory, index directory, and query functions use the the public POSIX API, so does the kernel module code. Those components were not initializing the structure correctly anymore since the introduction of telldir()/seekdir(). +alphabranch git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32819 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+10
-10
@@ -32,16 +32,16 @@ typedef struct __DIR DIR;
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
DIR *opendir(const char *dirname);
|
||||
struct dirent *readdir(DIR *dir);
|
||||
int readdir_r(DIR *dir, struct dirent *entry, struct dirent **_result);
|
||||
int closedir(DIR *dir);
|
||||
void rewinddir(DIR *dir);
|
||||
void seekdir(DIR *dir, long int loc);
|
||||
long int telldir(DIR *);
|
||||
|
||||
/* Non-POSIX extension to get the FD out of the private DIR */
|
||||
int dirfd(const DIR *dir);
|
||||
DIR* fdopendir(int fd);
|
||||
DIR* opendir(const char* dirName);
|
||||
struct dirent* readdir(DIR* dir);
|
||||
int readdir_r(DIR* dir, struct dirent* entry,
|
||||
struct dirent** _result);
|
||||
int closedir(DIR* dir);
|
||||
void rewinddir(DIR* dir);
|
||||
void seekdir(DIR* dir, long int position);
|
||||
long int telldir(DIR* dir);
|
||||
int dirfd(const DIR* dir);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Copyright 2008, Axel Dörfler, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef DIRENT_PRIVATE_H
|
||||
#define DIRENT_PRIVATE_H
|
||||
|
||||
|
||||
#include <dirent.h>
|
||||
|
||||
|
||||
#define DIR_BUFFER_SIZE 4096
|
||||
#define DIRENT_BUFFER_SIZE (DIR_BUFFER_SIZE - offsetof(struct __DIR, first_entry))
|
||||
|
||||
struct __DIR {
|
||||
int fd;
|
||||
short next_entry;
|
||||
unsigned short entries_left;
|
||||
long seek_position;
|
||||
long current_position;
|
||||
struct dirent first_entry;
|
||||
};
|
||||
|
||||
#endif /* DIRENT_PRIVATE_H */
|
||||
Reference in New Issue
Block a user