From: Rafael Garcia-Suarez Date: Tue, 3 May 2005 15:43:34 +0000 (+0000) Subject: Fix getting prototype of builtins mkdir and setpgrp. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bdf1bb36db75d3871fd8ac7ace0bba5fcfb86259;p=p5sagit%2Fp5-mst-13.2.git Fix getting prototype of builtins mkdir and setpgrp. Hardcode special exceptions for exec and system, instead of trying to be clever and failing. p4raw-id: //depot/perl@24380 --- diff --git a/opcode.h b/opcode.h index 8161c70..8c85157 100644 --- a/opcode.h +++ b/opcode.h @@ -2,7 +2,7 @@ * opcode.h * * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, - * 2000, 2001, 2002, 2003, 2004, by Larry Wall and others + * 2000, 2001, 2002, 2003, 2004, 2005 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. diff --git a/opcode.pl b/opcode.pl index cef6e0c..bda960d 100755 --- a/opcode.pl +++ b/opcode.pl @@ -41,7 +41,7 @@ print <<"END"; * opcode.h * * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, - * 2000, 2001, 2002, 2003, 2004, by Larry Wall and others + * 2000, 2001, 2002, 2003, 2004, 2005 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. diff --git a/pp.c b/pp.c index 2ba5b61..fa32601 100644 --- a/pp.c +++ b/pp.c @@ -388,7 +388,8 @@ PP(pp_prototype) I32 oa; char str[ MAX_ARGS_OP * 2 + 2 ]; /* One ';', one '\0' */ - if (code == -KEY_chop || code == -KEY_chomp) + if (code == -KEY_chop || code == -KEY_chomp + || code == -KEY_exec || code == -KEY_system) goto set; while (i < MAXO) { /* The slow way. */ if (strEQ(s + 6, PL_op_name[i]) @@ -406,8 +407,6 @@ PP(pp_prototype) seen_question = 1; str[n++] = ';'; } - else if (n && str[0] == ';' && seen_question) - goto set; /* XXXX system, exec */ if ((oa & (OA_OPTIONAL - 1)) >= OA_AVREF && (oa & (OA_OPTIONAL - 1)) <= OA_SCALARREF /* But globs are already references (kinda) */ diff --git a/t/op/cproto.t b/t/op/cproto.t index a50a851..d37118e 100644 --- a/t/op/cproto.t +++ b/t/op/cproto.t @@ -137,7 +137,7 @@ lstat (*) lt ($$) m undef map undef -mkdir () +mkdir (;$$) msgctl ($$$) msgget ($$) msgrcv ($$$$$) @@ -197,7 +197,7 @@ send (*$$;$) setgrent () sethostent ($) setnetent ($) -setpgrp undef +setpgrp (;$$) setpriority ($$$) setprotoent ($) setpwent ()