X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 362DFD1C4D0 for ; Fri, 25 Jul 2003 09:48:07 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 25085-07 for ; Fri, 25 Jul 2003 06:47:22 -0300 (ADT) Received: from lerami.lerctr.org (lerami.lerctr.org [207.158.72.11]) by svr1.postgresql.org (Postfix) with ESMTP id 27773D1C4BC for ; Fri, 25 Jul 2003 06:48:05 -0300 (ADT) Received: from lerlaptop.lerctr.org (lerlaptop.lerctr.org [207.158.72.14]) (authenticated bits=0) by lerami.lerctr.org (8.12.9/8.12.9/20030515) with ESMTP id h6P9luNQ013905; Fri, 25 Jul 2003 04:47:56 -0500 (CDT) Date: Fri, 25 Jul 2003 04:47:56 -0500 From: Larry Rosenman To: Peter Eisentraut Cc: Bruce Momjian , jkj@sco.com, Lee Kindness , Tom Lane , PostgreSQL Development Subject: Re: libpq_r Message-ID: <2980000.1059126476@lerlaptop.lerctr.org> In-Reply-To: References: <200307242030.h6OKUEh25801@candle.pha.pa.us> <30590000.1059124782@lerlaptop.lerctr.org> X-Mailer: Mulberry/3.1.0b4 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/787 X-Sequence-Number: 41392 --On Friday, July 25, 2003 11:51:50 +0200 Peter Eisentraut 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@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749