44# To make CI scripts maintenance simpler, copies of this file in the
55# libpcap, tcpdump and tcpslice git repositories should be identical.
66# Please mind that Solaris /bin/sh before 11 does not support the $()
7- # command substitution syntax, hence the SC2006 directives .
7+ # command substitution syntax, hence the "-e SC2006" flag in Makefile .
88
99# A poor man's mktemp(1) for OSes that don't have one (e.g. AIX 7, Solaris 9).
1010mktempdir_diy () {
1111 while true ; do
1212 # /bin/sh implements $RANDOM in AIX 7, but not in Solaris before 11,
1313 # thus use dd and od instead.
14- # shellcheck disable=SC2006
1514 mktempdir_diy_suffix=` dd if=/dev/urandom bs=4 count=1 2> /dev/null | od -t x -A n | head -1 | tr -d ' \t ' `
1615 [ -z " $mktempdir_diy_suffix " ] && return 1
1716 mktempdir_diy_path=" ${TMPDIR:-/ tmp} /${1:? } .${mktempdir_diy_suffix} "
@@ -29,7 +28,6 @@ mktempdir_diy() {
2928
3029mktempdir () {
3130 mktempdir_prefix=${1:- tmp}
32- # shellcheck disable=SC2006
3331 case ` os_id` in
3432 Darwin-* |FreeBSD-* |NetBSD-* )
3533 # In these operating systems mktemp(1) always appends an implicit
@@ -61,7 +59,6 @@ print_sysinfo() {
6159
6260# Try to make the current C compiler print its version information (usually
6361# multi-line) to stdout.
64- # shellcheck disable=SC2006
6562cc_version_nocache () {
6663 : " ${CC:? } "
6764 case ` basename " $CC " ` in
@@ -103,7 +100,6 @@ cc_version_nocache() {
103100 esac
104101}
105102
106- # shellcheck disable=SC2006
107103cc_version () {
108104 echo " ${cc_version_cached:= `cc_version_nocache`} "
109105}
@@ -116,7 +112,6 @@ print_cc_version() {
116112
117113# For the current C compiler try to print a short and uniform identification
118114# string (such as "gcc-9.3.0") that is convenient to use in a case statement.
119- # shellcheck disable=SC2006
120115cc_id_nocache () {
121116 cc_id_firstline=` cc_version | head -1`
122117 : " ${cc_id_firstline:? } "
@@ -161,7 +156,6 @@ cc_id_nocache() {
161156 fi
162157}
163158
164- # shellcheck disable=SC2006
165159cc_id () {
166160 echo " ${cc_id_cached:= `cc_id_nocache`} "
167161}
@@ -174,7 +168,6 @@ discard_cc_cache() {
174168
175169# For the current C compiler try to print CFLAGS value that tells to treat
176170# warnings as errors.
177- # shellcheck disable=SC2006
178171cc_werr_cflags () {
179172 case ` cc_id` in
180173 gcc-* |clang-* )
@@ -192,7 +185,6 @@ cc_werr_cflags() {
192185}
193186
194187# Tell whether "gcc" is a symlink to Clang (this is the case on macOS).
195- # shellcheck disable=SC2006
196188gcc_is_clang_in_disguise () {
197189 case ` cc_id` /` basename " ${CC:? } " ` in
198190 clang-* /gcc)
@@ -202,7 +194,6 @@ gcc_is_clang_in_disguise() {
202194 return 1
203195}
204196
205- # shellcheck disable=SC2006
206197os_id () {
207198 # OS does not change between builds or in the middle of a build, so it is
208199 # fine to cache uname output.
@@ -246,7 +237,6 @@ run_after_echo() {
246237}
247238
248239print_so_deps () {
249- # shellcheck disable=SC2006
250240 case ` os_id` in
251241 Darwin-* )
252242 run_after_echo otool -L " ${1:? } "
@@ -271,7 +261,6 @@ handle_matrix_debug() {
271261}
272262
273263purge_directory () {
274- # shellcheck disable=SC2006
275264 if [ " ` os_id` " = SunOS-5.11 ]; then
276265 # In Solaris 11 /bin/sh the pathname expansion of "*" always includes
277266 # "." and "..", so the straightforward rm would always fail.
0 commit comments