From: Ben Pfaff Date: Tue, 9 Feb 2016 04:48:37 +0000 (-0800) Subject: pintos: Avoid apparent name collision in definition of SIGALRM subroutine. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b39127d9437709ab55ad1ed7ac4fb65245fc57b;p=pintos-anon pintos: Avoid apparent name collision in definition of SIGALRM subroutine. 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. --- diff --git a/src/utils/pintos b/src/utils/pintos index 2ebe642..e460866 100755 --- a/src/utils/pintos +++ b/src/utils/pintos @@ -853,7 +853,7 @@ sub xsystem { 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; @@ -928,7 +928,7 @@ sub exec_setitimer { exit (1); } -sub SIGVTALRM { +sub SIGVTALRM_number { use Config; my $i = 0; foreach my $name (split(' ', $Config{sig_name})) {