diff options
author | Jim Meyering <jim@meyering.net> | 1999-12-19 10:23:26 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-12-19 10:23:26 +0000 |
commit | 3d58863d57a3eaf288309f85155a1968d0718aa2 (patch) | |
tree | e10c69497476669cece3b0f84f51fab85e284e5f /src | |
parent | a5959989759307a7acd2321aa807217aae3cd12c (diff) | |
download | coreutils-3d58863d57a3eaf288309f85155a1968d0718aa2.tar.xz |
[! LSTAT_FOLLOWS_SLASHED_SYMLINK]: Use lstat wrapper.
[Notice the new test in m4/lstat-slash.m4. ]
(main): Back out change from 1999-02-19 that made ls remove
trailing slashes from command line arguments to accommodate early
versions of Linux. Now, `ls symlink-to-dir/' acts like
`ls symlink-to-dir/.' thus following the symbolic link, as POSIX says
it should. Suggestion from Bruno Haible and Andreas Schwab.
Diffstat (limited to 'src')
-rw-r--r-- | src/ls.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -143,6 +143,15 @@ # define S_ISDOOR(Mode) 0 #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. */ +#if ! LSTAT_FOLLOWS_SLASHED_SYMLINK +int rpl_lstat PARAMS((const char *, struct stat *)); +# undef lstat +# define lstat(Name, Stat_buf) rpl_lstat(Name, Stat_buf) +#endif + enum filetype { symbolic_link, @@ -202,7 +211,6 @@ time_t time (); char *getgroup (); char *getuser (); -void strip_trailing_slashes (); static size_t quote_name PARAMS ((FILE *out, const char *name, struct quoting_options const *options)); @@ -796,7 +804,6 @@ main (int argc, char **argv) dir_defaulted = 0; for (; i < argc; i++) { - strip_trailing_slashes (argv[i]); gobble_file (argv[i], 1, ""); } |