Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id CFCE89FA097 for ; Mon, 1 Jan 2007 18:42:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 20368-04 for ; Mon, 1 Jan 2007 18:42:00 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from smtp-out1.libero.it (smtp-out1.libero.it [212.52.84.41]) by postgresql.org (Postfix) with ESMTP id E6DD29F93A2 for ; Mon, 1 Jan 2007 18:42:00 -0400 (AST) Received: from localhost (172.31.0.54) by smtp-out1.libero.it (7.3.120) id 458BB4200044E017 for pgsql-interfaces@postgresql.org; Mon, 1 Jan 2007 23:41:59 +0100 X-Scanned: with antispam and antivirus automated system at libero.it Received: from smtp-out2.libero.it ([172.31.0.38]) by localhost (asav-out12.libero.it [192.168.32.40]) (amavisd-new, port 10024) with ESMTP id kSVoEC8msgGl for ; Mon, 1 Jan 2007 23:41:59 +0100 (CET) Received: from [127.0.0.1] (151.47.76.249) by smtp-out2.libero.it (7.3.120) id 458BB49900CE3CFF for pgsql-interfaces@postgresql.org; Mon, 1 Jan 2007 23:41:59 +0100 Message-ID: <45998E4B.2030100@libero.it> Date: Mon, 01 Jan 2007 23:42:19 +0100 From: fabio guidi User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: it, it-it, en-us, en MIME-Version: 1.0 To: pgsql-interfaces Subject: Re: BCC55 and libpq 8.2 References: <45898614.80702@libero.it> <20061229021353.GA444@mail.mindspring.com> In-Reply-To: <20061229021353.GA444@mail.mindspring.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 0666-1, 31/12/2006), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.955 tagged_above=0 required=5 tests=AWL, BAYES_50, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST X-Spam-Level: X-Archive-Number: 200701/2 X-Sequence-Number: 6380 L Bayuk ha scritto: >On Wed, Dec 20, 2006 at 07:51:00PM +0100, fabio guidi wrote: > > >>... >>Hello to all, i'm trying to build libpq for postgresql 8.2 with borland >>bcc5.5 >>... >> >> > >I finally found myself in front of Windows PC, with PostgreSQL-8.2.0 >source, Borland BCC32 compiler, and a little time. I was trying to build my >Pgtclng DLL (http://pgfoundry.org/projects/pgtclng/) which requires the >libpq DLL. The bad news is that (as you found) a bunch of stuff got broken >in 8.2.0 regarding BCC builds of libpq. The good news is that I succeeded. >I built the libpq DLL, my Pgtclng DLL, and even the psql program. I tested >Pgtclng pretty hard with my test suite and it passed, so I am confident the >libpq build was good in so far as Pgtclng uses it. But it got some scary >compiler warnings that I still want to look into. > >I will try to post a patch soon for the bcc32.mak files, but I also had to >change some other files used by all other builds and I can't see them >patching those files for BCC. I don't have patch files yet, but if you want >to try it yourself here are the details. Unless I missed something, after >these changes "make -N -f bcc32.mak" inside interfaces/libpq should build >it for you. There are also a few fixes for building psql I have to post >some other time. Sorry I don't have this as a patch yet but I figured you >have waited long enough and might want to try it. > >In include/c.h : > Change: #if defined(__BORLANDC__) || (_MSC_VER >= 1400) > to: #if (_MSC_VER >= 1400) > >In include/port.h : > Delete the random() declaration, or change it so it looks like this: > #if !defined(__BORLANDC__) > #ifndef HAVE_RANDOM > extern long random(void); > #endif > #endif > >In include/, copy pg_config.h.win32 to pg_config.h >In include/, copy port/win32.h to pg_config_os.h and make the following >changes. I made these conditional on __BORLANDC__, but if you are only >trying to build the thing just delete or change these lines: > Remove #include > Remove #define SIGUSR1 and SIGUSR2. > Remove declarations of ssize_t and mode_t. > Remove #define's of _S_IRWXU through S_ISREG. > Replace the definitions so inline and __inline__ are defined to nothing. > (Might not be necessary, but it was in my notes from prior releases.) > >In interfaces/libpq/bcc32.mak: > Add "snprintf.obj" to the LIB32_OBJS macro, and add the block which > builds it: Copy the applicable lines from win32.mak. > I always had to make these two changes to bcc32.mak for Pgtclng, but > this could be specific to linking with Tcl so you might not need it. > 1) Add -c to LINK32_FLAGS (makes it case sensitive). > 2) Change runtime library from cw32mti.lib to cw32mt.lib (static version) > >---------------------------(end of broadcast)--------------------------- >TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > > > Thanks a lot, i'm reading only now your problem solution ... fabio