Re: [PATCHES] snprintf() argument reordering not working - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: [PATCHES] snprintf() argument reordering not working
Date
Msg-id 43933B12.7090600@dunslane.net
Whole thread Raw
In response to Re: [PATCHES] snprintf() argument reordering not working  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: [PATCHES] snprintf() argument reordering not working  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Andrew Dunstan wrote:

>
> Tom said:
>
>> Would it work to modify c.h so that it #include's libintl.h, then 
>> #undefs
>> these macros, then #includes port.h to define 'em the way we want?
>> Some or all of this might need to be #ifdef WIN32, but that seems like
>> a reasonably noninvasive solution if it can work.
>>
>
> IIRC last time I tried this it didn't work too well ;-( I will have 
> another go. I think it's the best way to go.
>
>

progress so far: I undid the config changes Bruce had made and undefined 
printf, fprintf, sprintf, snprintf and vsnprintf after the include of 
libintl.h in include/c.h. Then to clean up some warnings I undefined  
vsnprintf and snprintf in interfaces/libpq/win32.h before their 
redefinition.

That got me through the backend compile and through libpq to ecpg, which 
fell over at the link stage complaining about missing references to 
pg_sprintf and pg_snprintf ... not sure how to fix that - windows 
experts, please advise.

cheers

andrew



pgsql-hackers by date:

Previous
From: "Pollard, Mike"
Date:
Subject: Re: generalizing the planner knobs
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Upcoming PG re-releases