about summary refs log tree commit diff
path: root/io/ftw.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-02-13 22:17:17 +0000
committerUlrich Drepper <drepper@redhat.com>2001-02-13 22:17:17 +0000
commit2958e6cc5f39ac2487b4fcbc2db48462a34ce23d (patch)
tree6a55d2abeae2e9ba1b5412c591743fdd733832ab /io/ftw.c
parentf1a26a85046fa11da2ea51aa6d4edfbfc8549c39 (diff)
downloadglibc-2958e6cc5f39ac2487b4fcbc2db48462a34ce23d.tar.gz
glibc-2958e6cc5f39ac2487b4fcbc2db48462a34ce23d.tar.xz
glibc-2958e6cc5f39ac2487b4fcbc2db48462a34ce23d.zip
Update.
	* io/ftw.c: Always use readdir64.
	* io/ftw64.c: Likewise.
	* sysdeps/unix/sysv/linux/ttyname.c: Likewise.
	* sysdeps/unix/sysv/linux/ttyname_r.c: Likewise.
	* sysdeps/generic/glob.c: Likewise.  Convert results if gl_readdir
	callback to dirent.  Still allow compiling outside glibc.
	* sysdeps/gnu/glob64.c: Define COMPILE_GLOB64.
	* sysdeps/unix/sysv/linux/i386/glob64.c: Likewise.

	* malloc/mtrace.c: Use fopen64.
	* posix/spawni.c: Use __open64.
	* sysdeps/unix/opendir.c: Likewise.
	* sysdeps/unix/sysv/linux/gethostid.c: Likewise.

	* sysdeps/generic/ftruncate64.c: Define __ftruncate64 and make old
	name a weak alias.
	* sysdeps/unix/sysv/aix/ftruncate64.c: Likewise.
	* sysdeps/unix/sysv/linux/ftruncate64.c: Likewise.
	* sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/ftruncate64.c: Likewise.

	* resolv/res_data.c: Add cast to avoid warning.

	* include/unistd.h: Declare __ftruncate64.

	* sysdeps/generic/utmp_file.c: Use LFS functions and type.
Diffstat (limited to 'io/ftw.c')
-rw-r--r--io/ftw.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/io/ftw.c b/io/ftw.c
index dc02ebf205..3635cba681 100644
--- a/io/ftw.c
+++ b/io/ftw.c
@@ -37,8 +37,6 @@
 # define NFTW_NAME nftw
 # define INO_T ino_t
 # define STAT stat
-# define DIRENT dirent
-# define READDIR __readdir
 # define LXSTAT __lxstat
 # define XSTAT __xstat
 # define FTW_FUNC_T __ftw_func_t
@@ -163,10 +161,10 @@ open_dir_stream (struct ftw_data *data, struct dir_data *dirp)
       else
 	{
 	  DIR *st = data->dirstreams[data->actdir]->stream;
-	  struct DIRENT *d;
+	  struct dirent64 *d;
 	  size_t actsize = 0;
 
-	  while ((d = READDIR (st)) != NULL)
+	  while ((d = __readdir64 (st)) != NULL)
 	    {
 	      size_t this_len = _D_EXACT_NAMLEN (d);
 	      if (actsize + this_len + 2 >= bufsize)
@@ -340,7 +338,7 @@ internal_function
 ftw_dir (struct ftw_data *data, struct STAT *st)
 {
   struct dir_data dir;
-  struct DIRENT *d;
+  struct dirent64 *d;
   int previous_base = data->ftw.base;
   int result;
   char *startp;
@@ -402,7 +400,7 @@ ftw_dir (struct ftw_data *data, struct STAT *st)
     *startp++ = '/';
   data->ftw.base = startp - data->dirbuf;
 
-  while (dir.stream != NULL && (d = READDIR (dir.stream)) != NULL)
+  while (dir.stream != NULL && (d = __readdir64 (dir.stream)) != NULL)
     {
       result = process_entry (data, &dir, d->d_name, _D_EXACT_NAMLEN (d));
       if (result != 0)