From 535d92877e4e48753477f4f0848df5b7a1cf2fe3 Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Thu, 22 Nov 2001 10:18:52 +0000 Subject: [PATCH] Remove compile errors of psql.exe and libpq.dll under Multibyte mode. --- src/bin/psql/win32.mak | 2 ++ src/include/pg_config.h.win32 | 7 +++++++ src/interfaces/libpq/win32.mak | 11 ++++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/bin/psql/win32.mak b/src/bin/psql/win32.mak index 2d08e9b5d0..06070a9a2a 100644 --- a/src/bin/psql/win32.mak +++ b/src/bin/psql/win32.mak @@ -32,6 +32,7 @@ CLEAN : -@erase "$(INTDIR)\describe.obj" -@erase "$(INTDIR)\tab-complete.obj" -@erase "$(INTDIR)\getopt.obj" + -@erase "$(INTDIR)\mbprint.obj" -@erase "$(INTDIR)\vc50.idb" -@erase "$(OUTDIR)\psql.exe" @@ -73,6 +74,7 @@ LINK32_OBJS= \ "$(INTDIR)\describe.obj" \ "$(INTDIR)\tab-complete.obj" \ "$(INTDIR)\getopt.obj" \ + "$(INTDIR)\mbprint.obj" \ "..\..\interfaces\libpq\Release\libpqdll.lib" "$(OUTDIR)\psql.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32 index b3977e90c2..007fee40ef 100644 --- a/src/include/pg_config.h.win32 +++ b/src/include/pg_config.h.win32 @@ -1,3 +1,5 @@ +#ifndef pg_config_h_win32__ +#define pg_config_h_win32__ /* * Parts of pg_config.h that you get with autoconf on other systems */ @@ -23,3 +25,8 @@ #define HAVE_CXX_STRING_HEADER #define HAVE_NAMESPACE_STD + +/* use _snprintf instead of snprintf */ +#define HAVE_SNPRINTF_DECL +#define snprintf _snprintf +#endif /* pg_config_h_win32__ */ diff --git a/src/interfaces/libpq/win32.mak b/src/interfaces/libpq/win32.mak index f12eb2143e..ea433eafac 100644 --- a/src/interfaces/libpq/win32.mak +++ b/src/interfaces/libpq/win32.mak @@ -73,6 +73,7 @@ CLEAN : -@erase "$(OUTDIR)\libpqdll.lib" !IFDEF MULTIBYTE -@erase "$(INTDIR)\wchar.obj" + -@erase "$(INTDIR)\encnames.obj" !ENDIF "$(OUTDIR)" : @@ -106,7 +107,7 @@ LIB32_OBJS= \ "$(INTDIR)\pqexpbuffer.obj" !IFDEF MULTIBYTE -LIB32_OBJS = $(LIB32_OBJS) "$(INTDIR)\wchar.obj" +LIB32_OBJS = $(LIB32_OBJS) "$(INTDIR)\wchar.obj" "$(INTDIR)\encnames.obj" !ENDIF RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libpq.res" @@ -158,6 +159,14 @@ LINK32_OBJS= \ !ENDIF +!IFDEF MULTIBYTE +"$(INTDIR)\encnames.obj" : ..\..\backend\utils\mb\encnames.c + $(CPP) @<< + $(CPP_PROJ) /I "." ..\..\backend\utils\mb\encnames.c +<< +!ENDIF + + .c{$(CPP_OBJS)}.obj:: $(CPP) @<< $(CPP_PROJ) $< -- 2.40.0