Re: [pcre-dev] issue with pcre 7.8 in PHP lib

Página superior
Eliminar este mensaje
Autor: Gwynne Raskind
Fecha:  
A: steve lu
Cc: pcre-dev
Asunto: Re: [pcre-dev] issue with pcre 7.8 in PHP lib
On Aug 11, 2009, at 10:10 AM, steve lu wrote:
> I am running PHP 5.2.9 with pre-packaged PCRE installation.
>
> I ran "configure" to build PHP which results in a Makefile,
> within the Makefile, I noticed that it uses a compiler define
> "-DEBCDIC=0" to
> compile pcrelib, which led to a wrong char table used in the build.


I can't reproduce this behavior with 5.2.9. I can only assume that
something else is defining the flag, possibly an external library
you're specifying on the configure line.

-- Gwynne

> Gwynne Raskind wrote:
>> On Aug 10, 2009, at 10:56 AM, steve lu wrote:
>>> Hi,
>>>
>>> Soon after I posted this email, I found the cause.
>>>
>>> PHP 5.2.9's Makefile script has this compiler define, -DEBCDIC=0.
>>> But in PCRE source, it uses '#ifdef EBCDIC #else #endif' to
>>> conditionally include
>>> a character table.
>>>
>>> This inconsistency led to EBCDIC always defined and thereby a wrong
>>> character table used in the final build.
>>
>> Can you be more specific about which PHP you're seeing this problem
>> with? None of our released versions should be doing this by default.
>> In fact, I don't think we ever do it at all.
>>
>> Off the top of my head I'd guess you're running into a problem with a
>> distribution-specific version, but I also don't believe that even
>> Apple's insane hacks (rant snipped) would have this specific effect.