Re: [PATCHES] snprintf() argument reordering not working under
От | Tom Lane |
---|---|
Тема | Re: [PATCHES] snprintf() argument reordering not working under |
Дата | |
Msg-id | 4938.1133669123@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [PATCHES] snprintf() argument reordering not working under (Bruce Momjian <pgman@candle.pha.pa.us>) |
Список | pgsql-hackers |
Bruce Momjian <pgman@candle.pha.pa.us> writes: > (See the quoted text under the posted text as well.) Basically, > libintl.h on Win32 replaces *printf calls with its own versions, and > does it using macros, _just_ like we do. This of course causes > conflicts and the system fails to compile. The _fix_ was to disable > port/*printf on Win32 when using NLS because NLS wants to use its own > *printf. I _assumed_ that libintl.h did this so it could use its own > routines that understood %$, but never verified that. Oops ... [ insert standard cliche about assumptions ] It might be interesting to find out why libintl is replacing these functions if not to support arg reordering, but I suppose the bottom line will just be that Microsoft is as brain dead as usual :-( > Anyway, I think the big question is, was the pginstaller built with a > libintl that replaces *printf, and is it an *printf that doesn't > understand positional parameters, and so, how can we fix it. 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. regards, tom lane
В списке pgsql-hackers по дате отправления: