summaryrefslogtreecommitdiff
path: root/regen/regcharclass.pl
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-08-31 17:41:14 -0600
committerKarl Williamson <public@khwilliamson.com>2012-09-13 21:14:00 -0600
commitd10c72f2acc0f7f1905e3ae965e6125449e9e851 (patch)
treeb548ca223928062c065c48768ab55b6734c4e8df /regen/regcharclass.pl
parentc865229611785bcce1879977411c34e80d36659a (diff)
downloadperl-d10c72f2acc0f7f1905e3ae965e6125449e9e851.tar.gz
/regcharclass.pl, utf8_strings.pl: Add guard to .h
Future commits will have other headers #include the headers generated by these programs. It is best to guard against the preprocessor from trying to process these twice
Diffstat (limited to 'regen/regcharclass.pl')
-rwxr-xr-xregen/regcharclass.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/regen/regcharclass.pl b/regen/regcharclass.pl
index faf1572b7c..bcd5ebf8d5 100755
--- a/regen/regcharclass.pl
+++ b/regen/regcharclass.pl
@@ -626,6 +626,7 @@ if ( !caller ) {
print $out_fh read_only_top( lang => 'C', by => $0,
file => 'regcharclass.h', style => '*',
copyright => [2007, 2011] );
+ print $out_fh "\n#ifndef H_REGCHARCLASS /* Guard against nested #includes */\n#define H_REGCHARCLASS 1\n\n";
my ( $op, $title, @txt, @types, @mods );
my $doit= sub {
@@ -668,6 +669,9 @@ if ( !caller ) {
}
}
$doit->();
+
+ print $out_fh "\n#endif /* H_REGCHARCLASS */\n";
+
if($path eq '-') {
print $out_fh "/* ex: set ro: */\n";
} else {