*** ./fe-connect.c Tue Jun 12 20:03:04 2001
--- ./fe-connect1.c Fri Jun 29 05:25:18 2001
***************
*** 189,195 ****
  static void defaultNoticeProcessor(void *arg, const char *message);
  static int parseServiceInfo(PQconninfoOption *options,
       PQExpBuffer errorMessage);
!

  /* ----------------
   *  Connecting to a Database
--- 189,195 ----
  static void defaultNoticeProcessor(void *arg, const char *message);
  static int parseServiceInfo(PQconninfoOption *options,
       PQExpBuffer errorMessage);
! static char FLastError[200];

  /* ----------------
   *  Connecting to a Database
***************
*** 240,249 ****
  PQconnectdb(const char *conninfo)
  {
   PGconn    *conn = PQconnectStart(conninfo);
-
   if (conn && conn->status != CONNECTION_BAD)
    (void) connectDBComplete(conn);
-
   return conn;
  }

--- 240,247 ----
***************
*** 291,296 ****
--- 289,295 ----
   {
    conn->status = CONNECTION_BAD;
    /* errorMessage is already set */
+   sprintf( FLastError, "PQconnectStart-Invalid Connection Info");
    return conn;
   }

***************
*** 516,523 ****
    conn->require_ssl = 0;
  #endif

!  if (error)
    conn->status = CONNECTION_BAD;
   else
   {
    if (connectDBStart(conn))
--- 515,524 ----
    conn->require_ssl = 0;
  #endif

!  if (error){
    conn->status = CONNECTION_BAD;
+   sprintf( FLastError, "Failed to set DBLogin");
+  }
   else
   {
    if (connectDBStart(conn))
***************
*** 709,717 ****
   if   (fcntl(conn->sock, F_SETFL, O_NONBLOCK) < 0)
  #endif
   {
    printfPQExpBuffer(&conn->errorMessage,
!      "connectMakeNonblocking -- fcntl() failed: errno=%d\n%s\n",
!         errno, strerror(errno));
    return 0;
   }

--- 710,724 ----
   if   (fcntl(conn->sock, F_SETFL, O_NONBLOCK) < 0)
  #endif
   {
+  #ifdef WIN32
+   sprintf( FLastError, "connectMakeNonblocking -- fcntl() failed:
