Re: [PATCH v2 1/3] compat/posix.h: track SA_RESTART fallback
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 25, 2025, 16:07 UTC
- Message-ID
- <xmqq4iw3yfd8.fsf@gitster.g>
- In-Reply-To
- <e82b7425bbc2540fa5ef3fd4584e6f902485d064.1750836928.git.gitgitgadget@gmail.com>
"Carlo Marcelo Arenas Belón via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 9 quoted lines
> +# Define USE_NON_POSIX_SIGNAL if don't have support for SA_RESTART or > +# prefer using ANSI C signal() over POSIX sigaction() > + > +AC_CACHE_CHECK([whether SA_RESTART is supported], [ac_cv_siginterrupt], [ > + AC_COMPILE_IFELSE( > + [AC_LANG_PROGRAM([#include <signal.h>], [[ > + #ifdef SA_RESTART > + #endif > + siginterrupt(SIGCHLD, 1)
This is curious. What is this #ifdef/#endif doing that does not have anything in it?
Show 7 quoted lines
> + ]])],[ac_cv_siginterrupt=yes],[ > + ac_cv_siginterrupt=no > + USE_NON_POSIX_SIGNAL=UnfortunatelyYes > + ] > + ) > +]) > +GIT_CONF_SUBST([USE_NON_POSIX_SIGNAL])