Skip to content

Commit

Permalink
Print descriptive error if opening temp file fails
Browse files Browse the repository at this point in the history
  • Loading branch information
dcommander committed Nov 19, 2016
1 parent 4338df4 commit 49d4ba0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gas-preprocessor.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
# by David Conrad
# modifications by D. R. Commander, Copyright (C)2013
# modifications by D. R. Commander, Copyright (C)2013, 2016
# This code is licensed under GPLv2 or later; go to gnu.org to read it
# (not that it much matters for an asm preprocessor)
# usage: set your assembler to be something like "perl gas-preprocessor.pl gcc"
Expand Down Expand Up @@ -387,7 +387,7 @@ sub expand_macros {
} else {
($fh, $filename) = tempfile("gas-preprocessor-tmp-XXXXXX", SUFFIX => '.S',
TMPDIR => 1, UNLINK => 1);
open(ASMFILE, ">" . $filename) or die "Error running assembler";
open(ASMFILE, ">" . $filename) or die "Error creating temporary file: $!";
}

my @sections;
Expand Down

0 comments on commit 49d4ba0

Please sign in to comment.