From: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
---|---|
To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
Cc: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] Fix out-of-bouds access (src/common/wchar.c) |
Date: | 2022-02-17 13:27:07 |
Message-ID: | CAEudQAraZaRm_cN4d+34w+neT2aV-Cubmkc6T4TxXdg7QsKwUw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Em qui., 17 de fev. de 2022 às 10:18, Daniel Gustafsson <daniel(at)yesql(dot)se>
escreveu:
> > On 17 Feb 2022, at 13:59, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> wrote:
> >
> > Em qui., 17 de fev. de 2022 às 09:52, Daniel Gustafsson <daniel(at)yesql(dot)se
> <mailto:daniel(at)yesql(dot)se>> escreveu:
> > > On 17 Feb 2022, at 13:19, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com <mailto:
> ranier(dot)vf(at)gmail(dot)com>> wrote:
> >
> > > 1. One #ifdef with a mistake, the correct is _WIN32 and not WIN32.
> >
> > Can you elaborate on this, we are using WIN32 pretty extensively in the
> code:
> >
> > $ git grep "if[n]\{0,1\}def WIN32$"|wc -l
> > 511
> > $ git grep "if[n]\{0,1\}def _WIN32$"|wc -l
> > 2
> >
> > The _WIN32 cases are in the same ECPG testcase.
> >
> > Why would _WIN32 be correct in this case?
> > Sorry, my fault.
> >
> > I only use _WIN32 and I jumped to conclusions very quickly.
>
> Question remains though, should src/interfaces/ecpg/test/sql/sqlda.pgc
> really
> be using WIN32 and not _WIN32, or doesn't it matter? (or does it only
> matter
> for consistency?) WIN32 and _WIN32 aren't very informative searchterms to
> use
> for finding more information.
>
According the StackOverflow:
https://stackoverflow.com/questions/662084/whats-the-difference-between-the-win32-and-win32-defines-in-c
WIN32 -> SDK
_WIN32 -> Compiler (MSVC)
WIN32 with MingW (Windows) is 0?
For consistency, I think that will use only WIN32, if Postgres uses it
extensively.
regards,
Ranier Vilela
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Bapat | 2022-02-17 13:30:39 | Re: postgres_fdw and skip locked |
Previous Message | Daniel Gustafsson | 2022-02-17 13:17:02 | Re: [PATCH] Fix out-of-bouds access (src/common/wchar.c) |