summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2007-06-28 00:08:21 +0000
committerKen Raeburn <raeburn@mit.edu>2007-06-28 00:08:21 +0000
commitb8060f822bfc833f97eb429dead40b8408f2e79f (patch)
tree62982feb584edace19139378ecd008d3010d36ec /src/util
parentb145f6865824119c8c8d3341aac75980b8bae043 (diff)
downloadkrb5-b8060f822bfc833f97eb429dead40b8408f2e79f.tar.gz
krb5-b8060f822bfc833f97eb429dead40b8408f2e79f.tar.xz
krb5-b8060f822bfc833f97eb429dead40b8408f2e79f.zip
Implement S_ISDIR from S_IFMT or _S_IFMT if necessary (e.g., on Windows)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19645 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util')
-rw-r--r--src/util/support/mkstemp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/support/mkstemp.c b/src/util/support/mkstemp.c
index b671c6b56..b68aa4dbd 100644
--- a/src/util/support/mkstemp.c
+++ b/src/util/support/mkstemp.c
@@ -51,6 +51,16 @@ static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93";
#define O_BINARY 0
#endif
+#if !defined S_ISDIR
+#if defined S_IFMT
+#define S_ISDIR(MODE) (((MODE) & S_IFMT) == S_IFDIR)
+#elif defined _S_IFMT
+#define S_ISDIR(MODE) (((MODE) & _S_IFMT) == _S_IFDIR)
+#else
+/* Hope that there's a S_ISDIR function defined. */
+#endif
+#endif
+
static int _gettemp(char *, int *);
int mkstemp(path)