cmake HAVE_POSIX_SIGNALS examples

alibaba/AliSQL configure.cmake :1023

CHECK_C_SOURCE_COMPILES("
  #include <signal.h>
  int main(int ac, char **av)
  {
    sigset_t ss;
    struct sigaction sa;
    sigemptyset(&ss); sigsuspend(&ss);
    sigaction(SIGINT, &sa, (struct sigaction *) 0);
    sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
  }"
  HAVE_POSIX_SIGNALS)

alibaba/AliSQL configure.cmake :1059

ENDIF(NOT HAVE_POSIX_SIGNALS)

arkdb/arkproxy configure.cmake :804

CHECK_C_SOURCE_COMPILES("
  #include <signal.h>
  int main(int ac, char **av)
  {
    sigset_t ss;
    struct sigaction sa;
    sigemptyset(&ss); sigsuspend(&ss);
    sigaction(SIGINT, &sa, (struct sigaction *) 0);
    sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
  }"
  HAVE_POSIX_SIGNALS)

arkdb/arkproxy configure.cmake :825

ENDIF(NOT HAVE_POSIX_SIGNALS)

alibaba/AliSQLBackup configure.cmake :937

CHECK_C_SOURCE_COMPILES("
  #include <signal.h>
  int main(int ac, char **av)
  {
    sigset_t ss;
    struct sigaction sa;
    sigemptyset(&ss); sigsuspend(&ss);
    sigaction(SIGINT, &sa, (struct sigaction *) 0);
    sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
  }"
  HAVE_POSIX_SIGNALS)

alibaba/AliSQLBackup configure.cmake :973

ENDIF(NOT HAVE_POSIX_SIGNALS)

opengauss-mirror/openGauss-server cmake/src/build_options.cmake :103

option(HAVE_POSIX_SIGNALS "enable posix signals, this set to default" ON)