Re: Compiling C++ extensions on MSVC using scripts in src/tools - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Compiling C++ extensions on MSVC using scripts in src/tools
Date
Msg-id 5491DFBA.6010102@vmware.com
Whole thread Raw
In response to Re: Compiling C++ extensions on MSVC using scripts in src/tools  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Compiling C++ extensions on MSVC using scripts in src/tools  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On 11/27/2014 06:39 AM, Michael Paquier wrote:
> On Thu, Nov 27, 2014 at 1:40 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Andrew Dunstan <andrew@dunslane.net> writes:
>>> This doesn't seem to me to be terribly well expressed (I know it's not your fault, quite possibly it's mine.)
Perhapswe should replace
 
>>>      [r]?[cyl](pp)?
>>> with
>>>      (c|cpp|y|l|rc)
>>
>> +1 ... the original coding is illegible already, not to mention wrong
>> since it will match stuff it shouldn't.
> Yes even the older code could find matches with ry or rl. Except that,
> lpp and ypp could be present as well. OK, there are low chances to be
> present in a Postgres extension (I don't have such extensions myself),
> still they could. So I think that this expression should be written
> like that instead:
> (c|cpp|l|lpp|y|ypp|rc).
> Updated patch is attached.

If .lp and .ypp files are supposed to be Bison and Flex files with C++ 
code in them, it wouldn't work anyway, because the rules elsewhere in 
the MSVC scripts just check for /\.y$/) to decide whether to run bison 
on it.

I committed Andrew's suggestion:

/^(.*)\\([^\\]+)\.(c|cpp|y|l|rc)$/

- Heikki




pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: parallel mode and parallel contexts
Next
From: Heikki Linnakangas
Date:
Subject: Re: SSL information view