X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 75CDB11F6AAE for ; Mon, 24 Apr 2006 02:05:07 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 77512-04-2 for ; Mon, 24 Apr 2006 02:04:31 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from candle.pha.pa.us (candle.pha.pa.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id 20EC711F7DC9 for ; Mon, 24 Apr 2006 01:02:12 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id k3O42Bg09540; Mon, 24 Apr 2006 00:02:11 -0400 (EDT) From: Bruce Momjian Message-Id: <200604240402.k3O42Bg09540@candle.pha.pa.us> Subject: Re: Building psql.exe using the free Borland compiler In-Reply-To: <441FD48A.3E54ABA9@telemetry.co.uk> To: Mark Morgan Lloyd Date: Mon, 24 Apr 2006 00:02:11 -0400 (EDT) CC: pgsql-interfaces@postgresql.org X-Mailer: ELM [version 2.4ME+ PL121 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=ELM1145851331-25862-1_ Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/24 X-Sequence-Number: 6115 --ELM1145851331-25862-1_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Mark Morgan Lloyd wrote: > Mark Morgan Lloyd wrote: > > > > Has anybody succeeded in building psql from 8.1.3 using bcc55? > > Well, looks like it's me then. Skipping the standard stuff to do with setting up > the compiler and selecting the correct makefiles, and with the strong caveat > that this is for BCC 5.5 and is untested against earlier and later Borland > compilers: > > i) Delete src\include\pg_config.h if it exists, it's recreated by the > makefile. Why remove the file if it is overwritten anyway? > ii) Modify src\interfaces\libpq\pg_config_paths.h so that instead of reading: > > #define SYSCONFDIR > > it reads: > > #define SYSCONFDIR "" OK, I originally had in the Makefile: echo \#define SYSCONFDIR "" > pg_config_paths.h I changed it to: echo \#define SYSCONFDIR \"\" > pg_config_paths.h I hope that properly puts quotes in the file. > iii) Modify src\include\port.h so that instead of reading: > > #ifndef __BORLANDC__ > #define popen(a,b) _popen(a,b) > #define pclose(a) _pclose(a) > #endif > > it reads: > > // ifndef __BORLANDC__ > #define popen(a,b) _popen(a,b) > #define pclose(a) _pclose(a) > // endif > > Should now compile and run without problems. Done. Applied patch attached. -- Bruce Momjian http://candle.pha.pa.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + --ELM1145851331-25862-1_ Content-Transfer-Encoding: 7bit Content-Type: text/plain Content-Disposition: inline; filename="/bjm/diff" Index: src/include/port.h =================================================================== RCS file: /cvsroot/pgsql/src/include/port.h,v retrieving revision 1.90 diff -c -c -r1.90 port.h *** src/include/port.h 5 Mar 2006 15:58:53 -0000 1.90 --- src/include/port.h 24 Apr 2006 03:57:37 -0000 *************** *** 255,264 **** #define open(a,b,...) win32_open(a,b,##__VA_ARGS__) #endif - #ifndef __BORLANDC__ #define popen(a,b) _popen(a,b) #define pclose(a) _pclose(a) - #endif /* Missing rand functions */ extern long lrand48(void); --- 255,262 ---- Index: src/interfaces/libpq/bcc32.mak =================================================================== RCS file: /cvsroot/pgsql/src/interfaces/libpq/bcc32.mak,v retrieving revision 1.20 diff -c -c -r1.20 bcc32.mak *** src/interfaces/libpq/bcc32.mak 16 Sep 2005 19:00:05 -0000 1.20 --- src/interfaces/libpq/bcc32.mak 24 Apr 2006 03:57:44 -0000 *************** *** 141,147 **** # Have to use \# so # isn't treated as a comment, but MSVC doesn't like this pg_config_paths.h: bcc32.mak ! echo \#define SYSCONFDIR "" > pg_config_paths.h "$(OUTDIR)" : @if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" --- 141,147 ---- # Have to use \# so # isn't treated as a comment, but MSVC doesn't like this pg_config_paths.h: bcc32.mak ! echo \#define SYSCONFDIR \"\" > pg_config_paths.h "$(OUTDIR)" : @if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" --ELM1145851331-25862-1_--