Re: (postgres) Libpq Win32
Hello!
Through some minor changes, I have been able to compile the libpq client
libraries on the Win32 platform. Since the libpq communications part has
been rewritten, this has become much easier. Enclosed is a patch that
will allow at least Microsoft Visual C++ to compile libpq into both a
static and a dynamic library.
I will take a look at porting the psql frontend as well, but I figured
it was a good idea to send in these patches first - so no major changes
are done to the files before it gets applied (if it does).The patches patch clean against the snapshot from Jun 20 (I don't have
cvs, so I got it from the ftp site). It modifies only the
interfaces/libpq/* files and the include/postgres.h file.
It also creates the following new files:
interfaces/libpq/win32.mak - Makefile for Win32 (Visual C)
interfaces/libpq/libpqdll.c - Routine required to compile dynamic
library
interfaces/libpq/lubpqdll.def - List of functions to export from dynamic
lib
interfaces/libpq/win32.h - Misc header stuff req. to work in win32
win32.mak - Top level make file. Will only
make libpq now.To compile it, you just issue the command
"nmake /F win32.mak"
src directory. A static and a dynamic version will be created.When I have finished checking over the possiblities of doing the psql
part too, I will look at writing a short README on how to do it.I hope this is interesting, and gets incorporated in the source soon.
Regards,
Magnus Hagander
I have applied this fine patch to allow WIN32 compiles of libpq. Nice
job, and a good feature for us.
--
Bruce Momjian | 830 Blythe Avenue
maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)
Import Notes
Reply to msg id not found: 51F537775B63D0119D8D00805FBEB256E3641A@venture.edu.sollentuna.se
Hi!
I was looking for a libpq version to compile in Win32 platform.
I'm porting my applications from mSQL to PostgreSQL 6.3.2 most of it are CGI and run at UNIX box but I will develop a Engeneering Eletric Calculation System for the Win32 platform with all data stored into PostgreSQL at Unix BOX.
Is it possible to get this patch, or it will be available only in PostgreSQL 6.4?
Hello!
Through some minor changes, I have been able to compile the libpq client
libraries on the Win32 platform. Since the libpq communications part has
been rewritten, this has become much easier. Enclosed is a patch that
will allow at least Microsoft Visual C++ to compile libpq into both a
static and a dynamic library.
I will take a look at porting the psql frontend as well, but I figured
it was a good idea to send in these patches first - so no major changes
are done to the files before it gets applied (if it does).The patches patch clean against the snapshot from Jun 20 (I don't have
cvs, so I got it from the ftp site). It modifies only the
interfaces/libpq/* files and the include/postgres.h file.
It also creates the following new files:
interfaces/libpq/win32.mak - Makefile for Win32 (Visual C)
interfaces/libpq/libpqdll.c - Routine required to compile dynamic
library
interfaces/libpq/lubpqdll.def - List of functions to export from dynamic
lib
interfaces/libpq/win32.h - Misc header stuff req. to work in win32
win32.mak - Top level make file. Will only
make libpq now.To compile it, you just issue the command
"nmake /F win32.mak"
src directory. A static and a dynamic version will be created.When I have finished checking over the possiblities of doing the psql
part too, I will look at writing a short README on how to do it.I hope this is interesting, and gets incorporated in the source soon.
Regards,
Magnus HaganderI have applied this fine patch to allow WIN32 compiles of libpq. Nice
job, and a good feature for us.-- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)
---------------------------------------------------------------------------------------------------
Eng. Roberto Joao Lopes Garcia E-mail: roberto@mha.com.br
F. 55 11 848 9906 FAX 55 11 848 9955
MHA Engenharia de Projetos Ltda
E-mail: mha@mha.com.br WWW: http://www.mha.com.br
Av Maia Coelho Aguiar, 215 Bloco D 2 Andar
Centro Empresarial de Sao Paulo
Sao Paulo - BRASIL - 05805 000
---------------------------------------------------------------------------------------------------
Import Notes
Resolved by subject fallback
roberto@mha.com.br (Roberto Joao Lopes Garcia) writes:
Is it possible to get this patch, or it will be available only in
PostgreSQL 6.4?
Since Magnus indicated that his changes depended on the recent libpq
rewrite (with accompanying protocol changes), you'd have to do some
significant surgery to get it to work with a 6.3.2 pgsql server.
If you don't mind running alpha-quality software you could pick up
the current sources from the cvs server ... otherwise better wait
for 6.4.
regards, tom lane
Import Notes
Reply to msg id not found: YourmessageofFri03Jul1998125705-0200199807031452.LAA18038@hipernet.hipernet.com.br | Resolved by subject fallback
roberto@mha.com.br (Roberto Joao Lopes Garcia) writes:
Is it possible to get this patch, or it will be available only in
PostgreSQL 6.4?Since Magnus indicated that his changes depended on the recent libpq
rewrite (with accompanying protocol changes), you'd have to do some
significant surgery to get it to work with a 6.3.2 pgsql server.
Yes, that is correct.
The "old libpq" was much based on using fdopen() on the sockets,
which is not at all supported under Win32. The new code uses send()
and recv(), which made the porting really easy.
//Magnus
Import Notes
Resolved by subject fallback