This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Allow Configure's d_attribut to be set from the command line
[perl5.git] / keywords.pl
index 02f3ff8..b4b048b 100755 (executable)
@@ -1,14 +1,17 @@
 #!/usr/bin/perl
 
-unlink "keywords.h";
+require 'regen_lib.pl';
+safer_unlink ("keywords.h");
 open(KW, ">keywords.h") || die "Can't create keywords.h: $!\n";
+binmode KW;
 select KW;
 
 print <<EOM;
 /*
  *    keywords.h
  *
- *    Copyright (c) 1997-2002, Larry Wall
+ *    Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
+ *    by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -30,6 +33,8 @@ while (<DATA>) {
     print &tab(5, "#define KEY_$keyword"), $keynum++, "\n";
 }
 
+close KW or die "Error closing keywords.h: $!";
+
 ###########################################################################
 sub tab {
     local($l, $t) = @_;
@@ -93,6 +98,7 @@ endpwent
 endservent
 eof
 eq
+err
 eval
 exec
 exists