aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2004-03-09 04:53:37 +0000
committerBruce Momjian <bruce@momjian.us>2004-03-09 04:53:37 +0000
commit53cd7cd8a9168d4b2e2feb52129336429cc99b98 (patch)
treef2d9dd2f786a6cdaeac1bab7dbdb5c27c447e006 /src
parentf0f4e82f45462349bb30f3c4cc9792fa54525575 (diff)
downloadpostgresql-53cd7cd8a9168d4b2e2feb52129336429cc99b98.tar.gz
postgresql-53cd7cd8a9168d4b2e2feb52129336429cc99b98.zip
Make a separate win32 debug DLL along with the non-debug version:
Currently, src/interfaces/libpq/win32.mak builds a statically-linked library "libpq.lib", a debug dll "libpq.dll", import library for the debug dll "libpqdll.lib", a release dll "libpq.dll", import library for the release dll "libpqdll.lib". To avoid naming clashes, I would make the debug dll and import libraries "libpqd.dll" and "libpqddll.lib". Basically, the debug build uses the cl flags: "/MDd /D _DEBUG", and the release build uses the cl flags "/MD /D NDEBUG". Usually the debug build has a "D" suffix on the file name, so for example: libpqd.dll libpq, debug build libpqd.lib libpq, debug build, import library libpq.dll libpq, release build libpq.lib libpq, release build, import library David Turner
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/libpq/libpqddll.def115
-rw-r--r--src/interfaces/libpq/win32.mak34
2 files changed, 133 insertions, 16 deletions
diff --git a/src/interfaces/libpq/libpqddll.def b/src/interfaces/libpq/libpqddll.def
new file mode 100644
index 00000000000..bd2460dffbc
--- /dev/null
+++ b/src/interfaces/libpq/libpqddll.def
@@ -0,0 +1,115 @@
+; DEF file for MS VC++
+LIBRARY LIBPQD
+DESCRIPTION "PostgreSQL Client Library"
+EXPORTS
+ PQconnectdb @ 1
+ PQsetdbLogin @ 2
+ PQconndefaults @ 3
+ PQfinish @ 4
+ PQreset @ 5
+ PQrequestCancel @ 6
+ PQdb @ 7
+ PQuser @ 8
+ PQpass @ 9
+ PQhost @ 10
+ PQport @ 11
+ PQtty @ 12
+ PQoptions @ 13
+ PQstatus @ 14
+ PQerrorMessage @ 15
+ PQsocket @ 16
+ PQbackendPID @ 17
+ PQtrace @ 18
+ PQuntrace @ 19
+ PQsetNoticeProcessor @ 20
+ PQexec @ 21
+ PQnotifies @ 22
+ PQsendQuery @ 23
+ PQgetResult @ 24
+ PQisBusy @ 25
+ PQconsumeInput @ 26
+ PQgetline @ 27
+ PQputline @ 28
+ PQgetlineAsync @ 29
+ PQputnbytes @ 30
+ PQendcopy @ 31
+ PQfn @ 32
+ PQresultStatus @ 33
+ PQntuples @ 34
+ PQnfields @ 35
+ PQbinaryTuples @ 36
+ PQfname @ 37
+ PQfnumber @ 38
+ PQftype @ 39
+ PQfsize @ 40
+ PQfmod @ 41
+ PQcmdStatus @ 42
+ PQoidStatus @ 43
+ PQcmdTuples @ 44
+ PQgetvalue @ 45
+ PQgetlength @ 46
+ PQgetisnull @ 47
+ PQclear @ 48
+ PQmakeEmptyPGresult @ 49
+ PQprint @ 50
+ PQdisplayTuples @ 51
+ PQprintTuples @ 52
+ lo_open @ 53
+ lo_close @ 54
+ lo_read @ 55
+ lo_write @ 56
+ lo_lseek @ 57
+ lo_creat @ 58
+ lo_tell @ 59
+ lo_unlink @ 60
+ lo_import @ 61
+ lo_export @ 62
+ pgresStatus @ 63
+ PQmblen @ 64
+ PQresultErrorMessage @ 65
+ PQresStatus @ 66
+ termPQExpBuffer @ 67
+ appendPQExpBufferChar @ 68
+ initPQExpBuffer @ 69
+ resetPQExpBuffer @ 70
+ PQoidValue @ 71
+ PQclientEncoding @ 72
+ PQenv2encoding @ 73
+ appendBinaryPQExpBuffer @ 74
+ appendPQExpBufferStr @ 75
+ destroyPQExpBuffer @ 76
+ createPQExpBuffer @ 77
+ PQconninfoFree @ 78
+ PQconnectPoll @ 79
+ PQconnectStart @ 80
+ PQflush @ 81
+ PQisnonblocking @ 82
+ PQresetPoll @ 83
+ PQresetStart @ 84
+ PQsetClientEncoding @ 85
+ PQsetnonblocking @ 86
+ PQfreeNotify @ 87
+ PQescapeString @ 88
+ PQescapeBytea @ 89
+ printfPQExpBuffer @ 90
+ appendPQExpBuffer @ 91
+ pg_encoding_to_char @ 92
+ pg_utf_mblen @ 93
+ PQunescapeBytea @ 94
+ PQfreemem @ 95
+ PQtransactionStatus @ 96
+ PQparameterStatus @ 97
+ PQprotocolVersion @ 98
+ PQsetErrorVerbosity @ 99
+ PQsetNoticeReceiver @ 100
+ PQexecParams @ 101
+ PQsendQueryParams @ 102
+ PQputCopyData @ 103
+ PQputCopyEnd @ 104
+ PQgetCopyData @ 105
+ PQresultErrorField @ 106
+ PQftable @ 107
+ PQftablecol @ 108
+ PQfformat @ 109
+ PQexecPrepared @ 110
+ PQsendQueryPrepared @ 111
diff --git a/src/interfaces/libpq/win32.mak b/src/interfaces/libpq/win32.mak
index 436a80fb9be..3623b1fe579 100644
--- a/src/interfaces/libpq/win32.mak
+++ b/src/interfaces/libpq/win32.mak
@@ -1,7 +1,7 @@
# Makefile for Microsoft Visual C++ 5.0 (or compat)
-# Will build a Win32 static library libpq.lib
-# and a Win32 dynamic library libpq.dll with import library libpqdll.lib
+# Will build a Win32 static library libpq(d).lib
+# and a Win32 dynamic library libpq(d).dll with import library libpq(d)dll.lib
# USE_SSL=1 will compile with OpenSSL
# DEBUG=1 compiles with debugging symbols
@@ -10,13 +10,15 @@
!MESSAGE
!IFDEF DEBUG
-OPT=/Od /Zi
+OPT=/Od /Zi /MDd
LOPT=/debug
DEBUGDEF=/D _DEBUG
+OUTFILENAME=libpqd
!ELSE
-OPT=/O2
+OPT=/O2 /MD
LOPT=
DEBUGDEF=/D NDEBUG
+OUTFILENAME=libpq
!ENDIF
!IF "$(OS)" == "Windows_NT"
@@ -39,7 +41,7 @@ CPP_OBJS=.\Release/
!ENDIF
-ALL : "$(OUTDIR)\libpq.lib" "$(OUTDIR)\libpq.dll"
+ALL : "$(OUTDIR)\$(OUTFILENAME).lib" "$(OUTDIR)\$(OUTFILENAME).dll"
CLEAN :
-@erase "$(INTDIR)\getaddrinfo.obj"
@@ -62,20 +64,20 @@ CLEAN :
-@erase "$(INTDIR)\pqexpbuffer.obj"
-@erase "$(OUTDIR)\libpqdll.obj"
-@erase "$(OUTDIR)\win32.obj"
- -@erase "$(OUTDIR)\libpq.lib"
- -@erase "$(OUTDIR)\libpq.dll"
+ -@erase "$(OUTDIR)\$(OUTFILENAME).lib"
+ -@erase "$(OUTDIR)\$(OUTFILENAME).dll"
-@erase "$(OUTDIR)\libpq.res"
-@erase "*.pch"
-@erase "$(OUTDIR)\libpq.pch"
- -@erase "$(OUTDIR)\libpqdll.exp"
- -@erase "$(OUTDIR)\libpqdll.lib"
+ -@erase "$(OUTDIR)\$(OUTFILENAME)dll.exp"
+ -@erase "$(OUTDIR)\$(OUTFILENAME)dll.lib"
-@erase "$(INTDIR)\wchar.obj"
-@erase "$(INTDIR)\encnames.obj"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-CPP_PROJ=/nologo /MD /W3 /GX $(OPT) /I "..\..\include" /D "FRONTEND" $(DEBUGDEF) /D\
+CPP_PROJ=/nologo /W3 /GX $(OPT) /I "..\..\include" /D "FRONTEND" $(DEBUGDEF) /D\
"WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\libpq.pch" /YX\
/Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c /D "HAVE_VSNPRINTF" /D "HAVE_STRDUP"
@@ -87,7 +89,7 @@ SSL_LIBS=ssleay32.lib libeay32.lib gdi32.lib
CPP_SBRS=.
LIB32=link.exe -lib
-LIB32_FLAGS=$(LOPT) /nologo /out:"$(OUTDIR)\libpq.lib"
+LIB32_FLAGS=$(LOPT) /nologo /out:"$(OUTDIR)\$(OUTFILENAME).lib"
LIB32_OBJS= \
"$(INTDIR)\win32.obj" \
"$(INTDIR)\getaddrinfo.obj" \
@@ -117,15 +119,15 @@ RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libpq.res"
LINK32=link.exe
LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib wsock32.lib $(SSL_LIBS) \
/nologo /subsystem:windows /dll $(LOPT) /incremental:no\
- /pdb:"$(OUTDIR)\libpqdll.pdb" /machine:I386 /out:"$(OUTDIR)\libpq.dll"\
- /implib:"$(OUTDIR)\libpqdll.lib" /def:libpqdll.def
+ /pdb:"$(OUTDIR)\libpqdll.pdb" /machine:I386 /out:"$(OUTDIR)\$(OUTFILENAME).dll"\
+ /implib:"$(OUTDIR)\$(OUTFILENAME)dll.lib" /def:$(OUTFILENAME)dll.def
LINK32_OBJS= \
"$(INTDIR)\libpqdll.obj" \
- "$(OUTDIR)\libpq.lib" \
+ "$(OUTDIR)\$(OUTFILENAME).lib" \
"$(OUTDIR)\libpq.res"
-"$(OUTDIR)\libpq.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
+"$(OUTDIR)\$(OUTFILENAME).lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
$(LIB32) @<<
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
<<
@@ -134,7 +136,7 @@ LINK32_OBJS= \
$(RSC) $(RSC_PROJ) libpq.rc
-"$(OUTDIR)\libpq.dll" : "$(OUTDIR)" "$(OUTDIR)\libpqdll.obj" "$(INTDIR)\libpqdll.obj" "$(INTDIR)\libpq.res"
+"$(OUTDIR)\$(OUTFILENAME).dll" : "$(OUTDIR)" "$(OUTDIR)\libpqdll.obj" "$(INTDIR)\libpqdll.obj" "$(INTDIR)\libpq.res"
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<