1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-18 05:01:01 +03:00
Here is a patch to bring both libpq and psql to a state where it compiles on
win32 (native) again. A lot of things have changed, and I have not been able
to keep up with them all, so it has been broken for quite a while.
After this patch, at least it compiles. It also talks "basic talk" to the
server, but I have not yet tested all things. Sending queries, and using
e.g. \d or \dt works fine. The rest will have to be tested further.
It also bumps the version on libpq.dll to 7.0.

Everything should be enclosed in #ifdef WIN32, unless I have missed
something. Except for one or maybe two places where I have moved a #include
that should not be used on win32 from the "global area" into a "#ifndef
WIN32 area".


//Magnus
This commit is contained in:
Bruce Momjian
2000-01-18 19:05:31 +00:00
parent 2eebcddeaa
commit 0cb6bc70ce
14 changed files with 121 additions and 17 deletions

View File

@@ -111,10 +111,12 @@ setQFout(const char *fname)
}
/* Direct signals */
#ifndef WIN32
if (pset.queryFoutPipe)
pqsignal(SIGPIPE, SIG_IGN);
else
pqsignal(SIGPIPE, SIG_DFL);
#endif
return status;
}
@@ -252,11 +254,15 @@ PSQLexec(const char *query)
return NULL;
cancelConn = pset.db;
#ifndef WIN32
pqsignal(SIGINT, handle_sigint); /* control-C => cancel */
#endif
res = PQexec(pset.db, query);
#ifndef WIN32
pqsignal(SIGINT, SIG_DFL); /* now control-C is back to normal */
#endif
if (PQstatus(pset.db) == CONNECTION_BAD)
{
@@ -345,11 +351,15 @@ SendQuery(const char *query)
}
cancelConn = pset.db;
#ifndef WIN32
pqsignal(SIGINT, handle_sigint);
#endif
results = PQexec(pset.db, query);
#ifndef WIN32
pqsignal(SIGINT, SIG_DFL);
#endif
if (results == NULL)
{