[prev in list] [next in list] [prev in thread] [next in thread]
List: amanda-hackers
Subject: Re: Locking patch for FreeBSD et al.
From: Alexandre Oliva <oliva () dcc ! unicamp ! br>
Date: 1999-01-20 14:10:50
[Download RAW message or body]
On Jan 13, 1999, Sean Kelly <kelly@plutotech.com> wrote:
> By rearranging the fields, I've gotten Amanda to work reliably for
> several months now. If you don't mind, would you apply the attached
> patch to the source and make it available in future releases of Amanda?
Well, your approach of testing for the BSD definition is not a good
one. The manual of GNU autoconf recommends that one shouldn't test
for versions; the right approach is to test for features. We'd
probably be safe if we left `lock' be zero-initialized, and set up the
fields manually.
For example, you should create a configure test that created a flock
variable and tried to assign 0 to its l_pid field. If it failed to
compile, it means there's no l_pid field in struct flock. Then, you'd
AC_DEFINE(HAVE_FLOCK_PID) or not, depending on the outcome of the
test, and use the value of this define within amflock.c
Would you like give it a try?
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic