Cleanup of fe-connect ifdef platform problem added with beos.

This commit is contained in:
Bruce Momjian 2000-10-03 03:39:46 +00:00
parent 734b1f7655
commit 2737974085

View file

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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) connectMakeNonblocking(PGconn *conn)
{ {
#ifdef WIN32 #ifdef WIN32
if (fcntl(conn->sock, F_SETFL, O_NONBLOCK) < 0) int on = 1;
if (ioctlsocket(conn->sock, FIONBIO, &on) != 0)
#elif defined(__BEOS__) #elif defined(__BEOS__)
int on = 1; int on = 1;
if (ioctl(conn->sock, FIONBIO, &on) != 0) if (ioctl(conn->sock, FIONBIO, &on) != 0)
#else #else
int on = 1; if (fcntl(conn->sock, F_SETFL, O_NONBLOCK) < 0)
if (ioctlsocket(conn->sock, FIONBIO, &on) != 0)
#endif #endif
{ {
printfPQExpBuffer(&conn->errorMessage, printfPQExpBuffer(&conn->errorMessage,