mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fixes to compile on Solaris variants, NetBSD, and NixOS
Solaris, Illumos distributions, and NetBSD need LDFLAGS set to link explicitly to libm, otherwise, due to as-yet unknown reasons, the src/lib/libdll/features/dll fails to write a valid header file and compilation fails due to unknown identifiers such as Dllscan_t. This commit adds the flag on those systems. NixOS is a Linux distro that uses very different paths from the usual Unix conventions (though it's POSIX compliant), and the regression tests still needed a lot of tweaks to be compatible. src/cmd/INIT/package.sh, bin/package: - On SunOS (Solaris and illumos distros) and NetBSD, add '-lm' to LDFLAGS before compiling. src/cmd/INIT/mamprobe.sh, bin/mamprobe, src/cmd/INIT/execrate.sh, bin/execrate: - Instead of only in /bin, /usr/bin, /sbin and /usr/sbin, search utilities in the path given by the OS 'getconf PATH', and use the user's original $PATH as a fallback. src/cmd/ksh93/tests/*.sh: - Miscellaneous portability fixes, mainly elimination of unportable hardcoded paths to commands. - basic.sh: Remove test for 'time' keyword millisecond precision. It was racy and could fail depending on system and system load.
This commit is contained in:
parent
5a7bd2c196
commit
d3cd4cf906
18 changed files with 102 additions and 42 deletions
|
|
@ -238,6 +238,7 @@ foo=$($SHELL <<- ++EOF++
|
|||
[[ $foo == foobar ]] || err_exit 'trap on exit when last commands is subshell is not triggered'
|
||||
|
||||
err=$(
|
||||
ulimit -n 1024
|
||||
$SHELL 2>&1 <<- \EOF
|
||||
date=$(whence -p date)
|
||||
function foo
|
||||
|
|
@ -333,7 +334,8 @@ done
|
|||
# Ref.: https://github.com/att/ast/issues/478
|
||||
expect='foo=bar'
|
||||
actual=$(
|
||||
foo=$(print `/bin/echo bar`) # should print nothing
|
||||
bin_echo=${ whence -p echo; } || bin_echo=echo
|
||||
foo=$(print `"$bin_echo" bar`) # should print nothing
|
||||
print foo=$foo # should print "foo=bar"
|
||||
)
|
||||
[[ $actual == "$expect" ]] \
|
||||
|
|
@ -602,7 +604,7 @@ trap ERR ERR
|
|||
[[ $(trap -p) == *ERR* ]] || err_exit 'trap -p in subshell does not contain ERR'
|
||||
trap - USR1 ERR
|
||||
|
||||
( PATH=/bin:/usr/bin
|
||||
( builtin getconf && PATH=$(getconf PATH)
|
||||
dot=$(cat <<-EOF
|
||||
$(ls -d .)
|
||||
EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue