Re: Thread configure flag

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Thread configure flag
Дата
Msg-id Pine.LNX.4.44.0306161937340.2751-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: Thread configure flag  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Thread configure flag  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Thread configure flag  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Bruce Momjian writes:

> If it is the default, libpq is going to use the libc_r library, at least
> on some platforms, and that may not be desired.

But what is the objective reason for this lack of desire?

> One funny thing is that on BSD/OS and NetBSD, because there are no
> thread compile flags, function names, or libraries, libpq is the same
> code with or without the flag.  ecpg, however, has thread calls, and is
> effected on every platform.

Well, I'm pretty sure that the current thread options are overkill and can
be simplified.  For instance, on Linux the template currently claims

THREAD_CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"

_POSIX_PTHREAD_SEMANTICS isn't used anywhere in the entire system, the
effect of _THREAD_SAFE is to define _REENTRANT, and the effect of
_REENTRANT is to declare getlogin_r(), which PostgreSQL sources don't use.
In other words, this can be removed.

--
Peter Eisentraut   peter_e@gmx.net


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Thread configure flag
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Thread configure flag