summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-03-19 03:12:25 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-03-19 03:12:25 +0000
commit03017ba638e7de9f3b9e659d2202a018d9918919 (patch)
tree3f7c7d20b6bf231f0aeed877c66eaf9eb844478d
parent8feff4542e7ed50ca698e8f24490d140c655d6c3 (diff)
- (bal) NeXTStep lacks S_ISLNK. Plus split up S_IS*
-rw-r--r--ChangeLog3
-rw-r--r--defines.h11
-rw-r--r--openbsd-compat/realpath.c7
3 files changed, 11 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index d7b6ede3..e09afd65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@
- (bal) Use 'NGROUPS' for NeXT Since 'MAX_NGROUPS' is wrapped up in -lposix
stuff. Change suggested by Mark Miller <markm@swoon.net>
- (bal) Small fix to scp. %lu vs %ld
+ - (bal) NeXTStep lacks S_ISLNK. Plus split up S_IS*
20010318
- (bal) Fixed scp type casing issue which causes "scp: protocol error:
@@ -4611,4 +4612,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.978 2001/03/19 03:09:40 mouring Exp $
+$Id: ChangeLog,v 1.979 2001/03/19 03:12:25 mouring Exp $
diff --git a/defines.h b/defines.h
index 9d58db38..29c46a62 100644
--- a/defines.h
+++ b/defines.h
@@ -1,7 +1,7 @@
#ifndef _DEFINES_H
#define _DEFINES_H
-/* $Id: defines.h,v 1.59 2001/03/19 02:27:26 tim Exp $ */
+/* $Id: defines.h,v 1.60 2001/03/19 03:12:26 mouring Exp $ */
/* Some platforms need this for the _r() functions */
#if !defined(_REENTRANT) && !defined(SNI)
@@ -99,11 +99,18 @@ enum
# define O_NONBLOCK 00004
#endif
-#ifndef S_ISREG
+#ifndef S_ISDIR
# define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR))
+#endif /* S_ISDIR */
+
+#ifndef S_ISREG
# define S_ISREG(mode) (((mode) & (_S_IFMT)) == (_S_IFREG))
#endif /* S_ISREG */
+#ifndef S_ISLNK
+# define S_ISLNK(mode) (((mode) & (_S_IFMT)) == (_S_IFLNK))
+#endif /* S_ISLNK */
+
#ifndef S_IXUSR
# define S_IXUSR 0000100 /* execute/search permission, */
# define S_IXGRP 0000010 /* execute/search permission, */
diff --git a/openbsd-compat/realpath.c b/openbsd-compat/realpath.c
index baf17f1a..fbe2a9c2 100644
--- a/openbsd-compat/realpath.c
+++ b/openbsd-compat/realpath.c
@@ -45,13 +45,6 @@ static char *rcsid = "$OpenBSD: realpath..c,v 1.4 1998/05/18 09:55:19 deraadt Ex
#include <unistd.h>
/*
- * S_ISLNK compatibility
- */
-#ifndef S_ISLNK
-#define S_ISLNK(m) ((m & 0170000) == 0120000)
-#endif
-
-/*
* MAXSYMLINKS
*/
#ifndef MAXSYMLINKS