tools: output include guards in mk-ca-bundle.pl

Commit eff96d3 ("src: add include guards to internal headers") adds
include guards.  Update tools/mk-ca-bundle.pl to output them when
generating src/node_root_certs.h.

PR-URL: https://github.com/nodejs/node/pull/7363
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This commit is contained in:
Ben Noordhuis 2016-06-22 12:11:46 +02:00
Родитель 44981f2a36
Коммит d02d0b9478
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -203,6 +203,7 @@ my $skipnum = 0;
my $start_of_cert = 0;
open(TXT,"$txt") or die "Couldn't open $txt: $!\n";
print CRT "#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS\n";
while (<TXT>) {
if (/\*\*\*\*\* BEGIN LICENSE BLOCK \*\*\*\*\*/) {
print CRT;
@ -310,6 +311,7 @@ while (<TXT>) {
}
}
}
print CRT "#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS\n";
close(TXT) or die "Couldn't close $txt: $!\n";
close(CRT) or die "Couldn't close $crt.~: $!\n";
unless( $stdout ) {