mirror of
				https://sourceware.org/git/glibc.git
				synced 2025-10-30 10:45:40 +03:00 
			
		
		
		
	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 Frdric 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;
 | |
| }
 |