diff options
author | Gerald Combs <gerald@wireshark.org> | 2021-07-14 18:53:12 -0700 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-07-15 06:41:05 +0000 |
commit | 34ef2066e560ab618548a51c6e01bc5f49508697 (patch) | |
tree | 12f6e30d8f7d060b811c2780893490d8500427e1 | |
parent | cbed7130ded4074952baf29a7c2dca1278b62edc (diff) |
CMake: Don't bother checking for fcntl.h or floorl.
fcntl.h appears to be available on all of our supported platforms,
including Windows. We've also been including it without HAVE_FCNTL_H
guards in a few places (e.g. sshdump.c) without any issues for some
time.
floorl is part of C99.
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | ConfigureChecks.cmake | 11 | ||||
-rw-r--r-- | cmakeconfig.h.in | 6 | ||||
-rw-r--r-- | ui/time_shift.c | 4 | ||||
-rw-r--r-- | wsutil/file_util.h | 2 |
5 files changed, 0 insertions, 28 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a74bf8391..b7b81f9add 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,11 +151,6 @@ if(WIN32) set(EXTRA_INSTALLER_DIR ${_ws_lib_dir}) # XXX Add a dependency on ${_ws_lib_dir}/current_tag.txt? - - # Prepopulate some ConfigureChecks values. Compilation checks - # on Windows can be slow. - set(HAVE_FCNTL_H TRUE) - set(HAVE_FLOORL TRUE) endif(WIN32) include(UseCustomIncludes) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 7d7ade8f2b..1181a7f375 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -13,7 +13,6 @@ include(CMakePushCheckState) include(CheckIncludeFile) include(CheckIncludeFiles) check_include_file("arpa/inet.h" HAVE_ARPA_INET_H) -check_include_file("fcntl.h" HAVE_FCNTL_H) check_include_file("getopt.h" HAVE_GETOPT_H) check_include_file("grp.h" HAVE_GRP_H) # @@ -85,16 +84,6 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_VERSION MATCHES "5[.] endif() # -# Use check_symbol_exists just in case math.h does something magic -# and there's not actually a function named floorl() -# -cmake_push_check_state() -set(CMAKE_REQUIRED_INCLUDES ${M_INCLUDE_DIRS}) -set(CMAKE_REQUIRED_LIBRARIES ${M_LIBRARIES}) -check_symbol_exists("floorl" "math.h" HAVE_FLOORL) -cmake_pop_check_state() - -# # Check whether we have clock_gettime(). # It's not on Windows, so don't waste time checking for it. # It's in newer POSIX, so some, but not all, UN*Xes have it. diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in index d8ec896027..fe4bdd7392 100644 --- a/cmakeconfig.h.in +++ b/cmakeconfig.h.in @@ -43,9 +43,6 @@ /* Define to 1 if you have the `clock_gettime` function. */ #cmakedefine HAVE_CLOCK_GETTIME 1 -/* Define to 1 if you have the <fcntl.h> header file. */ -#cmakedefine HAVE_FCNTL_H 1 - /* Define to use the MaxMind DB library */ #cmakedefine HAVE_MAXMINDDB 1 @@ -70,9 +67,6 @@ /* Define if you have the 'getexecname' function. */ #cmakedefine HAVE_GETEXECNAME 1 -/* Define if you have the 'floorl' function. */ -#cmakedefine HAVE_FLOORL 1 - /* Define to 1 if you have the getopt_long function. */ #cmakedefine HAVE_GETOPT_LONG 1 diff --git a/ui/time_shift.c b/ui/time_shift.c index 50d7562759..e0bf0b0615 100644 --- a/ui/time_shift.c +++ b/ui/time_shift.c @@ -19,10 +19,6 @@ #include "ui/ws_ui_util.h" -#ifndef HAVE_FLOORL -#define floorl(x) floor((double)x) -#endif - #define SHIFT_POS 0 #define SHIFT_NEG 1 #define SHIFT_SETTOZERO 1 diff --git a/wsutil/file_util.h b/wsutil/file_util.h index 2a756fbc25..7b83fba1fc 100644 --- a/wsutil/file_util.h +++ b/wsutil/file_util.h @@ -20,9 +20,7 @@ #include <gmodule.h> #endif -#ifdef HAVE_FCNTL_H #include <fcntl.h> /* for open() */ -#endif #ifdef HAVE_UNISTD_H #include <unistd.h> /* for read(), write(), close(), etc. */ |