]> git.sur5r.net Git - openldap/commitdiff
If we are using lutil_lock functions then define NEED_SIMPLE_LOCKING or
authorBen Collins <bcollins@openldap.org>
Sun, 28 Mar 1999 18:07:44 +0000 (18:07 +0000)
committerBen Collins <bcollins@openldap.org>
Sun, 28 Mar 1999 18:07:44 +0000 (18:07 +0000)
liblutil/lockf.c wont be compiled.

include/ac/unistd.h
libraries/liblutil/lockf.c

index 0162d49ca468876490e72aaa79858fd01be10da1..e5b3eb3300b2ebc2a3d26e5c619ee3529de1bc1a 100644 (file)
@@ -85,6 +85,7 @@ extern char* getpass LDAP_P((const char *getpass));
 
 #if !defined( ldap_lockf )
        /* use some simplistic locking method */
+#      define NEED_SIMPLE_LOCKING
 #      include <lutil_lockf.h>
 #      define ldap_lockf(x)    lutil_lockf(x)
 #      define ldap_unlockf(x)  lutil_unlockf(x)
index 7307720dd68744af161365b245c2762fb73e092b..13226bbf590471e6ef9fea5dd1ca97b75e2d8c29 100644 (file)
@@ -7,14 +7,14 @@
  * license is available at http://www.OpenLDAP.org/license.html or
  * in file LICENSE in the top-level directory of the distribution.
  */
-/* File locking methods */
+/* Simple file locking method for systems without */
 
 #include "portable.h"
 
 #include <stdio.h>
 #include <ac/unistd.h>
 
-#if defined(NEED_FCNTL_LOCKING)
+#ifdef NEED_SIMPLE_LOCKING
 
 int lutil_lockf ( FILE *fp ) {
        struct flock file_lock;
@@ -36,4 +36,4 @@ int lutil_unlockf ( FILE *fp ) {
        return ( fcntl( fileno(fp), F_SETLK, &file_lock ) );
 }
 
-#endif /* !HAVE_FILE_LOCKING */
+#endif /* NEED_SIMPLE_LOCKING */