From: Viktor Szakats Date: Tue, 12 Dec 2023 21:46:58 +0000 (+0000) Subject: cmake: whitespace tidy-up in `OtherTests.cmake` X-Git-Tag: curl-8_6_0~205 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=17e61d4e3a50dfbfbcc9c2867f387d160205328b;p=thirdparty%2Fcurl.git cmake: whitespace tidy-up in `OtherTests.cmake` Closes #12538 --- diff --git a/CMake/OtherTests.cmake b/CMake/OtherTests.cmake index cf0bae6b98..a7599c44d7 100644 --- a/CMake/OtherTests.cmake +++ b/CMake/OtherTests.cmake @@ -46,7 +46,8 @@ endif() set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) check_c_source_compiles("${_source_epilogue} - int main(void) { + int main(void) + { int flag = MSG_NOSIGNAL; (void)flag; return 0; @@ -56,14 +57,15 @@ if(NOT WIN32) add_header_include(HAVE_SYS_TIME_H "sys/time.h") endif() check_c_source_compiles("${_source_epilogue} -#include -int main(void) { - struct timeval ts; - ts.tv_sec = 0; - ts.tv_usec = 0; - (void)ts; - return 0; -}" HAVE_STRUCT_TIMEVAL) + #include + int main(void) + { + struct timeval ts; + ts.tv_sec = 0; + ts.tv_usec = 0; + (void)ts; + return 0; + }" HAVE_STRUCT_TIMEVAL) if(NOT WIN32) set(CMAKE_EXTRA_INCLUDE_FILES) @@ -102,28 +104,28 @@ if(NOT CMAKE_CROSSCOMPILING) 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; - } + 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) + } + return 0; + }" HAVE_POLL_FINE) endif() endif()