glibc/sysdeps/standalone/dirstream.h

44 lines
1.5 KiB
C
Raw Normal View History

/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
1994-10-01 05:50:55 +08:00
1994-10-01 05:51:53 +08:00
#ifndef _DIRSTREAM_H
1994-10-01 05:50:55 +08:00
1994-10-01 05:51:53 +08:00
#define _DIRSTREAM_H 1
1994-10-01 05:50:55 +08:00
#define __need_size_t
#include <stddef.h>
/* Directory stream type.
The miscellaneous Unix `readdir' implementations read directory data
1994-10-01 05:51:53 +08:00
into a buffer and fill in a `struct dirent' copy in the `DIR' object. */
1994-10-01 05:50:55 +08:00
1997-05-21 09:34:06 +08:00
struct __dirstream
1994-10-01 05:50:55 +08:00
{
1994-10-01 05:51:53 +08:00
int __fd; /* File descriptor. */
1994-10-01 05:50:55 +08:00
1994-10-01 05:51:53 +08:00
char *__data; /* Directory block. */
size_t __allocation; /* Space allocated for the block. */
size_t __offset; /* Current offset into the block. */
size_t __size; /* Total valid data in the block. */
1994-10-01 05:50:55 +08:00
1994-10-01 05:51:53 +08:00
struct dirent __entry; /* Returned by `readdir'. */
1997-05-21 09:34:06 +08:00
};
1994-10-01 05:50:55 +08:00
1994-10-01 05:51:53 +08:00
#endif /* dirstream.h */