diff -urN postgresql-7.1.2.orig/src/include/config.h.in postgresql-7.1.2/src/include/config.h.in --- postgresql-7.1.2.orig/src/include/config.h.in Sat Apr 14 22:55:02 2001 +++ postgresql-7.1.2/src/include/config.h.in Sun Jul 1 15:21:26 2001 @@ -675,6 +675,13 @@ #include "os.h" +/* + * The libpq++ headers need this for Win32 native DLL build with MSVC. + * Win32/Cygwin and Unix builds don't. + */ + +#define DLLAPI + /* * The following is used as the arg list for signal handlers. Any ports * that take something other than an int argument should override this in diff -urN postgresql-7.1.2.orig/src/include/config.h.win32 postgresql-7.1.2/src/include/config.h.win32 --- postgresql-7.1.2.orig/src/include/config.h.win32 Fri May 11 01:34:42 2001 +++ postgresql-7.1.2/src/include/config.h.win32 Sun Jul 1 15:21:26 2001 @@ -20,3 +20,13 @@ #define HAVE_ATEXIT #define HAVE_MEMMOVE + +#define HAVE_CXX_STRING_HEADER +#define HAVE_NAMESPACE_STD + +/* This is as good a place as any */ +#ifdef _DLL +#define DLLAPI __declspec(dllexport) +#else +#define DLLAPI __declspec(dllimport) +#endif /* _DLL */ diff -urN postgresql-7.1.2.orig/src/interfaces/libpq++/libpq++dll.rc postgresql-7.1.2/src/interfaces/libpq++/libpq++dll.rc --- postgresql-7.1.2.orig/src/interfaces/libpq++/libpq++dll.rc Thu Jan 1 00:00:00 1970 +++ postgresql-7.1.2/src/interfaces/libpq++/libpq++dll.rc Sun Jul 1 15:21:26 2001 @@ -0,0 +1,34 @@ +#include + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 7,1,2,0 + PRODUCTVERSION 7,1,2,0 + FILEFLAGSMASK 0x3fL + FILEFLAGS 0x0L + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "\0" + VALUE "CompanyName", " \0" + VALUE "FileDescription", "PostgreSQL C++ Access Library\0" + VALUE "FileVersion", "7, 1, 2, 0\0" + VALUE "InternalName", "libpq++\0" + VALUE "LegalCopyright", "Copyright © 2000\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "libpq++.dll\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "PostgreSQL\0" + VALUE "ProductVersion", "7, 1, 2, 0\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff -urN postgresql-7.1.2.orig/src/interfaces/libpq++/pgconnection.h postgresql-7.1.2/src/interfaces/libpq++/pgconnection.h --- postgresql-7.1.2.orig/src/interfaces/libpq++/pgconnection.h Sat Feb 10 02:31:30 2001 +++ postgresql-7.1.2/src/interfaces/libpq++/pgconnection.h Sun Jul 1 15:21:26 2001 @@ -55,7 +55,7 @@ // This class contains all the information about the connection // to the backend process. All the database classes should be // derived from this class to obtain the connection interface. -class PgConnection { +class DLLAPI PgConnection { protected: PGconn* pgConn; // Connection Structure PGresult* pgResult; // Current Query Result diff -urN postgresql-7.1.2.orig/src/interfaces/libpq++/pgcursordb.h postgresql-7.1.2/src/interfaces/libpq++/pgcursordb.h --- postgresql-7.1.2.orig/src/interfaces/libpq++/pgcursordb.h Wed Jan 24 19:43:32 2001 +++ postgresql-7.1.2/src/interfaces/libpq++/pgcursordb.h Sun Jul 1 15:21:26 2001 @@ -36,7 +36,7 @@ // manipulates data through it. The interface will introduce some // ease of use through the methods that will allow cursor specific // operations, like fetch, forward, etc. -class PgCursor : public PgTransaction { +class DLLAPI PgCursor : public PgTransaction { public: PgCursor(const char* conninfo, const char* cursor); // use reasonable & environment defaults // connect to the database with given environment and database name diff -urN postgresql-7.1.2.orig/src/interfaces/libpq++/pgdatabase.h postgresql-7.1.2/src/interfaces/libpq++/pgdatabase.h --- postgresql-7.1.2.orig/src/interfaces/libpq++/pgdatabase.h Wed Jan 24 19:43:32 2001 +++ postgresql-7.1.2/src/interfaces/libpq++/pgdatabase.h Sun Jul 1 15:21:26 2001 @@ -34,7 +34,7 @@ // This is the basic database access class. Its interface should // be used only after a query has been sent to the backend and // results are being received. -class PgDatabase : public PgConnection { +class DLLAPI PgDatabase : public PgConnection { public: // connect to the database with conninfo PgDatabase(const char* conninfo) : PgConnection(conninfo) {} diff -urN postgresql-7.1.2.orig/src/interfaces/libpq++/pglobject.h postgresql-7.1.2/src/interfaces/libpq++/pglobject.h --- postgresql-7.1.2.orig/src/interfaces/libpq++/pglobject.h Wed Jan 24 19:43:32 2001 +++ postgresql-7.1.2/src/interfaces/libpq++/pglobject.h Sun Jul 1 15:21:26 2001 @@ -29,7 +29,7 @@ // PgLargeObject - a class for accessing Large Object in a database // // **************************************************************** -class PgLargeObject : public PgConnection { +class DLLAPI PgLargeObject : public PgConnection { private: int pgFd; Oid pgObject; diff -urN postgresql-7.1.2.orig/src/interfaces/libpq++/pgtransdb.h postgresql-7.1.2/src/interfaces/libpq++/pgtransdb.h --- postgresql-7.1.2.orig/src/interfaces/libpq++/pgtransdb.h Wed Jan 24 19:43:32 2001 +++ postgresql-7.1.2/src/interfaces/libpq++/pgtransdb.h Sun Jul 1 15:21:26 2001 @@ -34,7 +34,7 @@ // This is the database access class that keeps an open // transaction block during its lifetime. The block is ENDed when // the object is destroyed. -class PgTransaction : public PgDatabase { +class DLLAPI PgTransaction : public PgDatabase { public: PgTransaction(const char* conninfo); // use reasonable & environment defaults // connect to the database with given environment and database name diff -urN postgresql-7.1.2.orig/src/interfaces/libpq++/win32.mak postgresql-7.1.2/src/interfaces/libpq++/win32.mak --- postgresql-7.1.2.orig/src/interfaces/libpq++/win32.mak Thu Jan 1 00:00:00 1970 +++ postgresql-7.1.2/src/interfaces/libpq++/win32.mak Sun Jul 1 15:21:26 2001 @@ -0,0 +1,126 @@ +# Makefile for Microsoft Visual C++ 6.0 (or compat) + +# Will build a Win32 static library (non-debug) libpq++.lib +# and a Win32 dynamic library (non-debug) libpq++.dll with import library libpq++dll.lib + + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +.SUFFIXES : .cc + +CPP=cl.exe +RSC=rc.exe + +OUTDIR=.\Release +INTDIR=.\Release +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +ALL : "$(OUTDIR)\libpq++.dll" "$(OUTDIR)\libpq++.lib" + +CLEAN : + -@erase "$(INTDIR)\pgconnection.obj" + -@erase "$(INTDIR)\pgcursordb.obj" + -@erase "$(INTDIR)\pgdatabase.obj" + -@erase "$(INTDIR)\pglobject.obj" + -@erase "$(INTDIR)\pgtransdb.obj" + -@erase "$(OUTDIR)\libpq++.lib" + -@erase "$(OUTDIR)\libpq++.dll" + -@erase "$(OUTDIR)\libpq++dll.exp" + -@erase "$(OUTDIR)\libpq++dll.lib" + -@erase "$(OUTDIR)\libpq++dll.res" + -@erase "*.pch" + -@erase "$(OUTDIR)\libpq++.pch" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP_PROJ=/nologo /TP /MD /W3 /GX /O2 /I "..\..\include" /I "..\libpq" /D "NDEBUG" /D\ + "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\libpq++.pch" /YX\ + /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c /D "HAVE_VSNPRINTF" /D "HAVE_STRDUP" + +CPP_OBJS=.\Release/ +CPP_SBRS=. + +LIB32=link.exe -lib +LIB32_FLAGS=/nologo /out:"$(OUTDIR)\libpq++.lib" +LIB32_OBJS= \ + "$(OUTDIR)\pgconnection.obj" \ + "$(OUTDIR)\pgcursordb.obj" \ + "$(OUTDIR)\pgdatabase.obj" \ + "$(OUTDIR)\pglobject.obj" \ + "$(OUTDIR)\pgtransdb.obj" + +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libpq++dll.res" + +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 wsock32.lib\ + odbccp32.lib libpq.lib msvcrt.lib /nologo /subsystem:windows /dll /incremental:no\ + /pdb:"$(OUTDIR)\libpq++.pdb" /machine:I386 /out:"$(OUTDIR)\libpq++.dll"\ + /implib:"$(OUTDIR)\libpq++dll.lib" /libpath:"..\libpq\release" +LINK32_OBJS= \ + "$(OUTDIR)\pgconnection.obj" \ + "$(OUTDIR)\pgcursordb.obj" \ + "$(OUTDIR)\pgdatabase.obj" \ + "$(OUTDIR)\pglobject.obj" \ + "$(OUTDIR)\pgtransdb.obj" \ + "$(OUTDIR)\libpq++dll.res" + +"$(INTDIR)\libpq++dll.res" : "$(INTDIR)" libpq++dll.rc + $(RSC) $(RSC_PROJ) libpq++dll.rc + +"$(OUTDIR)\libpq++.lib" : "$(OUTDIR)" $(LIB32_OBJS) + $(LIB32) @<< + $(LIB32_FLAGS) $(LIB32_OBJS) +<< + +"$(OUTDIR)\libpq++.dll" : "$(OUTDIR)" $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +.c{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cc{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cc{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< diff -urN postgresql-7.1.2.orig/src/win32.mak postgresql-7.1.2/src/win32.mak --- postgresql-7.1.2.orig/src/win32.mak Tue Jan 18 19:05:29 2000 +++ postgresql-7.1.2/src/win32.mak Sun Jul 1 15:22:15 2001 @@ -19,6 +19,8 @@ if not exist config.h copy config.h.win32 config.h cd .. cd interfaces\libpq + nmake /f win32.mak $(MAKEMACRO) + cd ..\libpq++ nmake /f win32.mak $(MAKEMACRO) cd ..\..\bin\psql nmake /f win32.mak $(MAKEMACRO)