+2003-05-07 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * lib/Autom4te/XFile.pm (lock, truncate): Do not pass @_ to flock
+ and truncate.
+
2003-05-06 Akim Demaille <akim@epita.fr>
Don't try to be smart with aclocal 1.8+ because (i) aclocal no
sub lock
{
- use Fcntl qw(:DEFAULT :flock);
- my ($fh) = shift;
- if (!flock ($fh, @_))
+ my ($fh, $mode) = @_;
+ # Cannot use @_ here.
+ if (!flock ($fh, $mode))
{
my $file = $fh->name;
- croak "$me: cannot lock $file with @_: $!\n";
+ croak "$me: cannot lock $file with mode $mode: $!\n";
}
}
sub truncate
{
- my ($fh) = shift;
- if (!truncate ($fh, @_))
+ my ($fh, $len) = @_;
+ if (!truncate ($fh, $len))
{
my $file = $fh->name;
- croak "$me: cannot truncate $file with @_: $!\n";
+ croak "$me: cannot truncate $file at $len: $!\n";
}
}