diff options
author | Jim Meyering <jim@meyering.net> | 2003-03-19 19:33:12 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-03-19 19:33:12 +0000 |
commit | c8e3afa388395a1c4140de682e0c8fd78497876a (patch) | |
tree | e3af3aefc9f7885eb4723f0d89cd9916cad5a331 /lib | |
parent | 04ac96ed14d3b24600359564965048957f36b180 (diff) | |
download | coreutils-c8e3afa388395a1c4140de682e0c8fd78497876a.tar.xz |
DJGPP doesn't have S_ISLNK, so provide a replacement.
(S_IFMT): Define, if necessary.
[STAT_MACROS_BROKEN]: Undefine S_ISLNK.
(S_ISLNK): Define, if necessary.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ftw.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -157,6 +157,22 @@ int rpl_lstat (const char *, struct stat *); # define PATH_MAX 1024 #endif +#ifndef S_IFMT +# define S_IFMT 0170000 +#endif + +#if STAT_MACROS_BROKEN +# undef S_ISLNK +#endif + +#ifndef S_ISLNK +# ifdef S_IFLNK +# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) +# else +# define S_ISLNK(m) 0 +# endif +#endif + struct dir_data { DIR *stream; |