From: Theodore Tso Date: Fri, 7 Oct 1994 17:24:08 +0000 (+0000) Subject: Use POSIX_FILE_LOCKS if _POSIX_VERSION in unistd.h X-Git-Tag: krb5-1.0-beta5~1147 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=764bbd32eaea6417295279d2da9cf947afc500b5;p=krb5.git 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 --- 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