Re: [PATCH] Fix out-of-bouds access (src/common/wchar.c) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Fix out-of-bouds access (src/common/wchar.c)
Date
Msg-id 3627449.1645110347@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] Fix out-of-bouds access (src/common/wchar.c)  (Daniel Gustafsson <daniel@yesql.se>)
Responses Re: [PATCH] Fix out-of-bouds access (src/common/wchar.c)
List pgsql-hackers
Daniel Gustafsson <daniel@yesql.se> writes:
> 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.

I find this in src/include/port/win32.h:

/*
 * We always rely on the WIN32 macro being set by our build system,
 * but _WIN32 is the compiler pre-defined macro. So make sure we define
 * WIN32 whenever _WIN32 is set, to facilitate standalone building.
 */
#if defined(_WIN32) && !defined(WIN32)
#define WIN32
#endif

So for most of our code it shouldn't matter.  However, I'm not sure
that the ECPG test cases include our port.h --- they probably shouldn't
if they're to reflect actual use-cases.  [ pokes around... ]  See
517bf2d91 which added this code.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: do only critical work during single-user vacuum?
Next
From: Robert Haas
Date:
Subject: Re: initdb / bootstrap design