On Cygwin, do initial connect() call in blocking mode, per report from
authorTom Lane <[email protected]>
Sat, 31 Mar 2001 23:14:37 +0000 (23:14 +0000)
committerTom Lane <[email protected]>
Sat, 31 Mar 2001 23:14:37 +0000 (23:14 +0000)
Jason Tishler.

src/interfaces/libpq/fe-connect.c

index a4934e601c923d594b00fad640799af1029088d9..a557b61a5c90acecf4a6d4d9d812233b472e8d8b 100644 (file)
@@ -916,7 +916,7 @@ connectDBStart(PGconn *conn)
         *
         * Ewan Mellor <[email protected]>.
         */
-#if (!defined(WIN32) || defined(WIN32_NON_BLOCKING_CONNECTIONS)) && !defined(USE_SSL)
+#if ((!defined(WIN32) && !defined(__CYGWIN__)) || defined(WIN32_NON_BLOCKING_CONNECTIONS)) && !defined(USE_SSL)
        if (connectMakeNonblocking(conn) == 0)
                goto connect_errReturn;
 #endif
@@ -1036,7 +1036,7 @@ connectDBStart(PGconn *conn)
         * This makes the connection non-blocking, for all those cases which
         * forced us not to do it above.
         */
-#if (defined(WIN32) && !defined(WIN32_NON_BLOCKING_CONNECTIONS)) || defined(USE_SSL)
+#if ((defined(WIN32) || defined(__CYGWIN__)) && !defined(WIN32_NON_BLOCKING_CONNECTIONS)) || defined(USE_SSL)
        if (connectMakeNonblocking(conn) == 0)
                goto connect_errReturn;
 #endif