Re: CVS of 8.1.x MS-VC6 probrem.

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Cc: Hiroshi Saito <saito(at)inetrt(dot)skcapi(dot)co(dot)jp>
Subject: Re: CVS of 8.1.x MS-VC6 probrem.
Date: 2005-12-09 05:13:56
Message-ID: 200512090513.jB95Duo00178@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


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(at)candle(dot)pha(dot)pa(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2005-12-09 05:15:25 Re: CVS of 8.1.x MS-VC6 probrem.
Previous Message Bruce Momjian 2005-12-09 04:51:19 Re: CVS of 8.1.x MS-VC6 probrem.