Re: Building psql.exe using the free Borland compiler - Mailing list pgsql-interfaces

From Mark Morgan Lloyd
Subject Re: Building psql.exe using the free Borland compiler
Date
Msg-id 441FD48A.3E54ABA9@telemetry.co.uk
Whole thread Raw
In response to Building psql.exe using the free Borland compiler  (Mark Morgan Lloyd <markMLl.pgsql-interfaces@telemetry.co.uk>)
Responses Re: Building psql.exe using the free Borland compiler  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-interfaces
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.

ii)  Modify src\interfaces\libpq\pg_config_paths.h so that instead of reading:

#define SYSCONFDIR

it reads:

#define SYSCONFDIR ""

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.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]


pgsql-interfaces by date:

Previous
From: Mark Morgan Lloyd
Date:
Subject: Building psql.exe using the free Borland compiler
Next
From: "Zlati"
Date:
Subject: using libpq with the free Borland compiler or DEV-cpp