This is an automated email from the ASF dual-hosted git repository.

dragon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new a2e096d7d7 Remove many standard UNIX HAVE_*_H build envs (#10824)
a2e096d7d7 is described below

commit a2e096d7d719592e850708d6d1bcdd66554233d5
Author: Phong Nguyen <[email protected]>
AuthorDate: Tue Nov 28 09:12:31 2023 -0800

    Remove many standard UNIX HAVE_*_H build envs (#10824)
    
    * Remove many standard UNIX HAVE_*_H build envs
    
    * remove STREAMS header (obsolete since 2008)
    
    * Merge HAVE_STDLIB_H
    
    * Merge HAVE_DLFCN_H
---
 CMakeLists.txt                       |  8 --------
 include/tscore/ink_args.h            |  2 --
 include/tscore/ink_config.h.cmake.in |  9 ---------
 include/tscore/ink_defs.h            |  2 --
 include/tscore/ink_memory.h          |  2 --
 include/tscore/ink_platform.h        | 23 +----------------------
 6 files changed, 1 insertion(+), 45 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5476615be2..e8d8d352cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -212,10 +212,7 @@ include(CheckTypeSize)
 include(CheckSourceCompiles)
 include(CheckStructHasMember)
 
-check_include_file(dlfcn.h HAVE_DLFCN_H)
-check_include_file(stdlib.h HAVE_STDLIB_H)
 check_include_file(ifaddrs.h HAVE_IFADDRS_H)
-check_include_file(inttypes.h HAVE_INTTYPES_H)
 check_include_file(string.h HAVE_STRING_H)
 check_include_file(linux/major.h HAVE_LINUX_MAJOR_H)
 check_include_file(malloc.h HAVE_MALLOC_H)
@@ -239,10 +236,6 @@ check_include_file(sys/sysctl.h HAVE_SYS_SYSCTL_H)
 check_include_file(sys/mman.h HAVE_SYS_MMAN_H)
 check_include_file(sys/mount.h HAVE_SYS_MOUNT_H)
 check_include_file(sys/param.h HAVE_SYS_PARAM_H)
-check_include_file(sysexits.h HAVE_SYSEXITS_H)
-check_include_file(stropts.h HAVE_STROPTS_H)
-check_include_file(unistd.h HAVE_UNISTD_H)
-check_include_file(values.h HAVE_VALUES_H)
 check_include_file(netinet/in.h HAVE_NETINET_IN_H)
 check_include_file(netinet/in_systm.h HAVE_NETINET_IN_SYSTM_H)
 check_include_file(netinet/tcp.h HAVE_NETINET_TCP_H)
@@ -252,7 +245,6 @@ check_include_file(netdb.h HAVE_NETDB_H)
 check_include_file(arpa/inet.h HAVE_ARPA_INET_H)
 check_include_file(arpa/nameser.h HAVE_ARPA_NAMESER_H)
 check_include_file(arpa/nameser_compat.h HAVE_ARPA_NAMESER_COMPAT_H)
-check_include_file(siginfo.h HAVE_SIGINFO_H)
 check_include_file(endian.h HAVE_ENDIAN_H)
 
 # Find libraries
diff --git a/include/tscore/ink_args.h b/include/tscore/ink_args.h
index 2729d9f0bb..9de851c71d 100644
--- a/include/tscore/ink_args.h
+++ b/include/tscore/ink_args.h
@@ -30,9 +30,7 @@ Process arguments
 #include "tscore/ink_defs.h"
 #include "tscore/ink_apidefs.h"
 
-#if HAVE_SYSEXITS_H
 #include <sysexits.h>
-#endif
 
 #ifndef EX_USAGE
 #define EX_USAGE 64
diff --git a/include/tscore/ink_config.h.cmake.in 
b/include/tscore/ink_config.h.cmake.in
index 3d4f193261..d8ebb14e75 100644
--- a/include/tscore/ink_config.h.cmake.in
+++ b/include/tscore/ink_config.h.cmake.in
@@ -39,12 +39,8 @@
 #cmakedefine HAVE_NCURSES_H 1
 #cmakedefine HAVE_NCURSES_CURSES_H 1
 #cmakedefine HAVE_NCURSES_NCURSES_H 1
-#cmakedefine HAVE_DLFCN_H 1
 #cmakedefine HAVE_LZMA_H 1
-#cmakedefine HAVE_STDLIB_H 1
 #cmakedefine HAVE_IFADDRS_H 1
-#cmakedefine HAVE_INTTYPES_H 1
-#cmakedefine HAVE_STRING_H 1
 #cmakedefine HAVE_LINUX_HDREG_H 1
 #cmakedefine HAVE_LINUX_MAJOR_H 1
 #cmakedefine HAVE_MALLOC_H 1
@@ -70,10 +66,6 @@
 #cmakedefine HAVE_SYS_MMAN_H 1
 #cmakedefine HAVE_SYS_MOUNT_H 1
 #cmakedefine HAVE_SYS_PARAM_H 1
-#cmakedefine HAVE_SYSEXITS_H 1
-#cmakedefine HAVE_STROPTS_H 1
-#cmakedefine HAVE_UNISTD_H 1
-#cmakedefine HAVE_VALUES_H 1
 #cmakedefine HAVE_NETINET_IN_H 1
 #cmakedefine HAVE_NETINET_IN_SYSTM_H 1
 #cmakedefine HAVE_NETINET_TCP_H 1
@@ -83,7 +75,6 @@
 #cmakedefine HAVE_ARPA_INET_H 1
 #cmakedefine HAVE_ARPA_NAMESER_H 1
 #cmakedefine HAVE_ARPA_NAMESER_COMPAT_H 1
-#cmakedefine HAVE_SIGINFO_H 1
 #cmakedefine HAVE_ENDIAN_H 1
 #cmakedefine HAVE_MALLOC_USABLE_SIZE 1
 #cmakedefine HAVE_MCHECK_PEDANTIC 1
diff --git a/include/tscore/ink_defs.h b/include/tscore/ink_defs.h
index 93f869565c..b53641090c 100644
--- a/include/tscore/ink_defs.h
+++ b/include/tscore/ink_defs.h
@@ -29,9 +29,7 @@
 
 #include <stdint.h> // NOLINT(modernize-deprecated-headers)
 
-#ifdef HAVE_INTTYPES_H
 #include <inttypes.h> // NOLINT(modernize-deprecated-headers)
-#endif
 
 #ifndef INT64_MIN
 #define INT64_MAX (9223372036854775807LL)
diff --git a/include/tscore/ink_memory.h b/include/tscore/ink_memory.h
index 1ed8b6a597..7f9a0af994 100644
--- a/include/tscore/ink_memory.h
+++ b/include/tscore/ink_memory.h
@@ -32,9 +32,7 @@
 
 #include "tscore/ink_config.h"
 
-#if HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
diff --git a/include/tscore/ink_platform.h b/include/tscore/ink_platform.h
index beec36d991..aec2e6e97c 100644
--- a/include/tscore/ink_platform.h
+++ b/include/tscore/ink_platform.h
@@ -60,25 +60,16 @@
 struct ifafilt;
 #include <net/if.h>
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h> // NOLINT(modernize-deprecated-headers)
-#endif
-#include <ctype.h> // NOLINT(modernize-deprecated-headers)
-#ifdef HAVE_STRING_H
+#include <ctype.h>  // NOLINT(modernize-deprecated-headers)
 #include <string.h> // NOLINT(modernize-deprecated-headers)
-#endif
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -108,9 +99,6 @@ struct ifafilt;
 #endif
 
 #include <signal.h> // NOLINT(modernize-deprecated-headers)
-#ifdef HAVE_SIGINFO_H
-#include <siginfo.h>
-#endif
 
 #if TS_USE_EPOLL
 #include <sys/epoll.h>
@@ -119,17 +107,10 @@ struct ifafilt;
 #include <sys/event.h>
 #endif
 
-#ifdef HAVE_VALUES_H
-#include <values.h>
-#endif
 #if __has_include(<alloca.h>)
 #include <alloca.h>
 #endif
 
-#ifdef HAVE_STROPTS_H
-#include <stropts.h>
-#endif
-
 #include "tscore/ink_endian.h"
 
 #ifdef HAVE_SYS_IOCTL_H
@@ -157,9 +138,7 @@ using in_addr_t = unsigned int;
 #include <sys/systeminfo.h>
 #endif
 
-#ifdef HAVE_DLFCN_H
 #include <dlfcn.h>
-#endif
 
 #include <float.h> // NOLINT(modernize-deprecated-headers)
 

Reply via email to