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 EAE73D1C4D0 for ; Fri, 25 Jul 2003 09:19:54 +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 25403-04 for ; Fri, 25 Jul 2003 06:19:09 -0300 (ADT) Received: from lerami.lerctr.org (lerami.lerctr.org [207.158.72.11]) by svr1.postgresql.org (Postfix) with ESMTP id 9A5A0D1C4BC for ; Fri, 25 Jul 2003 06:19:52 -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 h6P9JgNQ011563; Fri, 25 Jul 2003 04:19:43 -0500 (CDT) Date: Fri, 25 Jul 2003 04:19:42 -0500 From: Larry Rosenman To: Peter Eisentraut , Bruce Momjian , jkj@sco.com Cc: Lee Kindness , Tom Lane , PostgreSQL Development Subject: Re: libpq_r Message-ID: <30590000.1059124782@lerlaptop.lerctr.org> In-Reply-To: References: <200307242030.h6OKUEh25801@candle.pha.pa.us> 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/785 X-Sequence-Number: 41390 --On Friday, July 25, 2003 11:23:05 +0200 Peter Eisentraut wrote: > Bruce Momjian writes: > >> I still think it is confusing to create a libpq_r on platforms that have >> no _r libraries. I am on BSD/OS and I can find only _r library on my >> entire system, > > The criterion is not whether the platform has _r libraries, it's whether > special actions are required in order to make a library fit for threaded > programs, at the time that library is built. Such special actions may > include: > > 1. need to link in special libc_r (FreeBSD) > 2. need to use magic flags for compiler and/or linker (FreeBSD, UnixWare) > 3. need to compile with special preprocessor symbols (UnixWare, AIX) > 4. need to use different compiler altogether (AIX) > > (If you read between the lines of the manufacturers' documentation, all > these methods end up accomplishing similar things, they are only different > interfaces for it.) The -D_REENTRANT causes NO pain, and makes it possible to have ONE library for UnixWare. the -K[p]thread issue is for EXECUTABLES to cause the libthread library to be invoked at PROCESS startup. I feel that libpq should be compiled with -D_REENTRANT, and we have ONE copy of it on UnixWare. > > If any of these cases apply, we need to provide a separate libpq_r, or > else either threaded land or nonthreaded land will suffer pain, from what > I read. (The simplest example is errno being defined in different ways > and referring to different symbols.) > > If none of these cases apply, then a separate libpq_r will be redundant, > perhaps "confusing" to some, but it can be ignored by the user. see my above comments. -- 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