Re: meson: Add support for building with precompiled headers

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org, Thomas Munro <thomas.munro@gmail.com>, Justin Pryzby <pryzby@telsasoft.com>, Michael Paquier <michael.paquier@gmail.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Date: 2022-10-05T20:09:14Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> When using precompiled headers we cannot override macros in system headers
> from within .c files, as headers are already processed before the #define in
> the C file is reached.

> A few files #define FD_SETSIZE 1024 on windows, as the default is only 64. I
> am hesitant to change FD_SETSIZE globally on windows, due to
> src/backend/port/win32/socket.c using it to size on-stack arrays. Instead add
> -DFD_SETSIZE=1024 when building the specific targets needing it.

Color me confused, but how does it work to #define that from the command
line if it can't be overridden from within the program?

			regards, tom lane



Commits

  1. windows: Adjust FD_SETSIZE via commandline define