summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1994-10-07 18:21:02 +0000
committerTheodore Tso <tytso@mit.edu>1994-10-07 18:21:02 +0000
commit730151273020b6fd7262e34ad323c017a30951c8 (patch)
tree7956a36fb44a54356e3c3c1141efbf461269f59b /src
parent3476ff9134446dbcdd0ae80c8ce99d10ec944e97 (diff)
downloadkrb5-730151273020b6fd7262e34ad323c017a30951c8.tar.gz
krb5-730151273020b6fd7262e34ad323c017a30951c8.tar.xz
krb5-730151273020b6fd7262e34ad323c017a30951c8.zip
Include unistd.h if it is present
Use POSIX_FILE_LOCKS if _POSIX_VERSION is defined. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4482 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/lib/krb5/ccache/file/ChangeLog5
-rw-r--r--src/lib/krb5/ccache/file/configure.in1
-rw-r--r--src/lib/krb5/ccache/file/fcc_maybe.c11
3 files changed, 16 insertions, 1 deletions
diff --git a/src/lib/krb5/ccache/file/ChangeLog b/src/lib/krb5/ccache/file/ChangeLog
index eeacb9dd8..219f21b47 100644
--- a/src/lib/krb5/ccache/file/ChangeLog
+++ b/src/lib/krb5/ccache/file/ChangeLog
@@ -1,3 +1,8 @@
+Fri Oct 7 14:18:44 1994 Theodore Y. Ts'o (tytso@dcl)
+
+ * configure.in: Add test for unistd.h
+ * fcc_maybe.c: Use POSIX_FILE_LOCKS if _POSIX_VERSION is defined.
+
Fri Sep 30 21:54:20 1994 Theodore Y. Ts'o (tytso@dcl)
* fcc_defops.c (krb5_cc_file_ops):
diff --git a/src/lib/krb5/ccache/file/configure.in b/src/lib/krb5/ccache/file/configure.in
index 52832f2ac..c272628cc 100644
--- a/src/lib/krb5/ccache/file/configure.in
+++ b/src/lib/krb5/ccache/file/configure.in
@@ -2,6 +2,7 @@ AC_INIT(configure.in)
WITH_CCOPTS
AC_SET_BUILDTOP
CONFIG_RULES
+AC_HAVE_HEADERS(unistd.h)
SubdirLibraryRule([${OBJS}])
KRB_INCLUDE
AC_OUTPUT(Makefile,[EXTRA_RULES])
diff --git a/src/lib/krb5/ccache/file/fcc_maybe.c b/src/lib/krb5/ccache/file/fcc_maybe.c
index 0de6b206a..f60f20fc8 100644
--- a/src/lib/krb5/ccache/file/fcc_maybe.c
+++ b/src/lib/krb5/ccache/file/fcc_maybe.c
@@ -24,7 +24,10 @@
* This file contains the source code for conditional open/close calls.
*/
-
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include "fcc.h"
#include <errno.h>
#include <krb5/osconf.h>
@@ -41,6 +44,12 @@ int krb5_fcc_default_format = KRB5_FCC_DEFAULT_FVNO;
#include <krb5/los-proto.h>
#include <stdio.h>
+#ifdef _POSIX_VERSION
+ /* Is there a better way to decide whether or not we should use flock */
+ /* vs. fcntl. Example: broken SunOS tmpfs.... */
+#define POSIX_FILE_LOCKS
+#endif
+
#ifdef POSIX_FILE_LOCKS
#ifndef unicos61
#include <fcntl.h>