From f18b6e207b953749cd9822941e0c8884669e5622 Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Thu, 25 Jul 1996 22:48:07 +0000 Subject: [PATCH] Include definition of S_ISLNK() for systems that lack. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@610 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/ftp/common/glob.c | 5 +++++ lib/roken/glob.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/appl/ftp/common/glob.c b/appl/ftp/common/glob.c index c1ad6762c..1b4d51585 100644 --- a/appl/ftp/common/glob.c +++ b/appl/ftp/common/glob.c @@ -494,6 +494,11 @@ glob1(Char *pattern, glob_t *pglob) * of recursion for each segment in the pattern that contains one or more * meta characters. */ + +#if !defined(S_ISLNK) && defined(S_IFLNK) && defined(S_IFMT) +#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK) +#endif + static int glob2(Char *pathbuf, Char *pathend, Char *pattern, glob_t *pglob) { diff --git a/lib/roken/glob.c b/lib/roken/glob.c index c1ad6762c..1b4d51585 100644 --- a/lib/roken/glob.c +++ b/lib/roken/glob.c @@ -494,6 +494,11 @@ glob1(Char *pattern, glob_t *pglob) * of recursion for each segment in the pattern that contains one or more * meta characters. */ + +#if !defined(S_ISLNK) && defined(S_IFLNK) && defined(S_IFMT) +#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK) +#endif + static int glob2(Char *pathbuf, Char *pathend, Char *pattern, glob_t *pglob) {