| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: A couple of gripes about the gettext plurals patch |
| Date: | 2009-05-27 13:16:18 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > I tried throwing various kinds of subtle garbage into the errmsg/ngettext
> > line, but it was all discovered by gcc -Wall.
>
> I experimented with this and found that indeed both format strings are
> checked ... if you have a reasonably recent libintl.h AND you have
> specified --enable-nls. Otherwise it all goes to heck, apparently
> because the compiler doesn't try to look through our substitute
> definition
>
> #define ngettext(s,p,n) ((n) == 1 ? (s) : (p))
>
> So I'm still of the opinion that we need some work here. I think
> that instead of this #define we need an actual function that we can
> hang a couple of __attribute_format_arg__ markers on. Otherwise
> things are going to slip by us. (Not sure about you, but I don't
> build with --enable-nls by default.)
TODO item?
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Chernow | 2009-05-27 13:27:44 | Re: Keep alive in libpq |
| Previous Message | Bruce Momjian | 2009-05-27 13:13:42 | Re: New trigger option of pg_standby |