cmake HAVE_POLL_FINE examples

GreatSQL/GreatSQL extra/curl/curl-7.86.0/CMake/OtherTests.cmake :100

check_c_source_runs("
    #include <stdlib.h>
    #include <sys/time.h>

    #ifdef HAVE_SYS_POLL_H
    #  include <sys/poll.h>
    #elif  HAVE_POLL_H
    #  include <poll.h>
    #endif

    int main(void)
    {
        if(0 != poll(0, 0, 10)) {
          return 1; /* fail */
        }
        else {
          /* detect the 10.12 poll() breakage */
          struct timeval before, after;
          int rc;
          size_t us;

          gettimeofday(&before, NULL);
          rc = poll(NULL, 0, 500);
          gettimeofday(&after, NULL);

          us = (after.tv_sec - before.tv_sec) * 1000000 +
            (after.tv_usec - before.tv_usec);

          if(us < 400000) {
            return 1;
          }
        }
        return 0;
    }" HAVE_POLL_FINE)

facebook/mysql-5.6 extra/curl/curl-7.86.0/CMake/OtherTests.cmake :100

check_c_source_runs("
    #include <stdlib.h>
    #include <sys/time.h>

    #ifdef HAVE_SYS_POLL_H
    #  include <sys/poll.h>
    #elif  HAVE_POLL_H
    #  include <poll.h>
    #endif

    int main(void)
    {
        if(0 != poll(0, 0, 10)) {
          return 1; /* fail */
        }
        else {
          /* detect the 10.12 poll() breakage */
          struct timeval before, after;
          int rc;
          size_t us;

          gettimeofday(&before, NULL);
          rc = poll(NULL, 0, 500);
          gettimeofday(&after, NULL);

          us = (after.tv_sec - before.tv_sec) * 1000000 +
            (after.tv_usec - before.tv_usec);

          if(us < 400000) {
            return 1;
          }
        }
        return 0;
    }" HAVE_POLL_FINE)

infiniflow/infinity third_party/curl/CMake/OtherTests.cmake :82

check_c_source_runs("${_source_epilogue}
    #include <stdlib.h>
    #include <sys/time.h>
    int main(void)
    {
      if(0 != poll(0, 0, 10)) {
        return 1; /* fail */
      }
      else {
        /* detect the 10.12 poll() breakage */
        struct timeval before, after;
        int rc;
        size_t us;

        gettimeofday(&before, NULL);
        rc = poll(NULL, 0, 500);
        gettimeofday(&after, NULL);

        us = (after.tv_sec - before.tv_sec) * 1000000 +
          (after.tv_usec - before.tv_usec);

        if(us < 400000) {
          return 1;
        }
      }
      return 0;
    }" HAVE_POLL_FINE)

etternagame/etterna extern/curl/CMake/OtherTests.cmake :250

check_c_source_runs("
    #include <stdlib.h>
    #include <sys/time.h>

    #ifdef HAVE_SYS_POLL_H
    #  include <sys/poll.h>
    #elif  HAVE_POLL_H
    #  include <poll.h>
    #endif

    int main(void)
    {
        if(0 != poll(0, 0, 10)) {
          return 1; /* fail */
        }
        else {
          /* detect the 10.12 poll() breakage */
          struct timeval before, after;
          int rc;
          size_t us;

          gettimeofday(&before, NULL);
          rc = poll(NULL, 0, 500);
          gettimeofday(&after, NULL);

          us = (after.tv_sec - before.tv_sec) * 1000000 +
            (after.tv_usec - before.tv_usec);

          if(us < 400000) {
            return 1;
          }
        }
        return 0;
    }" HAVE_POLL_FINE)

MBU-Team/OpenMBU engine/lib/curl/CMake/OtherTests.cmake :100

check_c_source_runs("
      #include <stdlib.h>
      #include <sys/time.h>

      #ifdef HAVE_SYS_POLL_H
      #  include <sys/poll.h>
      #elif  HAVE_POLL_H
      #  include <poll.h>
      #endif

      int main(void)
      {
          if(0 != poll(0, 0, 10)) {
            return 1; /* fail */
          }
          else {
            /* detect the 10.12 poll() breakage */
            struct timeval before, after;
            int rc;
            size_t us;

            gettimeofday(&before, NULL);
            rc = poll(NULL, 0, 500);
            gettimeofday(&after, NULL);

            us = (after.tv_sec - before.tv_sec) * 1000000 +
              (after.tv_usec - before.tv_usec);

            if(us < 400000) {
              return 1;
            }
          }
          return 0;
    }" HAVE_POLL_FINE)

polardb/polardbx-engine extra/curl/curl-7.86.0/CMake/OtherTests.cmake :100

check_c_source_runs("
    #include <stdlib.h>
    #include <sys/time.h>

    #ifdef HAVE_SYS_POLL_H
    #  include <sys/poll.h>
    #elif  HAVE_POLL_H
    #  include <poll.h>
    #endif

    int main(void)
    {
        if(0 != poll(0, 0, 10)) {
          return 1; /* fail */
        }
        else {
          /* detect the 10.12 poll() breakage */
          struct timeval before, after;
          int rc;
          size_t us;

          gettimeofday(&before, NULL);
          rc = poll(NULL, 0, 500);
          gettimeofday(&after, NULL);

          us = (after.tv_sec - before.tv_sec) * 1000000 +
            (after.tv_usec - before.tv_usec);

          if(us < 400000) {
            return 1;
          }
        }
        return 0;
    }" HAVE_POLL_FINE)

skylersaleh/SkyEmu src/curl/CMake/OtherTests.cmake :100

check_c_source_runs("
      #include <stdlib.h>
      #include <sys/time.h>

      #ifdef HAVE_SYS_POLL_H
      #  include <sys/poll.h>
      #elif  HAVE_POLL_H
      #  include <poll.h>
      #endif

      int main(void)
      {
          if(0 != poll(0, 0, 10)) {
            return 1; /* fail */
          }
          else {
            /* detect the 10.12 poll() breakage */
            struct timeval before, after;
            int rc;
            size_t us;

            gettimeofday(&before, NULL);
            rc = poll(NULL, 0, 500);
            gettimeofday(&after, NULL);

            us = (after.tv_sec - before.tv_sec) * 1000000 +
              (after.tv_usec - before.tv_usec);

            if(us < 400000) {
              return 1;
            }
          }
          return 0;
    }" HAVE_POLL_FINE)

glKarin/com.n0n3m4.diii4a Q3E/src/main/jni/deplibs/curl/CMake/OtherTests.cmake :100

check_c_source_runs("
      #include <stdlib.h>
      #include <sys/time.h>

      #ifdef HAVE_SYS_POLL_H
      #  include <sys/poll.h>
      #elif  HAVE_POLL_H
      #  include <poll.h>
      #endif

      int main(void)
      {
          if(0 != poll(0, 0, 10)) {
            return 1; /* fail */
          }
          else {
            /* detect the 10.12 poll() breakage */
            struct timeval before, after;
            int rc;
            size_t us;

            gettimeofday(&before, NULL);
            rc = poll(NULL, 0, 500);
            gettimeofday(&after, NULL);

            us = (after.tv_sec - before.tv_sec) * 1000000 +
              (after.tv_usec - before.tv_usec);

            if(us < 400000) {
              return 1;
            }
          }
          return 0;
    }" HAVE_POLL_FINE)

glKarin/com.n0n3m4.diii4a Q3E/src/main/jni/source/thirdparty/curl/CMake/OtherTests.cmake :248

check_c_source_runs("
    #include <stdlib.h>
    #include <sys/time.h>

    #ifdef HAVE_SYS_POLL_H
    #  include <sys/poll.h>
    #elif  HAVE_POLL_H
    #  include <poll.h>
    #endif

    int main(void)
    {
        if(0 != poll(0, 0, 10)) {
          return 1; /* fail */
        }
        else {
          /* detect the 10.12 poll() breakage */
          struct timeval before, after;
          int rc;
          size_t us;

          gettimeofday(&before, NULL);
          rc = poll(NULL, 0, 500);
          gettimeofday(&after, NULL);

          us = (after.tv_sec - before.tv_sec) * 1000000 +
            (after.tv_usec - before.tv_usec);

          if(us < 400000) {
            return 1;
          }
        }
        return 0;
    }" HAVE_POLL_FINE)

crossuo/crossuo deps/cmcurl/CMake/OtherTests.cmake :229

check_c_source_runs("
    #include <stdlib.h>
    #include <sys/time.h>

    #ifdef HAVE_SYS_POLL_H
    #  include <sys/poll.h>
    #elif  HAVE_POLL_H
    #  include <poll.h>
    #endif

    int main(void)
    {
        if(0 != poll(0, 0, 10)) {
          return 1; /* fail */
        }
        else {
          /* detect the 10.12 poll() breakage */
          struct timeval before, after;
          int rc;
          size_t us;

          gettimeofday(&before, NULL);
          rc = poll(NULL, 0, 500);
          gettimeofday(&after, NULL);

          us = (after.tv_sec - before.tv_sec) * 1000000 +
            (after.tv_usec - before.tv_usec);

          if(us < 400000) {
            return 1;
          }
        }
        return 0;
    }" HAVE_POLL_FINE)

AtomicGameEngine/AtomicGameEngine Source/ThirdParty/libcurl/CMake/OtherTests.cmake :186

check_c_source_runs("
  #ifdef HAVE_SYS_POLL_H
  #  include <sys/poll.h>
  #endif
  int main(void) {
    return poll((void *)0, 0, 10 /*ms*/);
  }" HAVE_POLL_FINE)

AshamaneProject/AshamaneCore dep/cpr/opt/curl/CMake/OtherTests.cmake :188

check_c_source_runs("
    #ifdef HAVE_SYS_POLL_H
    #  include <sys/poll.h>
    #endif
    int main(void) {
      return poll((void *)0, 0, 10 /*ms*/);
    }" HAVE_POLL_FINE)

percona/percona-xtrabackup extra/curl/curl-8.9.1/CMake/OtherTests.cmake :82

check_c_source_runs("${_source_epilogue}
    #include <stdlib.h>
    #include <sys/time.h>
    int main(void)
    {
      if(0 != poll(0, 0, 10)) {
        return 1; /* fail */
      }
      else {
        /* detect the 10.12 poll() breakage */
        struct timeval before, after;
        int rc;
        size_t us;

        gettimeofday(&before, NULL);
        rc = poll(NULL, 0, 500);
        gettimeofday(&after, NULL);

        us = (after.tv_sec - before.tv_sec) * 1000000 +
          (after.tv_usec - before.tv_usec);

        if(us < 400000) {
          return 1;
        }
      }
      return 0;
    }" HAVE_POLL_FINE)

swiftlang/swift-corelibs-foundation cmake/modules/WindowsSwiftPMDependencies.cmake :66

ExternalProject_Add(curl
    GIT_REPOSITORY    https://github.com/curl/curl.git
    GIT_TAG           curl-8_9_1
    CMAKE_ARGS		    
      -DCMAKE_INSTALL_PREFIX=${DEST_DIR}/curl
      -DCMAKE_C_COMPILER=cl
      -DBUILD_SHARED_LIBS=NO
      -DBUILD_TESTING=NO
      -DBUILD_CURL_EXE=NO
      -DCURL_CA_BUNDLE=none
      -DCURL_CA_FALLBACK=NO
      -DCURL_CA_PATH=none
      -DCURL_BROTLI=NO
      -DCURL_DISABLE_ALTSVC=NO
      -DCURL_DISABLE_AWS=YES
      -DCURL_DISABLE_BASIC_AUTH=NO
      -DCURL_DISABLE_BEARER_AUTH=NO
      -DCURL_DISABLE_COOKIES=NO
      -DCURL_DISABLE_DICT=YES
      -DCURL_DISABLE_DIGEST_AUTH=NO
      -DCURL_DISABLE_DOH=NO
      -DCURL_DISABLE_FILE=YES
      -DCURL_DISABLE_FORM_API=NO
      -DCURL_DISABLE_FTP=YES
      -DCURL_DISABLE_GETOPTIONS=NO
      -DCURL_DISABLE_GOPHER=YES
      -DCURL_DISABLE_HSTS=NO
      -DCURL_DISABLE_HTTP=NO
      -DCURL_DISABLE_HTTP_AUTH=NO
      -DCURL_DISABLE_IMAP=YES
      -DCURL_DISABLE_KERBEROS_AUTH=NO
      -DCURL_DISABLE_LDAP=YES
      -DCURL_DISABLE_LDAPS=YES
      -DCURL_DISABLE_MIME=NO
      -DCURL_DISABLE_MQTT=YES
      -DCURL_DISABLE_NEGOTIATE_AUTH=NO
      -DCURL_DISABLE_NETRC=NO
      -DCURL_DISABLE_NTLM=NO
      -DCURL_DISABLE_PARSEDATE=NO
      -DCURL_DISABLE_POP3=YES
      -DCURL_DISABLE_PROGRESS_METER=YES
      -DCURL_DISABLE_PROXY=NO
      -DCURL_DISABLE_RTSP=YES
      -DCURL_DISABLE_SHUFFLE_DNS=YES
      -DCURL_DISABLE_SMB=YES
      -DCURL_DISABLE_SMTP=YES
      -DCURL_DISABLE_SOCKETPAIR=YES
      -DCURL_DISABLE_SRP=NO
      -DCURL_DISABLE_TELNET=YES
      -DCURL_DISABLE_TFTP=YES
      -DCURL_DISABLE_VERBOSE_STRINGS=NO
      -DCURL_LTO=NO
      -DCURL_USE_BEARSSL=NO
      -DCURL_USE_GNUTLS=NO
      -DCURL_USE_GSSAPI=NO
      -DCURL_USE_LIBPSL=NO
      -DCURL_USE_LIBSSH=NO
      -DCURL_USE_LIBSSH2=NO
      -DCURL_USE_MBEDTLS=NO
      -DCURL_USE_OPENSSL=NO
      -DCURL_USE_SCHANNEL=YES
      -DCURL_USE_WOLFSSL=NO
      -DCURL_WINDOWS_SSPI=YES
      -DCURL_ZLIB=YES
      -DCURL_ZSTD=NO
      -DENABLE_ARES=NO
      -DENABLE_CURLDEBUG=NO
      -DENABLE_DEBUG=NO
      -DENABLE_IPV6=YES
      -DENABLE_MANUAL=NO
      -DENABLE_THREADED_RESOLVER=NO
      -DENABLE_UNICODE=YES
      -DENABLE_UNIX_SOCKETS=NO
      -DENABLE_WEBSOCKETS=YES
      -DHAVE_POLL_FINE=NO
      -DUSE_IDN2=NO
      -DUSE_MSH3=NO
      -DUSE_NGHTTP2=NO
      -DUSE_NGTCP2=NO
      -DUSE_QUICHE=NO
      -DUSE_WIN32_IDN=YES
      -DUSE_WIN32_LARGE_FILES=YES
      -DUSE_WIN32_LDAP=NO
      -DCMAKE_BUILD_TYPE=Release
      -DZLIB_ROOT=${ZLIB_ROOT}
      -DZLIB_LIBRARY=${ZLIB_LIBRARY_PATH}
      -DZLIB_INCLUDE_DIR=${ZLIB_INCLUDE_DIR}
    DEPENDS           zlib-install
    EXCLUDE_FROM_ALL  YES
  )

PacktPublishing/The-Modern-Cpp-Challenge libs/curl/CMake/OtherTests.cmake :188

check_c_source_runs("
    #ifdef HAVE_SYS_POLL_H
    #  include <sys/poll.h>
    #endif
    int main(void) {
      return poll((void *)0, 0, 10 /*ms*/);
    }" HAVE_POLL_FINE)