Re:

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: shridhar_daithankar(at)persistent(dot)co(dot)in, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re:
Date: 2003-07-24 14:37:53
Message-ID: 200307241437.h6OEbrJ22558@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut wrote:
> Bruce Momjian writes:
>
> > The strange thing is that accoring to template/freebsd, libc_r was
> > _added_ in FreeBSD 5.0, while most OS are moving away from separate
> > threaded libs.
>
> The template is wrong. libc_r has existed in FreeBSD for quite a while,
> but your're not supposed to use it directly. Instead, you use the flag
> -pthread, which takes care of libc_r and possibly other things (possibly
> more things than we like?). In fact, if you specify -lc_r directly, then
> the compiler driver will also link in the normal libc, resulting in
> complete desaster.

How is the template wrong? The following code was gotten from a FreeBSD
user. Should the top case be used with all FreeBSD's?

case $host_os in
freebsd2*|freebsd3*|freebsd4*)
THREAD_CFLAGS="-pthread"
NEED_REENTRANT_FUNC_NAMES=yes
;;
*)
THREAD_LIBS="-lc_r"
NEED_REENTRANT_FUNC_NAMES=yes
;;
esac

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

In response to

  • Re: at 2003-07-24 14:00:05 from Peter Eisentraut

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-07-24 14:44:27 Re: libpq_r
Previous Message Lee Kindness 2003-07-24 14:32:57 Re: libpq_r