[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: yellowTAB Zeta and autoconf 2.59

From: Paul Eggert
Subject: Re: yellowTAB Zeta and autoconf 2.59
Date: 11 Mar 2004 16:02:06 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

"Mika T. Lindqvist" <address@hidden> writes:

> > "Mika T. Lindqvist" <address@hidden> writes:
> > 
> > > The flock() function is unimplemented at /boot/develop/tools/gnupro
> > > /
> > > share/autoconf/Autom4te/XFile.pm line 229.
> > 
> > Your bug report is a bit terse, but it sounds a bit like this one:
> I think the error was/is caused because BeOS doesn't have any of the 
> possible 3 implementations for flock(), not because one of them fails.

Yes, that sounds right.  But since I don't have BeOS, I don't know
what flock does on that host.  That is, what change needs to be done
so that the following code does the right thing on BeOS, and we ignore
the failure on systems where flock isn't supported at all?  Can you
please modify your copy of XFile.pm, test your change, and then email
the patch to bug-autoconf?  Thanks.

sub lock
  my ($fh, $mode) = @_;
  # Cannot use @_ here.

  # On some systems (e.g. GNU/Linux with NFSv2), flock(2) does not work over
  # NFS, but Perl prefers that over fcntl(2) if it exists and if
  # perl was not built with -Ud_flock.  Normally, this problem is harmless,
  # so ignore the ENOLCK errors that are reported in that situation,
  # However, if the invoker is using "make -j", the problem is not harmless,
  # so report it in that case, by inspecting MAKEFLAGS and looking for
  # any arguments indicating that the invoker used -j.
  # Admittedly this is a bit of a hack.
  if (!flock ($fh, $mode)
      && (!$!{ENOLCK}
          || " -$ENV{'MAKEFLAGS'}" =~ / (-[BdeikrRsSw]*j|---?jobs)/))
      my $file = $fh->name;
      fatal "cannot lock $file with mode $mode (perhaps you are running make -j 
on a lame NFS client?): $!";

reply via email to

[Prev in Thread] Current Thread [Next in Thread]