]> git.ipfire.org Git - thirdparty/git.git/commit
meson: simplify and parameterize various standard function checks
authorEli Schwartz <eschwartz@gentoo.org>
Fri, 25 Apr 2025 05:25:40 +0000 (01:25 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 25 Apr 2025 16:35:54 +0000 (09:35 -0700)
commit61fb2262e71a044198b8b18872a802036c332d80
tree7ce402e254b454cda6c5c61b7ca9288bdade11f0
parent4bbb303af69990ccd05fe3a2eb58a1ce036f8220
meson: simplify and parameterize various standard function checks

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 <eschwartz@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
meson.build