Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 68DD19FB227 for ; Mon, 8 Jan 2007 21:26:20 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 89961-08 for ; Mon, 8 Jan 2007 21:26:04 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from elasmtp-banded.atl.sa.earthlink.net (elasmtp-banded.atl.sa.earthlink.net [209.86.89.70]) by postgresql.org (Postfix) with ESMTP id 7316B9FB1C4 for ; Mon, 8 Jan 2007 21:26:09 -0400 (AST) Received: from [4.238.180.176] (helo=mindspring.com) by elasmtp-banded.atl.sa.earthlink.net with asmtp (TLSv1:AES256-SHA:256) (Exim 4.34) id 1H45kc-0006sB-7L; Mon, 08 Jan 2007 20:26:07 -0500 Received: (from lbayuk@localhost) by mindspring.com (8.13.7/8.13.7) id l090Y8fQ000354; Mon, 8 Jan 2007 19:34:08 -0500 Date: Mon, 8 Jan 2007 19:34:08 -0500 From: L Bayuk To: Bruce Momjian Cc: pgsql-interfaces@postgresql.org Subject: Re: BCC55 and libpq 8.2 Message-ID: <20070109003408.GA341@mail.mindspring.com> References: <20070107231909.GA718@mail.mindspring.com> <200701081554.l08FsNX24223@momjian.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200701081554.l08FsNX24223@momjian.us> User-Agent: Mutt/1.4.2.2i X-ELNK-Trace: 7a0205cf9d42df0a5e89bb4777695beb69025943178dce0b38b5ef801711bfd40ffcd3483e06a472350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 4.238.180.176 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.082 tagged_above=0 required=5 tests=AWL, BAYES_50, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200701/8 X-Sequence-Number: 6386 On Mon, Jan 08, 2007 at 10:54:23AM -0500, Bruce Momjian wrote: > L Bayuk wrote: > >... > > 1. In the past, I've had to define "inline" to nothing... > We adjusted inline for 8.2 so I figured you will need to retest this > before we add it. Tested and works as is in 8.2.0. No need to #define inline (as nothing). >... > > 3. To build libpq with BCC for use with pgtcl-ng, I had to add "-c" to the > > LINK32_FLAGS (makes symbols case sensitive, due to PQflush() vs pqFlush() > > if I recall), and change the runtime library from cw32mti.lib to cw32mt.lib > > (static version). I don't know if these are specific to linking with Tcl > > libraries, but I can't see it would hurt anyone else. Can I include these > > in the patch? > > I did some research and it seems the MS linker is case-sensitive by > default, while BCC is case-insensitive by default, so that -c option is > something we definately should add to the bcc makefile. I think I was wrong. According to the Borland Linker documentation, -c defaults on (case sensitive). But when I link without -c, it warns about pqFlush vs PQflush. Confusing. I'm going to try it again, both ways. Why are there two functions anyway? I suppose historical reasons. Since PQflush(c) is { return pqFlush(c); } I guess if the linker gets the case thing wrong we loop until overrunning the stack. I would also prefer to use cm32mt.lib; it makes blibpq.dll bigger but otherwise it requires another DLL at runtime, I think (cw3250mt.dll). > > I will try your patch, and look into the inline thing as soon as I can, > > perhaps Monday. > > Great. Just send me a patch that works on your setup and I will apply > it. Thanks. Don't apply your patch. There is an extra #endif in port/win32.h after the patch which breaks it. I will fix, add the psql/bcc32.mak stuff, test it, and post it on [PATCHES].