Re: Building psql.exe using the free Borland compiler
От | Bruce Momjian |
---|---|
Тема | Re: Building psql.exe using the free Borland compiler |
Дата | |
Msg-id | 200604240402.k3O42Bg09540@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Building psql.exe using the free Borland compiler (Mark Morgan Lloyd <markMLl.pgsql-interfaces@telemetry.co.uk>) |
Список | pgsql-interfaces |
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. + 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)"
В списке pgsql-interfaces по дате отправления: