Thread: CVS of 8.1.x MS-VC6 probrem.
Dear Bruce san. I reconfirmed MS-VC6. Thank you for wonderful correspondence. However, Another problem newly occurred. This solves the problem of snprintf and vsnprintf. Please apply it. Thank you. Regards, Hiroshi Saito
Attachment
That code was removed when *printf was fixed, and we thought it wasn't needed anumore. Thanks for the quick report. Patch applied to CVS HEAD and 8.1.X. --------------------------------------------------------------------------- Hiroshi Saito wrote: > Dear Bruce san. > > I reconfirmed MS-VC6. Thank you for wonderful correspondence. > However, Another problem newly occurred. > This solves the problem of snprintf and vsnprintf. > Please apply it. > > Thank you. > > Regards, > Hiroshi Saito [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
While I have applied your patch, I am now confused about something. Your change was to pg_config.h.win32, which is used only for WIN32_CLIENT_ONLY compiles, namely MSVC and Borland C. The addition was: /* use _snprintf and _vsnprintf */ #define HAVE_DECL_SNPRINTF 1 #define snprintf _snprintf #define HAVE_DECL_VSNPRINTF 1 #define vsnprintf _vsnprintf Now, I think the problem is that with those defines, we will not use our port/snprintf.c, meaning the %$ escapes for language translation will not work for those builds. I realize the backend is the most important for messages, but libpq and psql also have message translation. Would you try removing those lines you added and add these to pg_config.h.win32: #define HAVE_DECL_SNPRINTF 1 #define HAVE_DECL_VSNPRINTF 1 #define HAVE_SNPRINTF 1 #define HAVE_VSNPRINTF 1 #define USE_REPL_SNPRINTF 1 Does that allow it to compile? We have limited time before 8.1.1 is packaged. --------------------------------------------------------------------------- pgman wrote: > > That code was removed when *printf was fixed, and we thought it wasn't > needed anumore. Thanks for the quick report. > > Patch applied to CVS HEAD and 8.1.X. > > --------------------------------------------------------------------------- > > > Hiroshi Saito wrote: > > Dear Bruce san. > > > > I reconfirmed MS-VC6. Thank you for wonderful correspondence. > > However, Another problem newly occurred. > > This solves the problem of snprintf and vsnprintf. > > Please apply it. > > > > Thank you. > > > > Regards, > > Hiroshi Saito > > [ Attachment, skipping... ] > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 4: Have you searched our list archives? > > > > http://archives.postgresql.org > > -- > Bruce Momjian | http://candle.pha.pa.us > pgman@candle.pha.pa.us | (610) 359-1001 > + If your life is a hard drive, | 13 Roberts Road > + Christ can be your backup. | Newtown Square, Pennsylvania 19073 -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
Also, if my suggested changes do not allow it to compile, please show us the compile error message with my suggested changes. Thanks. --------------------------------------------------------------------------- Bruce Momjian wrote: > > While I have applied your patch, I am now confused about something. Your > change was to pg_config.h.win32, which is used only for > WIN32_CLIENT_ONLY compiles, namely MSVC and Borland C. > > The addition was: > > /* use _snprintf and _vsnprintf */ > #define HAVE_DECL_SNPRINTF 1 > #define snprintf _snprintf > #define HAVE_DECL_VSNPRINTF 1 > #define vsnprintf _vsnprintf > > Now, I think the problem is that with those defines, we will not use our > port/snprintf.c, meaning the %$ escapes for language translation will > not work for those builds. I realize the backend is the most important > for messages, but libpq and psql also have message translation. > > Would you try removing those lines you added and add these to > pg_config.h.win32: > > #define HAVE_DECL_SNPRINTF 1 > #define HAVE_DECL_VSNPRINTF 1 > #define HAVE_SNPRINTF 1 > #define HAVE_VSNPRINTF 1 > #define USE_REPL_SNPRINTF 1 > > Does that allow it to compile? We have limited time before 8.1.1 is > packaged. > > --------------------------------------------------------------------------- > > pgman wrote: > > > > That code was removed when *printf was fixed, and we thought it wasn't > > needed anumore. Thanks for the quick report. > > > > Patch applied to CVS HEAD and 8.1.X. > > > > --------------------------------------------------------------------------- > > > > > > Hiroshi Saito wrote: > > > Dear Bruce san. > > > > > > I reconfirmed MS-VC6. Thank you for wonderful correspondence. > > > However, Another problem newly occurred. > > > This solves the problem of snprintf and vsnprintf. > > > Please apply it. > > > > > > Thank you. > > > > > > Regards, > > > Hiroshi Saito > > > > [ Attachment, skipping... ] > > > > > > > > ---------------------------(end of broadcast)--------------------------- > > > TIP 4: Have you searched our list archives? > > > > > > http://archives.postgresql.org > > > > -- > > Bruce Momjian | http://candle.pha.pa.us > > pgman@candle.pha.pa.us | (610) 359-1001 > > + If your life is a hard drive, | 13 Roberts Road > > + Christ can be your backup. | Newtown Square, Pennsylvania 19073 > > -- > Bruce Momjian | http://candle.pha.pa.us > pgman@candle.pha.pa.us | (610) 359-1001 > + If your life is a hard drive, | 13 Roberts Road > + Christ can be your backup. | Newtown Square, Pennsylvania 19073 > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
Dear Bruce-san. > > #define HAVE_DECL_SNPRINTF 1 > > #define HAVE_DECL_VSNPRINTF 1 > > #define HAVE_SNPRINTF 1 > > #define HAVE_VSNPRINTF 1 > > #define USE_REPL_SNPRINTF 1 Ummm... This causes injustice. ---------------------------------------------------------------------------------------------- libpq.lib(fe-connect.obj) : error LNK2001: 外部シンボル "_pg_snprintf" は未解決です libpq.lib(getaddrinfo.obj) : error LNK2001: 外部シンボル "_pg_snprintf" は未解決で す libpq.lib(fe-auth.obj) : error LNK2001: 外部シンボル "_pg_snprintf" は未解決です libpq.lib(win32.obj) : error LNK2001: 外部シンボル "_pg_sprintf" は未解決です libpq.lib(fe-connect.obj) : error LNK2001: 外部シンボル "_pg_sprintf" は未解決です libpq.lib(fe-exec.obj) : error LNK2001: 外部シンボル "_pg_sprintf" は未解決です libpq.lib(fe-print.obj) : error LNK2001: 外部シンボル "_pg_sprintf" は未解決です libpq.lib(fe-protocol2.obj) : error LNK2001: 外部シンボル "_pg_sprintf" は未解決で す libpq.lib(encnames.obj) : error LNK2001: 外部シンボル "_pg_fprintf" は未解決です libpq.lib(fe-auth.obj) : error LNK2001: 外部シンボル "_pg_fprintf" は未解決です libpq.lib(fe-connect.obj) : error LNK2001: 外部シンボル "_pg_fprintf" は未解決です libpq.lib(fe-exec.obj) : error LNK2001: 外部シンボル "_pg_fprintf" は未解決です libpq.lib(fe-print.obj) : error LNK2001: 外部シンボル "_pg_fprintf" は未解決です libpq.lib(fe-misc.obj) : error LNK2001: 外部シンボル "_pg_fprintf" は未解決です libpq.lib(fe-exec.obj) : error LNK2001: 外部シンボル "_pg_vsnprintf" は未解決です libpq.lib(pqexpbuffer.obj) : error LNK2001: 外部シンボル "_pg_vsnprintf" は未解決で す .\Release\libpq.dll : fatal error LNK1120: 外部参照 4 が未解決です。 NMAKE : fatal error U1077: 'link.exe' : リターン コード '0x460'
> for messages, but libpq and psql also have message translation. The work of using port/snprintf is needed. and If gettext is used.... Is it desired now? It will be tonight if it becomes so. Regards, Hiroshi Saito
> While I have applied your patch, I am now confused about > something. Your change was to pg_config.h.win32, which is > used only for WIN32_CLIENT_ONLY compiles, namely MSVC and Borland C. > > The addition was: > > /* use _snprintf and _vsnprintf */ > #define HAVE_DECL_SNPRINTF 1 > #define snprintf _snprintf > #define HAVE_DECL_VSNPRINTF 1 > #define vsnprintf _vsnprintf > > Now, I think the problem is that with those defines, we will > not use our port/snprintf.c, meaning the %$ escapes for > language translation will not work for those builds. I > realize the backend is the most important for messages, but > libpq and psql also have message translation. AFAIK we don't support NLS builds with MSVC anyway. (Check pg_config.h.win32, it has no #define NLS). So I don't think this is an issue. //Magnus
Hi Magnus. > > libpq and psql also have message translation. > > AFAIK we don't support NLS builds with MSVC anyway. (Check > pg_config.h.win32, it has no #define NLS). So I don't think this is an > issue. Um, I agree with you. Probably, Bruce san is also noticed. I thought that Bruce san suggested the evolution. However, I think that the plan is now difficult for 8.1.1. Regards, Hiroshi Saito
> > > libpq and psql also have message translation. > > > > AFAIK we don't support NLS builds with MSVC anyway. (Check > > pg_config.h.win32, it has no #define NLS). So I don't think > this is an > > issue. > > Um, I agree with you. Probably, Bruce san is also noticed. > I thought that Bruce san suggested the evolution. > However, I think that the plan is now difficult for 8.1.1. I definitly don't think we should try to *add* NLS support in 8.1.1.That's very much a new feature, and not a very simple one either. Possibly for 8.2, if someone wants to do the legwork. //Magnus
"Hiroshi Saito" <saito@inetrt.skcapi.co.jp> writes: >> AFAIK we don't support NLS builds with MSVC anyway. (Check >> pg_config.h.win32, it has no #define NLS). So I don't think this is an >> issue. > Um, I agree with you. Probably, Bruce san is also noticed. > I thought that Bruce san suggested the evolution. > However, I think that the plan is now difficult for 8.1.1. Yeah. I had hoped the client-only build would "just work" with the snprintf changes, but if not there is no time to make it work for 8.1.1. I would like to revisit this for 8.1.2 or 8.2, though. It would be good to have NLS support in the client-only build, if we intend to keep supporting that at all. regards, tom lane
Dear tom san. Thank you for suggestion. > Yeah. I had hoped the client-only build would "just work" with the > snprintf changes, but if not there is no time to make it work for 8.1.1. > I would like to revisit this for 8.1.2 or 8.2, though. It would be > good to have NLS support in the client-only build, if we intend to keep > supporting that at all. > > regards, tom lane Actually, it is possible by only replacing DLL of making MSVC of now with DLL of MinGW now. I think that I am satisfactory by MSVC DLL of the present simple structure. Isn't it satisfied only with explaining of it? It will be satisfied if simple MSVC is provided with compile environment. Otherwise, even kerberos5 is possible. However, I vote for Magnus. Regards, Hiroshi Saito
Hiroshi Saito wrote: > > for messages, but libpq and psql also have message translation. > > The work of using port/snprintf is needed. > and If gettext is used.... > Is it desired now? It will be tonight if it becomes so. Sorry, I only realized after I was in bed that we don't use libintl with the WIN32_CLIENT_ONLY builds, so your applied patch is correct and we can move ahead with 8.1.1. I think the only question now is whether it is OK to have MinGW builds using our snprintf.c and WIN32_CLIENT_ONLY builds using the operating system version, but I assume it will be OK. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
Magnus Hagander wrote: > > > > libpq and psql also have message translation. > > > > > > AFAIK we don't support NLS builds with MSVC anyway. (Check > > > pg_config.h.win32, it has no #define NLS). So I don't think > > this is an > > > issue. > > > > Um, I agree with you. Probably, Bruce san is also noticed. > > I thought that Bruce san suggested the evolution. > > However, I think that the plan is now difficult for 8.1.1. > > I definitly don't think we should try to *add* NLS support in > 8.1.1.That's very much a new feature, and not a very simple one either. > Possibly for 8.2, if someone wants to do the legwork. Agreed. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
Magnus Hagander wrote: > > While I have applied your patch, I am now confused about > > something. Your change was to pg_config.h.win32, which is > > used only for WIN32_CLIENT_ONLY compiles, namely MSVC and Borland C. > > > > The addition was: > > > > /* use _snprintf and _vsnprintf */ > > #define HAVE_DECL_SNPRINTF 1 > > #define snprintf _snprintf > > #define HAVE_DECL_VSNPRINTF 1 > > #define vsnprintf _vsnprintf > > > > Now, I think the problem is that with those defines, we will > > not use our port/snprintf.c, meaning the %$ escapes for > > language translation will not work for those builds. I > > realize the backend is the most important for messages, but > > libpq and psql also have message translation. > > AFAIK we don't support NLS builds with MSVC anyway. (Check > pg_config.h.win32, it has no #define NLS). So I don't think this is an > issue. Right, thanks. Sorry for the confusion. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073