summaryrefslogtreecommitdiff
path: root/ext/Errno
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Errno')
-rw-r--r--ext/Errno/Errno_pm.PL4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 49e6a66ae6..424f0f3b4c 100644
--- a/ext/Errno/Errno_pm.PL
+++ b/ext/Errno/Errno_pm.PL
@@ -13,7 +13,8 @@ my $IsSymbian = exists $ENV{SDK} && -d "$ENV{SDK}\\epoc32";
my $IsMSWin32 = $^O eq 'MSWin32' && !$IsSymbian;
unlink "Errno.pm" if -f "Errno.pm";
-open OUT, ">Errno.pm" or die "Cannot open Errno.pm: $!";
+unlink "Errno.tmp" if -f "Errno.tmp";
+open OUT, ">Errno.tmp" or die "Cannot open Errno.tmp: $!";
select OUT;
my $file;
my @files = get_files();
@@ -39,6 +40,7 @@ else {
}
write_errno_pm();
unlink "errno.c" if -f "errno.c";
+rename "Errno.tmp", "Errno.pm" or die "Cannot rename Errno.tmp to Errno.pm: $!";
sub process_file {
my($file) = @_;