Re: [PATCH v3 1/4] compat/posix.h: track SA_RESTART fallback
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 27, 2025, 01:41 UTC
- Message-ID
- <xmqq4iw29d11.fsf@gitster.g>
- In-Reply-To
- <ae1ca6bb2b258fc3c18c627aed2159dbb8f8c268.1750927989.git.gitgitgadget@gmail.com>
"Carlo Marcelo Arenas Belón via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 6 quoted lines
> +AC_CACHE_CHECK([whether SA_RESTART is supported], [ac_cv_siginterrupt], [ > + AC_COMPILE_IFELSE( > + [AC_LANG_PROGRAM([#include <signal.h>], [[ > + #ifdef SA_RESTART > + restartable signals supported > + #endif
So, where SA_RESTART is defined, we fail the compilation.
> + ]])],[ > + ac_cv_siginterrupt=no > + NO_RESTARTABLE_SIGNALS=UnfortunatelyYes
As this is IFELSE, we know the condition that did not fail the compilation is where we did not see SA_RESTART. So we set the NO_RESTARTABLE_SIGNALS=UnfortunatelyYes, which makes sense.
> + ], [ac_cv_siginterrupt=yes] > + ) > +]) > +GIT_CONF_SUBST([NO_RESTARTABLE_SIGNALS])
It is curious that throughout the two renames, the cached variable used by autoconf hasn't changed its name. Is it because it is totally invisible to the end-users/builders?