diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-01-26 19:24:21 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-01-26 19:24:21 +0000 |
commit | 953570a8999cd7e8d79f9f62d98522a59d452c61 (patch) | |
tree | 93abcac36de1463a98326fdef2a882e52c06ff1d /src/interfaces/libpq | |
parent | 9ea9892c99843e1b210ae3bbd91fbb702e6dd3ac (diff) | |
download | postgresql-953570a8999cd7e8d79f9f62d98522a59d452c61.tar.gz postgresql-953570a8999cd7e8d79f9f62d98522a59d452c61.zip |
Use SHGetFolderPath instead of SHGetSpecialFolderPath to find the
APPDATA directory on Windows. Magnus Hagander
Diffstat (limited to 'src/interfaces/libpq')
-rw-r--r-- | src/interfaces/libpq/Makefile | 4 | ||||
-rw-r--r-- | src/interfaces/libpq/fe-connect.c | 6 | ||||
-rw-r--r-- | src/interfaces/libpq/win32.mak | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile index 181414a8d02..d4207e6d3f5 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.126 2005/01/06 21:41:44 tgl Exp $ +# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.126.4.1 2005/01/26 19:24:19 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 -lshell32 $(filter -leay32 -lssleay32, $(LIBS)) +SHLIB_LINK += -lshfolder -lwsock32 -lws2_32 $(filter -leay32 -lssleay32, $(LIBS)) endif diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 52f0fe32ac6..db087e305c1 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.301 2005/01/14 00:25:56 momjian Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.301.4.1 2005/01/26 19:24:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -38,7 +38,7 @@ #ifdef _WIN32_IE #undef _WIN32_IE #endif -#define _WIN32_IE 0x0400 +#define _WIN32_IE 0x0500 #ifdef near #undef near #endif @@ -3296,7 +3296,7 @@ pqGetHomeDirectory(char *buf, int bufsize) char tmppath[MAX_PATH]; ZeroMemory(tmppath, sizeof(tmppath)); - if (!SHGetSpecialFolderPath(NULL, tmppath, CSIDL_APPDATA, FALSE)) + if (SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, tmppath) != S_OK) return false; snprintf(buf, bufsize, "%s/postgresql", tmppath); return true; diff --git a/src/interfaces/libpq/win32.mak b/src/interfaces/libpq/win32.mak index 25a30f3487d..0377f43b548 100644 --- a/src/interfaces/libpq/win32.mak +++ b/src/interfaces/libpq/win32.mak @@ -138,7 +138,7 @@ LIB32_OBJS= \ RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libpq.res" LINK32=link.exe -LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib $(SSL_LIBS) \ +LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib shfolder.lib wsock32.lib $(SSL_LIBS) \ /nologo /subsystem:windows /dll $(LOPT) /incremental:no\ /pdb:"$(OUTDIR)\libpqdll.pdb" /machine:I386 /out:"$(OUTDIR)\$(OUTFILENAME).dll"\ /implib:"$(OUTDIR)\$(OUTFILENAME)dll.lib" /def:$(OUTFILENAME)dll.def |