develooper Front page | perl.perl5.porters | Postings from December 2008

Re: Smoke [5.11.0] 35082 FAIL(m) MSWin32 WinXP/.Net SP3 (x86/2 cpu)

Thread Previous | Thread Next
From:
Chip Salzenberg
Date:
December 14, 2008 01:24
Subject:
Re: Smoke [5.11.0] 35082 FAIL(m) MSWin32 WinXP/.Net SP3 (x86/2 cpu)
Message ID:
20081214092348.GF6192@tytlal.topaz.cx
On Sat, Dec 13, 2008 at 11:19:23PM -0800, Jan Dubois wrote:
> On Sat, 13 Dec 2008, Nicholas Clark wrote:
> > Given the only changes from last night's PASS in blead was 35082, it has to
> > be the cause. Presumably [...]
> > But I have no idea what, as the smoke client doesn't provide a log for this.
> > I guess we wait until Monday, unless anyone else can run a Win32 build.
> 
> Change 35082 is indeed the culprit.  The problem is using conditional compilation
> inside a preprocessor macro call:
> 
> ..\doio.c(854) : warning C4002: too many actual parameters for macro 'do_open'
> ..\doio.c(854) : error C2121: '#' : invalid character : possibly the result of a macro expansion
> ..\doio.c(854) : error C2065: 'ifdef' : undeclared identifier
> ..\doio.c(854) : error C2146: syntax error : missing ')' before identifier 'VMS'
> [...]

Oh dear.  It seems to have escaped me that do_open() could be a macro.

How's this for a fix?

diff --git a/doio.c b/doio.c
index 85b9c38..23915cf 100644
--- a/doio.c
+++ b/doio.c
@@ -845,13 +845,15 @@ Perl_nextargv(pTHX_ register GV *gv)
 
 		sv_setpvn(sv,PL_oldname,oldlen);
 		SETERRNO(0,0);		/* in case sprintf set errno */
-		if (!do_open(PL_argvoutgv,(char*)SvPVX_const(sv),SvCUR(sv),TRUE,
+		if (
 #ifdef VMS
-			     O_WRONLY|O_CREAT|O_TRUNC,0,
+		    !do_open(PL_argvoutgv,(char*)SvPVX_const(sv),SvCUR(sv),TRUE,
+			     O_WRONLY|O_CREAT|O_TRUNC,  0,   NULL)
 #else
-			     O_WRONLY|O_CREAT|OPEN_EXCL,0600,
+		    !do_open(PL_argvoutgv,(char*)SvPVX_const(sv),SvCUR(sv),TRUE,
+			     O_WRONLY|O_CREAT|OPEN_EXCL,0600,NULL)
 #endif
-			     NULL))
+		    )
 		{
 		    if (ckWARN_d(WARN_INPLACE))	
 		        Perl_warner(aTHX_ packWARN(WARN_INPLACE), "Can't do inplace edit on %s: %s",


-- 
Chip Salzenberg   twitter:chipsalz
"UTOPIA PLANITIA IS IN ORBIT is the new HAN SHOT FIRST" - Crisper Than Thou

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About