# -*-makefile-*-
-# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.208 2004/12/19 02:16:18 momjian Exp $
+# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.209 2005/01/26 19:23:59 tgl Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
endif
endif
-# to make ws2_32.lib the last library
+# to make ws2_32.lib the last library, and always link with shfolder,
+# so SHGetFolderName isn't picked up from shell32.dll
ifeq ($(PORTNAME),win32)
-LIBS += -lws2_32
+LIBS += -lws2_32 -lshfolder
endif
# Not really standard libc functions, used by the backend.
LINK32=link.exe
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
- advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
+ advapi32.lib shfolder.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
odbccp32.lib wsock32.lib /nologo /subsystem:console /incremental:no\
/pdb:"$(OUTDIR)\psql.pdb" /machine:I386 $(LOPT) /out:"$(OUTDIR)\psql.exe"
LINK32_OBJS= \
#
# Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.30 2005/01/18 05:00:17 momjian Exp $
+# $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.31 2005/01/26 19:24:01 tgl Exp $
#
#-------------------------------------------------------------------------
SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) \
$(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(PTHREAD_LIBS)
+ifeq ($(PORTNAME), win32)
+# Link to shfolder.dll instead of shell32.dll
+SHLIB_LINK += -lshfolder
+endif
+
all: all-lib
# Shared library stuff
# 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.127 2005/01/18 05:00:30 momjian Exp $
+# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.128 2005/01/26 19:24:02 tgl Exp $
#
#-------------------------------------------------------------------------
# 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
*
*
* 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.302 2005/01/26 19:24:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifdef _WIN32_IE
#undef _WIN32_IE
#endif
-#define _WIN32_IE 0x0400
+#define _WIN32_IE 0x0500
#ifdef near
#undef near
#endif
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;
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
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/path.c,v 1.50 2005/01/10 00:19:51 tgl Exp $
+ * $PostgreSQL: pgsql/src/port/path.c,v 1.51 2005/01/26 19:24:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifdef _WIN32_IE
#undef _WIN32_IE
#endif
-#define _WIN32_IE 0x0400
+#define _WIN32_IE 0x0500
#ifdef near
#undef near
#endif
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(ret_path, MAXPGPATH, "%s/postgresql", tmppath);
return true;