setlocale and gettext in Postgres

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема setlocale and gettext in Postgres
Дата
Msg-id 4D416D11.6080805@tpf.co.jp
обсуждение исходный текст
Ответы Re: setlocale and gettext in Postgres  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Список pgsql-hackers
Hi all,

I see now the following lines in libintl.h of version
0.18.1.1 which didn't exist in 0.17 version.

/* Support for the locale chosen by the user.  */
#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined
__WIN32__ || defined __CYGWIN__

#undef setlocale
#define setlocale libintl_setlocale
extern char *setlocale (int, const char *);
.
.

The macro may cause a trouble especially on Windows.

Though libintl_setlocale() calls setlocale() internally,
what the Mingw version of libintl library calls is the one
in msvcrt.dll not in the libraries which main programs link.
Unfortunately locale-aware functions like printf() calls
in main programs would see "C" locales not the locales set
by libintl_setlocale().

Attached is a patch to disable the macro on Windows.

regards,
Hiroshi Inoue






Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Itagaki Takahiro
Дата:
Сообщение: Re: Extensions support for pg_dump, patch v27
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Allowing multiple concurrent base backups