aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-connect.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2000-10-03 03:11:26 +0000
committerBruce Momjian <bruce@momjian.us>2000-10-03 03:11:26 +0000
commit87c0e623ba14c2de376ca9af06fb21da7b2c2215 (patch)
treee67887aaff9248f2e0c866566ed0b2967cabaae2 /src/interfaces/libpq/fe-connect.c
parentde1af06287dd0b169385b0756074a0b24feb123c (diff)
downloadpostgresql-87c0e623ba14c2de376ca9af06fb21da7b2c2215.tar.gz
postgresql-87c0e623ba14c2de376ca9af06fb21da7b2c2215.zip
New diff that now covers the entire tree. Applying this gets postgresql
working on the VERY latest version of BeOS. I'm sure there will be alot of comments, but then if there weren't I'd be disappointed! Thanks for your continuing efforts to get this into your tree. Haven't bothered with the new files as they haven't changed. BTW Peter, the compiler is "broken" about the bool define and so on. I'm filing a bug report to try and get it addressed. Hopefully then we can tidy up the code a bit. I await the replies with interest :) David Reid
Diffstat (limited to 'src/interfaces/libpq/fe-connect.c')
-rw-r--r--src/interfaces/libpq/fe-connect.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 2296a2db6ce..663ec7cb668 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.134 2000/09/27 15:17:56 petere Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.135 2000/10/03 03:11:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -619,8 +619,11 @@ update_db_info(PGconn *conn)
static int
connectMakeNonblocking(PGconn *conn)
{
-#ifndef WIN32
+#ifdef WIN32
if (fcntl(conn->sock, F_SETFL, O_NONBLOCK) < 0)
+#elif defined(__BEOS__)
+ int on = 1;
+ if (ioctl(conn->sock, FIONBIO, &on) != 0)
#else
int on = 1;
@@ -959,7 +962,6 @@ static int
connectDBComplete(PGconn *conn)
{
PostgresPollingStatusType flag = PGRES_POLLING_WRITING;
-
if (conn == NULL || conn->status == CONNECTION_BAD)
return 0;
@@ -1039,7 +1041,6 @@ PostgresPollingStatusType
PQconnectPoll(PGconn *conn)
{
PGresult *res;
-
if (conn == NULL)
return PGRES_POLLING_FAILED;