haiku/headers/private/libroot/dirent_private.h
Axel Dörfler 9c5c79ad86 * Made DIR definition private, and moved it into the new dirent_private.h
header.
* Added fields necessary to make it possible to retrieve more than one
  dirent from the underlying file system.
* Unless some app creates a DIR on its own to it to feed readdir(), this
  change should be binary compatible. If we find an application misbehaving,
  we can still make it a GCC4 only thing.
* fs_attr/fs_index/fs_query now all use readdir() directly (as that one
  contains the logic to iterate through a number of dirents in userspace).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26339 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-09 11:16:00 +00:00

23 lines
423 B
C

/*
* Copyright 2008, Axel Dörfler, axeld@pinc-software.de.
* 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 - 2 * sizeof(int))
struct __DIR {
int fd;
short next_entry;
unsigned short entries_left;
struct dirent first_entry;
};
#endif /* DIRENT_PRIVATE_H */