Re: Clear up strxfrm() in UTF-8 with locale on Windows

Поиск
Список
Период
Сортировка
Искать
От
Magnus Hagander
Тема
Re: Clear up strxfrm() in UTF-8 with locale on Windows
Дата
в 04:31:38
Msg-id
20070503073131.GA17603@svr2.hagander.net
Ответ на
Список
Дерево обсуждения
Clear up strxfrm() in UTF-8 with locale on Windows ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>
Re: Clear up strxfrm() in UTF-8 with locale on Windows Bruce Momjian <bruce@momjian.us>
Re: Clear up strxfrm() in UTF-8 with locale on Windows Magnus Hagander <magnus@hagander.net>
Re: Clear up strxfrm() in UTF-8 with locale on Windows Tom Lane <tgl@sss.pgh.pa.us>
Re: Clear up strxfrm() in UTF-8 with locale on Windows Magnus Hagander <magnus@hagander.net>
Re: Clear up strxfrm() in UTF-8 with locale on Windows Magnus Hagander <magnus@hagander.net>
Re: Clear up strxfrm() in UTF-8 with locale on Windows ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>
Re: Clear up strxfrm() in UTF-8 with locale on Windows "Magnus Hagander" <magnus@hagander.net>
On Wed, May 02, 2007 at 05:25:39PM -0400, Tom Lane wrote:
> Magnus Hagander  writes:
> > Given this, perhaps the proper approach should instead be to just check
> > the return value, and go from there? Should be a simple enough patch,
> > something like the attached.
> 
> > Tom, can you comment?
> 
> Testing against INT_MAX seems like a type pun, or something.  Maybe use
> MaxAllocSize instead?

The windows API documentation specifically says:
On an error, each function sets errno and returns INT_MAX.

So actually an equality test against INT_MAX would be correct. But making
that clear in the comment would probably not be a bad idea :-)

//Magnus

В списке pgsql-patches по дате отправления
От: Tom Lane
Дата:
От: Bruce Momjian
Дата:
Сообщение: Re: Updated bitmap index patch
FAQ