On 07/04/2013 07:04 AM, Michael Meskes wrote:
> On Wed, Jul 03, 2013 at 07:22:48PM +0900, MauMau wrote:
>> I happened to find a trivial bug of ECPG while experimenting with
>> 9.3 beta 2. Please find attached the patch to fix this. This is
>> not specific to 9.3. Could you commit and backport this?
> This appears to be Windows specific. I don't have a Windows system to test
> with. How does Visusal Studio handle #line entries with full path names? Are
> they all escaped? Or better do they have to be?
>
>> This is necessary not only on Windows but also on UNIX/Linux. For
>> your information, running "gcc -E di\\r/a.c" escapes \ and outputs
>> the line:
>>
>> # 1 "di\\r/a.c"
> Now this statement surprises me:
>
> michael@feivel:~$ ecpg test\\\\a/init.pgc
> michael@feivel:~$ grep line test\\\\a/init.c |head -1
> #line 1 "test\\a/init.pgc"
> michael@feivel:~$ gcc -o i test\\\\a/init.c -I /usr/include/postgresql/ -l ecpg
> michael@feivel:~$
>
> This seems to suggest that it works nicely on Linux.
>
Really? I'd expect to see 4 backslashes in the #line directive, I think.
cheers
andrew