Use POSIX_FILE_LOCKS if _POSIX_VERSION is defined.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4482
dc483132-0cff-0310-8789-
dd5450dbe970
+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):
WITH_CCOPTS
AC_SET_BUILDTOP
CONFIG_RULES
+AC_HAVE_HEADERS(unistd.h)
SubdirLibraryRule([${OBJS}])
KRB_INCLUDE
AC_OUTPUT(Makefile,[EXTRA_RULES])
* 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>
#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>