Skip site navigation (1) Skip section navigation (2)

Re: tiny fix needed

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: tiny fix needed
Date: 2006-11-27 15:03:50
Message-ID: 456AFE56.9060003@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackers
Andrew Dunstan wrote:
> Tom Lane wrote:
>   
>> "Andrew Dunstan" <andrew(at)dunslane(dot)net> writes:
>>     
>>> I have just discovered a tiny fix that is needed when compiling on
>>> Windows
>>> with a very late model libintl.h. Essentially we need to add vfprintf to
>>> the list of items we stop the libintl headers from hijacking. I am still
>>> testing, but this change (3 extra lines in port.h) should be very low
>>> risk.
>>>       
>> Hm, you mean only
>>
>> #ifdef vfprintf
>> #undef vfprintf
>> #endif
>>
>> This seems a bit strange, because the other functions such as vsnprintf
>> have several other relevant bits in port.h, plus supporting code in
>> src/port/ ... why wouldn't we need all of that?
>>
>>     
>
>
> *sigh* you could well be right. I will dig some more. It only happens for
> ECPG - everything else links just fine.
>
>
>   

Hmm. Well, it turns out that pg_vfprintf is declared static in our 
snprintf.c. The only place vfprintf is used in the backend is in elog.c, 
although it is used in a variety of frontend programs, so it looks like 
this needs to be fixed properly.

Is there any reason we shouldn't treat vfprintf the same as other 
members of the printf family? It will certainly mean more that 3 lines, 
although I think the changes could possibly still be confined largely to 
port.h.

Of course, we could leave this for a dot release - I notice that the 
Windows buildfarm members are building happily, and I assume they have 
an earlier version of gettext/libiconv than I have just installed on my 
new laptop. But that would be a bit of a pity.

cheers

andrew


In response to

Responses

pgsql-hackers by date

Next:From: Neil ConwayDate: 2006-11-27 15:33:06
Subject: Re: Open source databases '60 per cent cheaper'
Previous:From: Alvaro HerreraDate: 2006-11-27 14:45:59
Subject: Re: Potential to_char localization bug

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group