develooper Front page | perl.perl5.porters | Postings from July 2013

Re: [perl #116296] [PATCH] remove PL_patchlevel from and optimizeS_minus_v

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
July 18, 2013 19:34
Subject:
Re: [perl #116296] [PATCH] remove PL_patchlevel from and optimizeS_minus_v
Message ID:
20130718193435.GH3729@plum.flirble.org
On Thu, Jul 18, 2013 at 11:57:37AM -0700, bulk88 via RT wrote:
> On Sun Jul 07 23:53:42 2013, tonyc wrote:
> > 
> > Tony
> > 
> 
> Patch remade, newSVpvn and %d replaced with %zu to hopefully (not using
> GCC) stop type mismatch warning.

I'm not sure if everything likes %zu. Particularly older SysV vendor compilers.
Need to check.

> With the copyright lines, use more CPP cating. This reduced the number of
> instructions, and removes a couple alignment null in .rdata image section.

I'm pretty sure that mixing #ifdef and pre-processor string concatenation
has upset some compilers in the past. Whilst no particular system is going to
have more than one macro defined:

>  #ifdef OEMVS
> -	PerlIO_printf(PIO_stdout,
> -		      "MVS (OS390) port by Mortice Kern Systems, 1997-1999\n");
> +		      "MVS (OS390) port by Mortice Kern Systems, 1997-1999\n"
>  #endif
>  #ifdef __VOS__
> -	PerlIO_printf(PIO_stdout,
> -		      "Stratus OpenVOS port by Paul.Green@stratus.com, 1997-2013\n");
> +		      "Stratus OpenVOS port by Paul.Green@stratus.com, 1997-2013\n"
>  #endif
>  #ifdef POSIX_BC
> -	PerlIO_printf(PIO_stdout,
> -		      "BS2000 (POSIX) port by Start Amadeus GmbH, 1998-1999\n");
> +		      "BS2000 (POSIX) port by Start Amadeus GmbH, 1998-1999\n"
> +#endif

the construction looks like it could cause compilers to choke
(So we need to check before changing this)

Also, what's the maximum length from concatenating string literals doing it
this way? IIRC ANSI's minimum limit was something puny like 502 characters.
I don't think that any compiler we encountered was that unforgiving, but
something (IBM's compiler) maxed out at about 2000 characters, which we hit
at times.

Nicholas Clark

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