cmake HAVE_POLL_FINE examples

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)