develooper Front page | perl.perl5.porters | Postings from June 2003

Re: your malloc patches

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
June 15, 2003 11:14
Subject:
Re: your malloc patches
Message ID:
20030615181416.GE469614@kosh.hut.fi
> > This just isn't cricket for non-GCC compilers (Solaris, AIX, and Tru64
> > claim a syntax error, IRIX seems to tolerate it).  That a function
> > call (Perl_doing_taint in this case) gets expanded to func(a,b,) just
> > isn't going to work.  (What does leaving out an argument like that
> > _mean_, anyway?  An implicit 0?)
> 
> It is a *macro*, not a function call!  Macros operate on strings.  An
> empty string is a perfectly valid string (though I do not know what

When the macro gets expanded at the very beginning of main() we get this:

	if (Perl_doing_taint(*&argc, *&argv, ))

which makes many C compilers to choke, but apparently not gcc.

> the C standard says on this).
> 
> Anyway, this slot is not used, so put there NOTUSED.

I have no idea what you mean by NOTUSED.  If you mean the trick you said:

#define NOTUSED
#define MALLOC_CHECK_TAINT2(argc,argv)  MALLOC_CHECK_TAINT(argc,argv,NOTUSED)

That doesn't work since that gets expanded to exactly the same as above.

-- 
Jarkko Hietaniemi <jhi@iki.fi> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

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