diff options
author | Jim Meyering <jim@meyering.net> | 2003-02-08 18:19:57 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-02-08 18:19:57 +0000 |
commit | 5c13851e62eaf01fa69985668085529b62f1521b (patch) | |
tree | c9d08570543a7303644a1e7695f91f33efa5c3b0 /lib | |
parent | f3e0faa64c06b4d89952781bfe0d05824c53d50a (diff) | |
download | coreutils-5c13851e62eaf01fa69985668085529b62f1521b.tar.xz |
(ftw_startup): Don't shadow outer declaration of save_err.
Merge inconsequential changes from libc.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ftw.c | 25 |
1 files changed, 11 insertions, 14 deletions
@@ -38,9 +38,9 @@ char *alloca (); #if defined _LIBC # include <dirent.h> -# define NAMLEN(dirent) _D_EXACT_NAMLEN(dirent) +# define NAMLEN(dirent) _D_EXACT_NAMLEN (dirent) #else -# if HAVE_DIRENT_H || defined _LIBC +# if HAVE_DIRENT_H # include <dirent.h> # define NAMLEN(dirent) strlen ((dirent)->d_name) # else @@ -93,20 +93,23 @@ char *stpcpy (); # define __closedir closedir # undef __fchdir # define __fchdir fchdir +# undef __getcwd +# define __getcwd(P, N) xgetcwd () +extern char *xgetcwd (void); +# undef __mempcpy +# define __mempcpy mempcpy # undef __opendir # define __opendir opendir # undef __readdir64 # define __readdir64 readdir +# undef __stpcpy +# define __stpcpy stpcpy # undef __tdestroy # define __tdestroy tdestroy # undef __tfind # define __tfind tfind # undef __tsearch # define __tsearch tsearch -# undef __stpcpy -# define __stpcpy stpcpy -# undef __mempcpy -# define __mempcpy mempcpy # undef internal_function # define internal_function /* empty */ # undef dirent64 @@ -115,12 +118,6 @@ char *stpcpy (); # define MAX(a, b) ((a) > (b) ? (a) : (b)) #endif -#ifndef _LIBC -# undef __getcwd -# define __getcwd(P, N) xgetcwd () -extern char *xgetcwd (void); -#endif - /* Arrange to make lstat calls go through the wrapper function on systems with an lstat function that does not dereference symlinks that are specified with a trailing slash. */ @@ -430,7 +427,7 @@ process_entry (struct ftw_data *data, struct dir_data *dir, const char *name, if (result == 0 && (data->flags & FTW_CHDIR)) { - /* Change back to parent directory. */ + /* Change back to the parent directory. */ int done = 0; if (dir->stream != NULL) if (__fchdir (dirfd (dir->stream)) == 0) @@ -773,7 +770,7 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors, /* Return to the start directory (if necessary). */ if (cwd != NULL) { - int save_err = errno; + save_err = errno; __chdir (cwd); free (cwd); __set_errno (save_err); |