forked from osmocom/wireshark
Eliminate some unneeded header checks.
sys/stat.h and sys/types.h date back to V7 UNIX, so they should be present on all UN*Xes, and we're assuming they're available on Windows, so, unless and until we ever support platforms that are neither UN*Xes nor Windows, we don't need to check for them. Remove the CMake checks for them, remove the HAVE_ values from cmakeconfig.h.in, and remove all tests for the HAVE_ values. Change-Id: I90bb2aab37958553673b03b52f4931d3b304b9d0 Reviewed-on: https://code.wireshark.org/review/27603 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
054a7e4606
commit
d08d0a87c5
|
@ -127,7 +127,6 @@ if(WIN32)
|
|||
# Prepopulate some ConfigureChecks values. Compilation checks
|
||||
# on Windows can be slow.
|
||||
set(HAVE_FCNTL_H TRUE)
|
||||
set(HAVE_SYS_STAT_H TRUE)
|
||||
set(HAVE_FLOORL TRUE)
|
||||
set(HAVE_LRINT TRUE)
|
||||
|
||||
|
|
|
@ -23,9 +23,7 @@ check_include_file("sys/ioctl.h" HAVE_SYS_IOCTL_H)
|
|||
check_include_file("sys/select.h" HAVE_SYS_SELECT_H)
|
||||
check_include_file("sys/socket.h" HAVE_SYS_SOCKET_H)
|
||||
check_include_file("sys/sockio.h" HAVE_SYS_SOCKIO_H)
|
||||
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
|
||||
check_include_file("sys/time.h" HAVE_SYS_TIME_H)
|
||||
check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
|
||||
check_include_file("sys/utsname.h" HAVE_SYS_UTSNAME_H)
|
||||
check_include_file("sys/wait.h" HAVE_SYS_WAIT_H)
|
||||
check_include_file("unistd.h" HAVE_UNISTD_H)
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
#ifndef __CAPTURE_OPTS_H__
|
||||
#define __CAPTURE_OPTS_H__
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h> /* for gid_t */
|
||||
#endif
|
||||
#include <sys/types.h> /* for gid_t */
|
||||
|
||||
#include <caputils/capture_ifinfo.h>
|
||||
|
||||
|
|
|
@ -19,9 +19,7 @@
|
|||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
|
|
|
@ -309,15 +309,9 @@
|
|||
/* Define to 1 if you have the <sys/sockio.h> header file. */
|
||||
#cmakedefine HAVE_SYS_SOCKIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#cmakedefine HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#cmakedefine HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#cmakedefine HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/utsname.h> header file. */
|
||||
#cmakedefine HAVE_SYS_UTSNAME_H 1
|
||||
|
||||
|
|
|
@ -15,9 +15,7 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
|
|
|
@ -12,9 +12,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
|
|
2
extcap.c
2
extcap.c
|
@ -25,9 +25,7 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
|
4
file.c
4
file.c
|
@ -54,9 +54,7 @@
|
|||
#include "ui/ws_ui_util.h"
|
||||
|
||||
/* Needed for addrinfo */
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -11,9 +11,7 @@
|
|||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include "wtap-int.h"
|
||||
#include "wtap_opttypes.h"
|
||||
|
|
|
@ -32,9 +32,7 @@ extern "C" {
|
|||
#include <unistd.h> /* for read(), write(), close(), etc. */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h> /* for stat() and struct stat */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Visual C++ on Win32 systems doesn't define these. (Old UNIX systems don't
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h> /* needed to define AF_ values on UNIX */
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
#include <string.h>
|
||||
#include <wsutil/inet_addr.h>
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
|
|
|
@ -98,9 +98,7 @@ get_cur_groupname(void) {
|
|||
|
||||
#else /* _WIN32 */
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
|
|
Loading…
Reference in New Issue