pgsql: windows: Define WIN32_LEAN_AND_MEAN to make compilation faster.

Поиск
Список
Период
Сортировка
Искать

pgsql: windows: Define WIN32_LEAN_AND_MEAN to make compilation faster.

От:
Andres Freund <andres@anarazel.de>
Дата:
windows: Define WIN32_LEAN_AND_MEAN to make compilation faster.

windows.h includes a lot of other headers, slowing down compilation
significantly. WIN32_LEAN_AND_MEAN reduces that a bit. It'd be better to
remove the include of windows.h (as well as indirect inclusions of it) from such
a central place, but until then...

Discussion: https://postgr.es/m/20210921193035.pqzay43vpyv7in43@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8162464a25e5314e753c580389f76a9b7f69445b

Modified Files
--------------
src/include/port/win32_port.h | 8 ++++++++
1 file changed, 8 insertions(+)

Re: pgsql: windows: Define WIN32_LEAN_AND_MEAN to make compilation faster.

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Andres Freund  writes:
> windows: Define WIN32_LEAN_AND_MEAN to make compilation faster.

I happened to notice from grepping that
src/backend/port/win32/crashdump.c has its own

#define WIN32_LEAN_AND_MEAN

Can't we remove that now?  (I kind of wonder what good it did at all,
considering postgres.h has already pulled in .)

			regards, tom lane


Re: pgsql: windows: Define WIN32_LEAN_AND_MEAN to make compilation faster.

От:
Andres Freund <andres@anarazel.de>
Дата:
Hi,

On 2021-11-06 18:24:21 -0400, Tom Lane wrote:
> Andres Freund  writes:
> > windows: Define WIN32_LEAN_AND_MEAN to make compilation faster.
> 
> I happened to notice from grepping that
> src/backend/port/win32/crashdump.c has its own
> 
> #define WIN32_LEAN_AND_MEAN
>
> Can't we remove that now?  (I kind of wonder what good it did at all,
> considering postgres.h has already pulled in .)

Yea, it seems pointless.

There's a semi-related weirdness: Several src/port/ files include 
themselves (I guess that could be seen as prep for dropping windows.h from
win32_port.h).

Unless you're already done with that by the time I git pull, I'm gonna remove
that redundant WIN32_LEAN_AND_MEAN.

Greetings,

Andres Freund


Re: pgsql: windows: Define WIN32_LEAN_AND_MEAN to make compilation faster.

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Andres Freund  writes:
> There's a semi-related weirdness: Several src/port/ files include 
> themselves (I guess that could be seen as prep for dropping windows.h from
> win32_port.h).

Hmm.

> Unless you're already done with that by the time I git pull, I'm gonna remove
> that redundant WIN32_LEAN_AND_MEAN.

No, I've not done anything --- feel free.

			regards, tom lane


Re: pgsql: windows: Define WIN32_LEAN_AND_MEAN to make compilation faster.

От:
Andres Freund <andres@anarazel.de>
Дата:
On 2021-11-06 15:41:45 -0700, Andres Freund wrote:
> Unless you're already done with that by the time I git pull, I'm gonna remove
> that redundant WIN32_LEAN_AND_MEAN.

Done.


FAQ