mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 05:20:06 +00:00
8e96ae1a08
2002-11-04 Ulrich Drepper <drepper@redhat.com> * manual/examples/dir.c: Don't include <stddef.h>. * manual/examples/select.c: Include <errno.h> for TEMP_FAILURE_RETRY. Reported by Frédéric Delanoy <delanoy_f@yahoo.com>. 2002-11-02 H.J. Lu <hjl@gnu.org> * stdio-common/reg-printf.c: Include <stddef.h>.
25 lines
339 B
C
25 lines
339 B
C
/*@group*/
|
|
#include <stdio.h>
|
|
#include <sys/types.h>
|
|
#include <dirent.h>
|
|
/*@end group*/
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
DIR *dp;
|
|
struct dirent *ep;
|
|
|
|
dp = opendir ("./");
|
|
if (dp != NULL)
|
|
{
|
|
while (ep = readdir (dp))
|
|
puts (ep->d_name);
|
|
(void) closedir (dp);
|
|
}
|
|
else
|
|
perror ("Couldn't open the directory");
|
|
|
|
return 0;
|
|
}
|