Re: libpq_r

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, jkj(at)sco(dot)com, Lee Kindness <lkindness(at)csl(dot)co(dot)uk>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq_r
Date: 2003-07-25 09:47:56
Message-ID: 2980000.1059126476@lerlaptop.lerctr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

--On Friday, July 25, 2003 11:51:50 +0200 Peter Eisentraut
<peter_e(at)gmx(dot)net> wrote:

> Larry Rosenman writes:
>
>> The -D_REENTRANT causes NO pain, and makes it possible to have ONE
>> library for UnixWare.
>
> Didn't you just say that -D_REENTRANT changes the definition of errno on
> your system? Surely it would not be a good idea to link a libpq that uses
> variant 1 with a program that uses variant 2. Maybe I'm wrong and you can
> do that, but it sounds problematic to me.
Yes, it DOES change errno, but it is **NOT** problematic. the static int
is there
ONLY FOR THE FIRST LWP (thread) of a process. The reentrant version
accesses the same
information for ANY LWP. the first LWP can also use it for getting access.

It is SAFER to use the reentrant version, so that if a THREADED program
uses libpq,
we are now thread-safe.

LER

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

  • Re: libpq_r at 2003-07-25 09:51:50 from Peter Eisentraut

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2003-07-25 09:51:50 Re: libpq_r
Previous Message Peter Eisentraut 2003-07-25 09:23:05 Re: libpq_r