1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Hello, i noticed that win32 native stopped working/compiling after the SSL merge

.
So i took the opportunity to fix some stuff:

1. Made the thing compile (typos & needed definitions) with the new pqsecure_* s
tuff, and added fe-secure.c to the win32.mak makefile.
2. Fixed some MULTIBYTE compile errors (when building without MB support).
3. Made it do that you can build with debug info: "nmake -f win32.mak DEBUG=1".
4. Misc small compiler speedup changes.

The resulting .dll has been tested in production, and everything seems ok.
I CC:ed -hackers because i'm not sure about two things:

1. In libpq-int.h I typedef ssize_t as an int because Visual C (v6.0)
doesn't de fine ssize_t. Is that ok, or is there any standard about what
type should be use d for ssize_t?

2. To keep the .dll api consistent regarding MULTIBYTE I just return -1
in fe-connect.c:PQsetClientEncoding() instead of taking away the whole
function. I wonder if i should do any compares with the
conn->client_encoding and return 0 if not hing would have changed (if so
how do i check that?).

Regards

Magnus Naeslund
This commit is contained in:
Bruce Momjian
2002-07-20 05:43:31 +00:00
parent 1430271e99
commit b6d2faaf24
8 changed files with 44 additions and 9 deletions

View File

@ -30,6 +30,15 @@ CFG=Release
!ERROR An invalid configuration was specified.
!ENDIF
!IFDEF DEBUG
OPT=/Od
LOPT=/debug
DEBUGDEF=/D _DEBUG
!ELSE
OPT=/O2
LOPT=
DEBUGDEF=/D NDEBUG
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
@ -62,6 +71,7 @@ CLEAN :
-@erase "$(INTDIR)\fe-lobj.obj"
-@erase "$(INTDIR)\fe-misc.obj"
-@erase "$(INTDIR)\fe-print.obj"
-@erase "$(INTDIR)\fe-secure.obj"
-@erase "$(INTDIR)\pqexpbuffer.obj"
-@erase "$(OUTDIR)\libpqdll.obj"
-@erase "$(OUTDIR)\win32.obj"
@ -80,7 +90,7 @@ CLEAN :
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\..\include" /D "FRONTEND" /D "NDEBUG" /D\
CPP_PROJ=/nologo /MD /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"
@ -95,7 +105,7 @@ CPP_OBJS=.\Release/
CPP_SBRS=.
LIB32=link.exe -lib
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\libpq.lib"
LIB32_FLAGS=$(LOPT) /nologo /out:"$(OUTDIR)\libpq.lib"
LIB32_OBJS= \
"$(OUTDIR)\win32.obj" \
"$(INTDIR)\dllist.obj" \
@ -106,6 +116,7 @@ LIB32_OBJS= \
"$(INTDIR)\fe-lobj.obj" \
"$(INTDIR)\fe-misc.obj" \
"$(INTDIR)\fe-print.obj" \
"$(INTDIR)\fe-secure.obj" \
"$(INTDIR)\pqexpbuffer.obj"
!IFDEF MULTIBYTE
@ -116,7 +127,7 @@ RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libpq.res"
LINK32=link.exe
LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib wsock32.lib\
/nologo /subsystem:windows /dll /incremental:no\
/nologo /subsystem:windows /dll $(LOPT) /incremental:no\
/pdb:"$(OUTDIR)\libpqdll.pdb" /machine:I386 /out:"$(OUTDIR)\libpq.dll"\
/implib:"$(OUTDIR)\libpqdll.lib" /def:libpqdll.def
LINK32_OBJS= \