summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-01-06 21:41:45 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-01-06 21:41:45 +0000
commitbbeeea1437e11c5bdeca0c612d2f821b9cd7d251 (patch)
treee23044f553bfc0de6a34aa3415148eb860b8e36c
parent41ca7563865d0117b4c9055ff96ef08a1a14075b (diff)
downloadpostgresql-bbeeea1437e11c5bdeca0c612d2f821b9cd7d251.tar.gz
Minor mop-up for Windows home-directory stuff, per Magnus.
-rw-r--r--src/interfaces/libpq/Makefile4
-rw-r--r--src/interfaces/libpq/fe-connect.c3
-rw-r--r--src/interfaces/libpq/fe-secure.c4
-rw-r--r--src/port/path.c3
4 files changed, 9 insertions, 5 deletions
diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile
index 2909d7c1fc..181414a8d0 100644
--- a/src/interfaces/libpq/Makefile
+++ b/src/interfaces/libpq/Makefile
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.125 2004/12/31 22:03:50 pgsql Exp $
+# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.126 2005/01/06 21:41:44 tgl Exp $
#
#-------------------------------------------------------------------------
@@ -55,7 +55,7 @@ endif
# matter.)
SHLIB_LINK += $(filter -lcrypt -ldes -lkrb -lcom_err -lcrypto -lk5crypto -lkrb5 -lssl -lsocket -lnsl -lresolv -lintl, $(LIBS)) $(PTHREAD_LIBS)
ifeq ($(PORTNAME), win32)
-SHLIB_LINK += -lwsock32 -lws2_32 $(filter -leay32 -lssleay32, $(LIBS))
+SHLIB_LINK += -lwsock32 -lws2_32 -lshell32 $(filter -leay32 -lssleay32, $(LIBS))
endif
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 2949cf64a3..341a74483c 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.298 2005/01/06 20:06:58 tgl Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.299 2005/01/06 21:41:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -35,6 +35,7 @@
#ifdef WIN32
#include "win32.h"
+#define _WIN32_IE 0x0400
#include <shlobj.h>
#else
#include <sys/socket.h>
diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c
index 382c1d9b56..b4c24754aa 100644
--- a/src/interfaces/libpq/fe-secure.c
+++ b/src/interfaces/libpq/fe-secure.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.64 2005/01/06 18:29:10 tgl Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.65 2005/01/06 21:41:44 tgl Exp $
*
* NOTES
* [ Most of these notes are wrong/obsolete, but perhaps not all ]
@@ -817,6 +817,7 @@ client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
fnbuf);
return 0;
}
+#ifndef WIN32
if (!S_ISREG(buf.st_mode) || (buf.st_mode & 0077) ||
buf.st_uid != getuid())
{
@@ -825,6 +826,7 @@ client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
fnbuf);
return 0;
}
+#endif
if ((fp = fopen(fnbuf, "r")) == NULL)
{
printfPQExpBuffer(&conn->errorMessage,
diff --git a/src/port/path.c b/src/port/path.c
index 2620f39263..ea45099dab 100644
--- a/src/port/path.c
+++ b/src/port/path.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/path.c,v 1.48 2005/01/06 18:29:11 tgl Exp $
+ * $PostgreSQL: pgsql/src/port/path.c,v 1.49 2005/01/06 21:41:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,6 +18,7 @@
#include <ctype.h>
#include <sys/stat.h>
#ifdef WIN32
+#define _WIN32_IE 0x0400
#include <shlobj.h>
#else
#include <unistd.h>