diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-09-09 09:43:16 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-09-09 09:43:16 -0700 |
commit | d4ca24338b944a0334deba8eb65a2621f2bc6afd (patch) | |
tree | eb00dd33ef5202de6af6fafaca6235f69c233151 | |
parent | c357381da4b63eb50f5e133066fb72838b4b6ddf (diff) | |
download | nasm-d4ca24338b944a0334deba8eb65a2621f2bc6afd.tar.gz |
macros.pl: be a bit more careful with open()
Be a bit more strict with open() calls.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rwxr-xr-x | macros.pl | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -37,7 +37,7 @@ sub charcify(@) { # # Generate macros.c # -open(OUT,">macros.c") or die "unable to open macros.c\n"; +open(OUT,"> macros.c\0") or die "unable to open macros.c\n"; print OUT "/*\n"; print OUT " * Do not edit - this file auto-generated by macros.pl from:\n"; @@ -60,7 +60,7 @@ my $lastname; my $z; foreach $fname ( @ARGV ) { - open(INPUT,$fname) or die "unable to open $fname\n"; + open(INPUT,"< $fname\0") or die "$0: $fname: $!\n"; while (<INPUT>) { $line++; chomp; |