Without this patch, modern versions of Perl issue the following warnings:
Prototype mismatch: sub main::SIGVTALRM () vs none at
.../src/utils/pintos line 188.
Constant subroutine SIGVTALRM redefined at
.../src/utils/pintos line 180.
Changing the name of the function avoids the warning.
Thanks to Geoffrey Knopf for reporting this problem.
alarm (0);
&$cleanup ();
- if (WIFSIGNALED ($?) && WTERMSIG ($?) == SIGVTALRM ()) {
+ if (WIFSIGNALED ($?) && WTERMSIG ($?) == SIGVTALRM_number ()) {
seek (STDOUT, 0, 2);
print "\nTIMEOUT after $timeout seconds of host CPU time\n";
exit 0;
exit (1);
}
-sub SIGVTALRM {
+sub SIGVTALRM_number {
use Config;
my $i = 0;
foreach my $name (split(' ', $Config{sig_name})) {