Skip site navigation (1) Skip section navigation (2)

Re: BCC55 and libpq 8.2

From: L Bayuk <lbayuk(at)pobox(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: BCC55 and libpq 8.2
Date: 2007-01-09 00:34:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfacespgsql-patches
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].

In response to


pgsql-patches by date

Next:From: Jaime CasanovaDate: 2007-01-09 01:51:16
Subject: Re: Tablespace for temporary objects and sort files
Previous:From: Tom LaneDate: 2007-01-09 00:14:21
Subject: Re: [HACKERS] SGML index build fix

pgsql-interfaces by date

Next:From: Bruce MomjianDate: 2007-01-09 03:48:02
Subject: Re: BCC55 and libpq 8.2
Previous:From: Bruce MomjianDate: 2007-01-08 15:54:23
Subject: Re: BCC55 and libpq 8.2

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group