Re: thread_test.c problems

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: thread_test.c problems
Дата
Msg-id 200404260406.i3Q464d11124@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: thread_test.c problems  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: thread_test.c problems  (<wespvp@syntegra.com>)
Re: thread_test.c problems  (<wespvp@syntegra.com>)
Список pgsql-general
> What we really want is for the configure script to _add_ to the existing
> options, and I thought that's what it did.  Another bad thing it does is
> if it the supplied port options don't work, it erases them and tries it
> own.
>
> Now, the fact that the configure thread test program worked and reported
> good results means:
>
>     o  threads work with the supplied options
>     o  errno is thread-safe
>
> so I think the supplied Darwin options are enough.
>
> Interesting that the acx_pthread.m4 just keep checking options until it
> finds one that succeeds, then stops tryinug any more.
>
> I have to think about this.  I think maybe we should add a
> PTHREAD_CPPFLAGS to template port files, and just add that in at the
> end.
>
> They actually have this little port-specific code:
>
>         case "${host_cpu}-${host_os}" in
>                 *-aix* | *-freebsd*)     flag="-D_THREAD_SAFE";;
>                 *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
>         esac
>
> and I think we need to remove that and have the template files handle
> such thing.

OK, CVS is ready.  I unconditionally defined:

        -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS

for all ports.  It can't hurt if they are not supported, but it makes
our job easier for porting.  It allowed me to remove almost all the
port-specific thread stuff.  The other tests are done by configure and
thread_test.

Should fix Darwin compile and other platforms without mucking with the
thread detection code.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

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

Предыдущее
От: "tech tech "
Дата:
Сообщение: Re: PostgreSQL 7.4.2 initdb problem
Следующее
От:
Дата:
Сообщение: Re: thread_test.c problems