From: Eli Schwartz Date: Fri, 25 Apr 2025 00:13:30 GMT Subject: [PATCH v2 1/6] meson: simplify and parameterize various standard function checks Message-ID: <20250425002017.246985-2-eschwartz@gentoo.org> In-Reply-To: <20250425002017.246985-1-eschwartz@gentoo.org> This is repetitive logic. We either want to use some -lc function, or if it is not available we define it as -DNO_XXX and usually (but not always) provide some custom compatibility impl instead. Checking the intent of each block when reading through the file is slow and not very DRY. Switch to taking an array of checkable functions instead. Not all functions are straightforward to move, since different macro prefixes are used. Signed-off-by: Eli Schwartz --- meson.build | 73 ++++++++++++++++++++++------------------------------- 1 file changed, 30 insertions(+), 43 deletions(-) diff --git a/meson.build b/meson.build index c47cb79af0..6c147c22a4 100644 --- a/meson.build +++ b/meson.build @@ -1290,23 +1290,40 @@ if not compiler.has_member('struct passwd', 'pw_gecos', prefix: '#include