From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Nicolai Tufar <ntufar(at)gmail(dot)com>, devrim(at)kivi(dot)com(dot)tr, Magnus Hagander <mha(at)sollentuna(dot)net>, andrew(at)dunslane(dot)net, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCHES] snprintf() argument reordering not working under |
Date: | 2005-12-04 04:05:23 |
Message-ID: | 4938.1133669123@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-12-04 04:14:51 | Re: I can't get row type from tuple (SPI) |
Previous Message | Bruce Momjian | 2005-12-04 03:52:22 | Re: [HACKERS] Should libedit be preferred to libreadline? |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-12-04 04:10:18 | Re: return can contains any row or record functions |
Previous Message | Bruce Momjian | 2005-12-04 03:52:22 | Re: [HACKERS] Should libedit be preferred to libreadline? |