win32 libpq - Mailing list pgsql-patches

From Andreas Pflug
Subject win32 libpq
Date
Msg-id 3F490991.90204@pse-consulting.de
Whole thread Raw
List pgsql-patches
The attached patch allows libpq to be compiled under native win32. It
adds the missing thread.c.
Additionally, it corrects the option to compile for debugging.

Regards,
Andreas

RCS file: /projects/cvsroot/pgsql-server/src/include/pg_config.h.win32,v
retrieving revision 1.11
diff -u -r1.11 pg_config.h.win32
--- pg_config.h.win32    12 Jun 2003 08:15:29 -0000    1.11
+++ pg_config.h.win32    24 Aug 2003 18:26:16 -0000
@@ -60,4 +60,9 @@
 #include <windows.h>
 #endif

+#include <port/win32.h>
+
+/* getpwuid doesn't exist under win32 */
+#define getpwuid(uid) NULL
+
 #endif /* pg_config_h_win32__ */
RCS file: /projects/cvsroot/pgsql-server/src/interfaces/libpq/win32.mak,v
retrieving revision 1.18
diff -u -r1.18 win32.mak
--- win32.mak    12 Jun 2003 08:15:29 -0000    1.18
+++ win32.mak    24 Aug 2003 18:03:43 -0000
@@ -8,7 +8,7 @@
 !MESSAGE

 !IFDEF DEBUG
-OPT=/Od
+OPT=/Od /Zi
 LOPT=/debug
 DEBUGDEF=/D _DEBUG
 !ELSE
@@ -26,12 +26,16 @@
 CPP=cl.exe
 RSC=rc.exe

+!IFDEF DEBUG
+OUTDIR=.\Debug
+INTDIR=.\Debug
+CPP_OBJS=.\Debug/
+!ELSE
 OUTDIR=.\Release
 INTDIR=.\Release
+CPP_OBJS=.\Release/
+!ENDIF

-# Begin Custom Macros
-OutDir=.\Release
-# End Custom Macros

 ALL : "$(OUTDIR)\libpq.lib" "$(OUTDIR)\libpq.dll"

@@ -72,16 +76,15 @@
  "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=$(LOPT) /nologo /out:"$(OUTDIR)\libpq.lib"
 LIB32_OBJS= \
-    "$(OUTDIR)\win32.obj" \
+    "$(INTDIR)\win32.obj" \
     "$(INTDIR)\getaddrinfo.obj" \
     "$(INTDIR)\inet_aton.obj" \
-      "$(INTDIR)\crypt.obj" \
+        "$(INTDIR)\crypt.obj" \
     "$(INTDIR)\path.obj" \
     "$(INTDIR)\dllist.obj" \
     "$(INTDIR)\md5.obj" \
@@ -94,6 +97,7 @@
     "$(INTDIR)\fe-lobj.obj" \
     "$(INTDIR)\fe-misc.obj" \
     "$(INTDIR)\fe-print.obj" \
+    "$(INTDIR)\thread.obj" \
     "$(INTDIR)\fe-secure.obj" \
     "$(INTDIR)\pqexpbuffer.obj" \
     "$(INTDIR)\wchar.obj" \
@@ -126,38 +130,43 @@
   $(LINK32_FLAGS) $(LINK32_OBJS)
 <<

-"$(OUTDIR)\getaddrinfo.obj" : ..\..\port\getaddrinfo.c
+"$(INTDIR)\getaddrinfo.obj" : ..\..\port\getaddrinfo.c
     $(CPP) @<<
     $(CPP_PROJ) ..\..\port\getaddrinfo.c
 <<

-"$(OUTDIR)\inet_aton.obj" : ..\..\port\inet_aton.c
+"$(INTDIR)\thread.obj" : ..\..\port\thread.c
+    $(CPP) @<<
+    $(CPP_PROJ) ..\..\port\thread.c
+<<
+
+"$(INTDIR)\inet_aton.obj" : ..\..\port\inet_aton.c
     $(CPP) @<<
     $(CPP_PROJ) ..\..\port\inet_aton.c
 <<

-"$(OUTDIR)\crypt.obj" : ..\..\port\crypt.c
+"$(INTDIR)\crypt.obj" : ..\..\port\crypt.c
     $(CPP) @<<
     $(CPP_PROJ) ..\..\port\crypt.c
 <<

-"$(OUTDIR)\path.obj" : ..\..\port\path.c
+"$(INTDIR)\path.obj" : ..\..\port\path.c
     $(CPP) @<<
     $(CPP_PROJ) ..\..\port\path.c
 <<

-"$(OUTDIR)\dllist.obj" : ..\..\backend\lib\dllist.c
+"$(INTDIR)\dllist.obj" : ..\..\backend\lib\dllist.c
     $(CPP) @<<
     $(CPP_PROJ) ..\..\backend\lib\dllist.c
 <<


-"$(OUTDIR)\md5.obj" : ..\..\backend\libpq\md5.c
+"$(INTDIR)\md5.obj" : ..\..\backend\libpq\md5.c
     $(CPP) @<<
     $(CPP_PROJ) ..\..\backend\libpq\md5.c
 <<

-"$(OUTDIR)\ip.obj" : ..\..\backend\libpq\ip.c
+"$(INTDIR)\ip.obj" : ..\..\backend\libpq\ip.c
     $(CPP) @<<
     $(CPP_PROJ) ..\..\backend\libpq\ip.c
 <<


pgsql-patches by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: NLS: French .po files updated
Next
From: Alvaro Herrera
Date:
Subject: psql spanish l10n