From cbb2240d13b4d89dcc679e35396de62d0d8a4b81 Mon Sep 17 00:00:00 2001 From: didg Date: Sun, 26 Oct 2003 10:33:37 +0000 Subject: [PATCH] configure option for fcntl locking --- configure.in | 10 +++++++++- libatalk/adouble/ad_lock.c | 6 +++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index dd09973c..0c595028 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.179.2.3.2.7 2003-10-17 00:01:10 didg Exp $ +dnl $Id: configure.in,v 1.179.2.3.2.8 2003-10-26 10:33:37 didg Exp $ dnl configure.in for netatalk AC_INIT(bin/adv1tov2/adv1tov2.c) @@ -517,6 +517,14 @@ AC_ARG_ENABLE(shell-check, fi ) +AC_ARG_ENABLE(locking, + [ --disable-locking disable system locking], + if test "$enableval" = "no"; then + AC_DEFINE(DISABLE_LOCKING, 1, [Define if system (fcntl) locking should be disabled]) + AC_MSG_RESULT([disabling system locking]) + fi +) + #AC_ARG_WITH(tcp-wrappers, # [ --with-tcp-wrappers enable TCP wrappers support],[ # AC_CHECK_HEADERS(tcpd.h) diff --git a/libatalk/adouble/ad_lock.c b/libatalk/adouble/ad_lock.c index 8222500b..e0b635e2 100644 --- a/libatalk/adouble/ad_lock.c +++ b/libatalk/adouble/ad_lock.c @@ -1,5 +1,5 @@ /* - * $Id: ad_lock.c,v 1.11 2003-02-16 12:35:05 didg Exp $ + * $Id: ad_lock.c,v 1.11.6.1 2003-10-26 10:33:37 didg Exp $ * * Copyright (c) 1998,1999 Adrian Sun (asun@zoology.washington.edu) * All Rights Reserved. See COPYRIGHT for more information. @@ -40,6 +40,10 @@ ((type) == ADLOCK_WR ? LOCK_EX : \ ((type) == ADLOCK_CLR ? LOCK_UN : -1))) +#ifdef DISABLE_LOCKING +#define fcntl(a, b, c ) (0) +#endif + /* ----------------------- */ static int XLATE_FCNTL_LOCK(int type) { -- 2.39.2