aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-connect.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2000-10-03 03:39:46 +0000
committerBruce Momjian <bruce@momjian.us>2000-10-03 03:39:46 +0000
commit2737974085c897b4f75250c665e52ca84208e02c (patch)
tree3df0bb935baaf44ec6d391e43c2c015acb57879a /src/interfaces/libpq/fe-connect.c
parent734b1f7655c257d3faa1f3af0d3d9cb04a8dfae6 (diff)
downloadpostgresql-2737974085c897b4f75250c665e52ca84208e02c.tar.gz
postgresql-2737974085c897b4f75250c665e52ca84208e02c.zip
Cleanup of fe-connect ifdef platform problem added with beos.
Diffstat (limited to 'src/interfaces/libpq/fe-connect.c')
-rw-r--r--src/interfaces/libpq/fe-connect.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 663ec7cb668..a02d0ee3ed4 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.135 2000/10/03 03:11:25 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.136 2000/10/03 03:39:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -620,14 +620,13 @@ static int
connectMakeNonblocking(PGconn *conn)
{
#ifdef WIN32
- if (fcntl(conn->sock, F_SETFL, O_NONBLOCK) < 0)
+ int on = 1;
+ if (ioctlsocket(conn->sock, FIONBIO, &on) != 0)
#elif defined(__BEOS__)
int on = 1;
if (ioctl(conn->sock, FIONBIO, &on) != 0)
#else
- int on = 1;
-
- if (ioctlsocket(conn->sock, FIONBIO, &on) != 0)
+ if (fcntl(conn->sock, F_SETFL, O_NONBLOCK) < 0)
#endif
{
printfPQExpBuffer(&conn->errorMessage,