diff options
author | Jim Meyering <jim@meyering.net> | 2004-07-06 17:00:36 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-07-06 17:00:36 +0000 |
commit | 2b19667f166e123ecf5bd5060f7d0341fb3b667f (patch) | |
tree | 8d9865c731bb2288ef86f04ea5f51097de82dab3 /lib | |
parent | 260a2f0a479740db122693e41ed4fb8fa6505f18 (diff) | |
download | coreutils-2b19667f166e123ecf5bd5060f7d0341fb3b667f.tar.xz |
Include "stat-macros.h".
(canonicalize_filename_mode): Remove #ifdef S_ISLNK, now that
S_ISLNK is guaranteed to be defined (via stat-macros.h).
Diffstat (limited to 'lib')
-rw-r--r-- | lib/canonicalize.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/canonicalize.c b/lib/canonicalize.c index c63c8a5d8..d02279d4f 100644 --- a/lib/canonicalize.c +++ b/lib/canonicalize.c @@ -45,6 +45,7 @@ void free (); #include <errno.h> #include "path-concat.h" +#include "stat-macros.h" #include "xalloc.h" #include "xgetcwd.h" @@ -258,7 +259,6 @@ canonicalize_filename_mode (const char *name, canonicalize_mode_t can_mode) st.st_mode = 0; } -# ifdef S_ISLNK if (S_ISLNK (st.st_mode)) do { char *buf; @@ -313,11 +313,12 @@ canonicalize_filename_mode (const char *name, canonicalize_mode_t can_mode) free (buf); } while (0); else -# endif /* S_ISLNK */ - if (!S_ISDIR (st.st_mode) && *end && (can_mode != CAN_MISSING)) { - errno = ENOTDIR; - goto error; + if (!S_ISDIR (st.st_mode) && *end && (can_mode != CAN_MISSING)) + { + errno = ENOTDIR; + goto error; + } } } } |