From: Hiroshi Inoue Date: Thu, 22 Nov 2001 10:18:52 +0000 (+0000) Subject: Remove compile errors of psql.exe and libpq.dll under X-Git-Tag: REL7_2_BETA4~193 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=535d92877e4e48753477f4f0848df5b7a1cf2fe3;p=postgresql Remove compile errors of psql.exe and libpq.dll under Multibyte mode. --- 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) $<