From 764bbd32eaea6417295279d2da9cf947afc500b5 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Fri, 7 Oct 1994 17:24:08 +0000 Subject: [PATCH] Use POSIX_FILE_LOCKS if _POSIX_VERSION in unistd.h git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4480 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 5 +++++ src/lib/krb5/os/lock_file.c | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 57b52ae3d..e6c36ad0a 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,8 @@ +Fri Oct 7 13:23:18 1994 Theodore Y. Ts'o (tytso@dcl) + + * lock_file.c: Use POSIX_FILE_LOCKS if _POSIX_VERSION is defined + in unistd.h + Thu Sep 22 20:46:08 1994 Theodore Y. Ts'o (tytso@dcl) * configure.in: Put in correct dependency order of configure.in diff --git a/src/lib/krb5/os/lock_file.c b/src/lib/krb5/os/lock_file.c index 0b865e9e7..6ad5bc0f6 100644 --- a/src/lib/krb5/os/lock_file.c +++ b/src/lib/krb5/os/lock_file.c @@ -30,8 +30,17 @@ #include -/* POSIX_* are auto-magically defined in at source - configuration time. */ +#if HAVE_UNISTD_H +#include +#include +#endif + +#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 #include -- 2.26.2