  		resetPQExpBuffer(&conn->errorMessage);
 -	}
 +    }
-+    return PGRES_POLLING_WRITING; //Is this correct?
++    return PGRES_POLLING_WRITING; /* FIXME: Should this be PGRES_POLLING_ACTIVE instead? */
 +#else
 +	/* shouldn't get here */
 +	return PGRES_POLLING_FAILED;

 				if (pollres == PGRES_POLLING_OK)
 				{
 					/* SSL handshake done, ready to send startup packet */
diff -urN postgresql-8.2.3/src/interfaces/libpq/fe-secure.c postgresql-8.2.3-tsnorri/src/interfaces/libpq/fe-secure.c
--- postgresql-8.2.3/src/interfaces/libpq/fe-secure.c	2006-10-06 20:14:01.000000000 +0300
+++ postgresql-8.2.3-tsnorri/src/interfaces/libpq/fe-secure.c	2007-02-06 12:37:06.000000000 +0200
@@ -193,10 +193,10 @@
 }
 

diff -urN postgresql-8.2.3/src/include/libpq/pqcomm.h postgresql-8.2.3-tsnorri/src/include/libpq/pqcomm.h
--- postgresql-8.2.3/src/include/libpq/pqcomm.h	2006-06-08 01:24:45.000000000 +0300
+++ postgresql-8.2.3-tsnorri/src/include/libpq/pqcomm.h	2007-02-24 20:14:34.000000000 +0200
@@ -147,19 +147,6 @@
 #define MAX_STARTUP_PACKET_LENGTH 10000
 
 
-/* These are the authentication request codes sent by the backend. */
-
-#define AUTH_REQ_OK			0	/* User is authenticated  */
-#define AUTH_REQ_KRB4		1	/* Kerberos V4. Not supported any more. */
-#define AUTH_REQ_KRB5		2	/* Kerberos V5 */
-#define AUTH_REQ_PASSWORD	3	/* Password */
-#define AUTH_REQ_CRYPT		4	/* crypt password */
-#define AUTH_REQ_MD5		5	/* md5 password */
-#define AUTH_REQ_SCM_CREDS	6	/* transfer SCM credentials */
-
-typedef uint32 AuthRequest;
-
-
 /*
  * A client can also send a cancel-current-operation request to the postmaster.
  * This is uglier than sending it directly to the client's backend, but it
diff -urN postgresql-8.2.3/src/interfaces/libpq/blibpqdll.def postgresql-8.2.3-tsnorri/src/interfaces/libpq/blibpqdll.def
--- postgresql-8.2.3/src/interfaces/libpq/blibpqdll.def	2007-02-07 06:44:09.000000000 +0200
+++ postgresql-8.2.3-tsnorri/src/interfaces/libpq/blibpqdll.def	2007-02-24 19:52:16.000000000 +0200
@@ -137,6 +137,7 @@
     _PQdescribePortal          @ 134
     _PQsendDescribePrepared    @ 135
     _PQsendDescribePortal      @ 136
+    _PQauthRequest             @ 137
 
 ; Aliases for MS compatible names
     PQconnectdb               = _PQconnectdb
@@ -275,3 +276,4 @@
     PQdescribePortal          = _PQdescribePortal
     PQsendDescribePrepared    = _PQsendDescribePrepared
     PQsendDescribePortal      = _PQsendDescribePortal
+    PQauthRequest             = _PQauthRequest
diff -urN postgresql-8.2.3/src/interfaces/libpq/exports.txt postgresql-8.2.3-tsnorri/src/interfaces/libpq/exports.txt
--- postgresql-8.2.3/src/interfaces/libpq/exports.txt	2006-08-18 22:52:39.000000000 +0300
+++ postgresql-8.2.3-tsnorri/src/interfaces/libpq/exports.txt	2007-02-24 19:51:30.000000000 +0200
@@ -136,3 +136,4 @@
 PQdescribePortal          134
 PQsendDescribePrepared    135
 PQsendDescribePortal      136
+PQauthRequest             137
diff -urN postgresql-8.2.3/src/interfaces/libpq/fe-connect.c postgresql-8.2.3-tsnorri/src/interfaces/libpq/fe-connect.c
--- postgresql-8.2.3/src/interfaces/libpq/fe-connect.c	2006-11-21 18:28:00.000000000 +0200
+++ postgresql-8.2.3-tsnorri/src/interfaces/libpq/fe-connect.c	2007-02-24 19:49:00.000000000 +0200
@@ -998,6 +998,7 @@
 
 			/* Special cases: proceed without waiting. */
