]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/Autom4te/XFile.pm (lock, truncate): Do not pass @_ to flock
authorAlexandre Duret-Lutz <adl@gnu.org>
Wed, 7 May 2003 06:51:23 +0000 (06:51 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Wed, 7 May 2003 06:51:23 +0000 (06:51 +0000)
and truncate.

ChangeLog
lib/Autom4te/XFile.pm

index a7ce67bafb8c6e6cca2a65242e024006dcfa8a11..982d658d0f731ce493f6f2e6743eb695c57924a3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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
index abc75e5bb49fa2530bc60bfc94ed287c98c144d6..1009ee6d96e63bc8ef006bcd9fe609d3fb3372d5 100644 (file)
@@ -210,12 +210,12 @@ sub name
 
 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";
     }
 }
 
@@ -240,11 +240,11 @@ sub seek
 
 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";
     }
 }