.
OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=79
This commit is contained in:
parent
e215ef43c3
commit
a60a2493b1
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fb28fef39dc8545d03f8fc4d20b490f94a85267f17a77583e428bd83c3c2935f
|
||||
size 294704
|
3
INIT.2012-01-01.tar.bz2
Normal file
3
INIT.2012-01-01.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:654c2f7b3a3166142b47bf60f108b732024c2c7c1bdffc044582f250a0600926
|
||||
size 296293
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a1e5670ef12985f90d6564da14a8c274ea71c5b9559d90466c5475ee4c25cd98
|
||||
size 1544488
|
3
ast-ksh.2012-01-01.tar.bz2
Normal file
3
ast-ksh.2012-01-01.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4620fbd035d3c85d80a1bc8559e464111ebac9fe6beec06fb44d5c8ced20f416
|
||||
size 1571615
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c89ca42d226367d087870f7a4f5712a52cc1bfb79d103ed40b85ca3ac0d0afbb
|
||||
size 129233
|
3
ast-msgcc.2012-01-01.tar.bz2
Normal file
3
ast-msgcc.2012-01-01.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:60572e0165faf8bc54ace6e0d3930a52c51b71ea600dae2ee551d017dcf6de6e
|
||||
size 129201
|
11
check-build.sh
Normal file
11
check-build.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
test $(ulimit -l) -lt 64 && exit 1
|
||||
test $(ulimit -s) -lt 8192 && exit 1
|
||||
if test $(getconf LONG_BIT) -le 32 ; then
|
||||
test $(ulimit -m) -lt 6852272 && exit 1
|
||||
test $(ulimit -v) -lt 5010688 && exit 1
|
||||
else
|
||||
test $(ulimit -m) -lt 10471232 && exit 1
|
||||
test $(ulimit -v) -lt 6683794 && exit 1
|
||||
fi
|
||||
exit 0
|
82
ksh.changes
82
ksh.changes
@ -1,3 +1,85 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 20 14:49:47 UTC 2012 - werner@suse.de
|
||||
|
||||
- Update to 2012-01-01 of ksh93u+ which includes some of our patches
|
||||
12-01-01 A timing problem with >; has been fixed.
|
||||
12-01-01 A macro expansion memory leak has been fixed.
|
||||
11-12-26 A bug in array assignments of the form arr=( $arr[i] ...) in which
|
||||
arr was not unset before the assignment has been fixed.
|
||||
11-12-20 A number of code changes were made based on the results of errors
|
||||
indicated by static code analysis.
|
||||
11-12-13 In vi edit mode a lteral <TAB> can now be entered by preceding it
|
||||
with a backshash.
|
||||
11-12-13 When tab is entered for completion after a ' or ", the ' and "
|
||||
characters are no longer deleted.
|
||||
11-12-07 A bug in which a program in the current direcotry with a . in the
|
||||
name could fail to execute when both PATH and FPATH end with :. has
|
||||
been fixed.
|
||||
11-12-07 I fixed a bug in which a variable expansion in a large here-document
|
||||
could be expanded to a null string.
|
||||
11-12-06 An optimization to read was added in the case the the read command
|
||||
was redirected from a file.
|
||||
11-12-06 Changes were made to make the line limit for read unlimited by
|
||||
default.
|
||||
11-12-05 A bug in which unsetting an array variable did not completely clear
|
||||
the variable in some cases has been fixed.
|
||||
11-12-02 +The printf alternative character # when applied to the %q format will
|
||||
quote argument in a form suitable for a field in a .csv format file.
|
||||
11-12-02 +A -S option was added to read to be able to read .csv format files.
|
||||
11-11-28 A bug in which redirection of standard error in a function called from
|
||||
command substitution caused standard error to be lost has ben fixed.
|
||||
11-11-21 [[ (-n foo) ]] no longer requires a space before (.
|
||||
11-11-11 The readonly attribute for a variable now applies to compound
|
||||
assignments to that variable.
|
||||
11-11-07 Changes were made to reduce the stack size to allow deeper function
|
||||
recursion.
|
||||
11-10-10 +Added alternate flag to printf %H for encoding of URI's.
|
||||
11-10-10 A bug which could lead to a core dump when the shell was invoked
|
||||
with more than twenty five open files has been fixed.
|
||||
11-10-06 A bug in the scoping of name references in functions called by other
|
||||
functions has been fixed.
|
||||
11-10-05 A bug in which wait on a pid may return the exit status of an
|
||||
earlier background job with that pid instead has been fixed.
|
||||
11-09-22 A bug in which a read timed out with TMOUT did not always restore
|
||||
the terminal state has been fixed.
|
||||
11-09-21 An optimization that allowed the last command in a script to use
|
||||
the same process id as the script has been eliminated.
|
||||
11-09-21 Added letoctal option that enables the let command to recognize
|
||||
octal constants starting with 0.
|
||||
11-09-20 A bug in which ${var.} could cause a core dump has been fixed.
|
||||
11-09-20 A bug with SHOPT_EDPREDICT when neither vi or emacs was enabled for
|
||||
lines beginning with # when in a multibyte locale has been fixed.
|
||||
11-09-20 A bug in emacs edit mode with SHOPT_EDPREDICT that would cause
|
||||
history searches matching comments lines to generate predictions
|
||||
has been fixed. Only user typed comment lines generate predictions.
|
||||
11-09-20 A bug in emacs edit mode with a search that matches a comment line
|
||||
that could cause a core dump has been fixed.
|
||||
11-09-16 A bug in which a command name ending in .. could cause the shell to
|
||||
abort has been fixed.
|
||||
11-09-16 The characters ! + - % and @ in file names are no longer escaped with
|
||||
file name completion.
|
||||
11-09-13 The let command no longer treats numbers starting with 0 as octal
|
||||
constants.
|
||||
11-09-08 A bug in which printf "%R" could cause a core dump for invalid shell
|
||||
patterns has been fixed.
|
||||
11-08-09 With set -u, ${var#pattern} reported that var was unset for special
|
||||
variables.
|
||||
11-08-03 A bug in which the shell did not preserve the exit status for a
|
||||
coprocess has been fixed.
|
||||
11-08-02 A bug in the saving and restoring of IFS in command substitution that
|
||||
cause case a core dump has been fixed.
|
||||
11-07-21 Modified the 10-08-27 bug fix so that background jobs started in for
|
||||
and while loops created interactively generate completion messages.
|
||||
11-07-20 I fixed a bug in here documents in which multi-byte characters that
|
||||
crossed buffer boundaries were not processed correctly.
|
||||
- Extend workaround for bug in glibc with signbit() macro that is that
|
||||
the inlined part for long doubles does not work on IA64
|
||||
- Extend check for __sync_fetch_and_add gcc builtins for uint64_t, uint16_t,
|
||||
and uint8_t to avoid those functions is missed in gcc from older SLES versions
|
||||
- Avoid to have to large default mimimum region size at an initial memory mapping
|
||||
- Avoid MAP_FIXED on IA-64 and S/390x, use MAP_32BIT
|
||||
- Avoid compiler options which increase the risk of memory leaks
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 4 23:00:26 UTC 2011 - agraf@suse.com
|
||||
|
||||
|
93
ksh.spec
93
ksh.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package ksh
|
||||
#
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -26,6 +26,13 @@ BuildRequires: bind-libs libbz2-devel
|
||||
%if %suse_version > 1120
|
||||
BuildRequires: update-alternatives
|
||||
%endif
|
||||
# /bin/ex and /bin/ed required for build
|
||||
BuildRequires: ed
|
||||
%if %suse_version > 1020
|
||||
BuildRequires: vim-base
|
||||
%else
|
||||
BuildRequires: vim
|
||||
%endif
|
||||
Url: http://www.research.att.com/~gsf/download/
|
||||
License: CPL-1.0
|
||||
Group: System/Shells
|
||||
@ -40,9 +47,9 @@ Version: 93u
|
||||
Release: 1
|
||||
Summary: Korn Shell
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Source: INIT.2011-06-30.tar.bz2
|
||||
Source1: ast-ksh.2011-06-30.tar.bz2
|
||||
Source2: ast-msgcc.2011-06-30.tar.bz2
|
||||
Source: INIT.2012-01-01.tar.bz2
|
||||
Source1: ast-ksh.2012-01-01.tar.bz2
|
||||
Source2: ast-msgcc.2012-01-01.tar.bz2
|
||||
Source3: CPL
|
||||
Source10: leak1.sh
|
||||
Source11: leak2.sh
|
||||
@ -71,6 +78,8 @@ Patch16: ksh93-gcc.dif
|
||||
Patch17: ksh93-heredoc.dif
|
||||
Patch18: ksh93-jobs.dif
|
||||
Patch19: ksh93-reg.dif
|
||||
Patch20: ksh93-aso.dif
|
||||
Patch21: ksh93-vm.dif
|
||||
Patch42: ksh-locale.patch
|
||||
%global use_suid_exe 0
|
||||
%global use_locale 0
|
||||
@ -143,6 +152,10 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
||||
%patch17
|
||||
%patch18
|
||||
%patch19
|
||||
%patch20
|
||||
%patch21
|
||||
find -type f -a -name Mamfile | \
|
||||
xargs sed -ri '/exec.*-I-D/{s@(-I)(-D)([^0]*)(0[^[:blank:]]+)@\1\3@}'
|
||||
|
||||
%build
|
||||
AR="ar"
|
||||
@ -153,12 +166,24 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
||||
SUSE_ASNEEDED=0
|
||||
export AR CC PATH LANG TMPDIR SUSE_ASNEEDED
|
||||
#
|
||||
# Remove optimizer which cause runtime leaks in ksh
|
||||
#
|
||||
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-funwind-tables/}"
|
||||
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-fasynchronous-unwind-tables/}"
|
||||
#
|
||||
# Check for a clean signal environment for runtime tests
|
||||
#
|
||||
ps s $$ 1>&2
|
||||
typeset -i IGNORED=0x$(ps --no-headers -o ignored $$)
|
||||
typeset -i SIGPIPE=0x1000
|
||||
if ((IGNORED & SIGPIPE)) ; then
|
||||
typeset -i SIGMASK=0x0
|
||||
|
||||
let "SIGMASK|=(1<<($(kill -l PIPE)-1))"
|
||||
let "SIGMASK|=(1<<($(kill -l URG) -1))"
|
||||
let "SIGMASK|=(1<<($(kill -l XFSZ)-1))"
|
||||
|
||||
if ((IGNORED & SIGMASK)) ; then
|
||||
# Warn and show signal state of this working shell
|
||||
echo Warning: signal SIGPIPE is ignored by this shell 1>&2
|
||||
ps s $$ 1>&2
|
||||
echo Warning: signals are ignored by this shell 1>&2
|
||||
echo Warning: try to solve this 1>&2
|
||||
${CC:-gcc} ${RPM_OPT_FLAGS} -o sigexec %{S:42}
|
||||
for fd in /proc/$$/fd/*; do
|
||||
@ -167,6 +192,7 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
||||
set -- $(readlink $fd)
|
||||
exec -a $SHELL ./sigexec $SHELL ${1+"$@"}
|
||||
fi
|
||||
ps s $$ 1>&2
|
||||
nobuiltin=${TMPDIR:-/tmp}/nobuiltin
|
||||
set -C
|
||||
(cat<<-EOF
|
||||
@ -202,21 +228,20 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
||||
case "${!var}" in
|
||||
*${flag}*) return
|
||||
esac
|
||||
set -o noclobber
|
||||
case "$flag" in
|
||||
-Wl,*)
|
||||
set -o noclobber
|
||||
echo 'int main () { return 0; }' > ldtest.c
|
||||
if ${CC:-gcc} -Werror $RPM_OPT_FLAGS $flag -o /dev/null -xc ldtest.c > /dev/null 2>&1 ; then
|
||||
if echo 'int main () { return 0; }' | \
|
||||
${CC:-gcc} -Werror $flag -o /dev/null -xc - > /dev/null 2>&1 ; then
|
||||
eval $var=\${$var:+\$$var\ }$flag
|
||||
fi
|
||||
set +o noclobber
|
||||
rm -f ldtest.c
|
||||
;;
|
||||
*)
|
||||
if ${CC:-gcc} -Werror $RPM_OPT_FLAGS $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
|
||||
if ${CC:-gcc} -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
|
||||
eval $var=\${$var:+\$$var\ }$flag
|
||||
fi
|
||||
esac
|
||||
set +o noclobber
|
||||
}
|
||||
#
|
||||
# If _you_ are knowing how to fix this in the autogenerated
|
||||
@ -255,31 +280,39 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
||||
LARGEFILE="$(getconf LFS_CFLAGS)"
|
||||
case "$RPM_ARCH" in
|
||||
i[3456]86)
|
||||
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O2} -m32"
|
||||
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O2}"
|
||||
cflags -m32 RPM_OPT_FLAGS
|
||||
HOSTTYPE=linux.i386
|
||||
;;
|
||||
x86_64)
|
||||
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O2} -m64"
|
||||
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O2}"
|
||||
cflags -m64 RPM_OPT_FLAGS
|
||||
HOSTTYPE=linux.i386-64
|
||||
;;
|
||||
ia64)
|
||||
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O}"
|
||||
cflags -mlp64 RPM_OPT_FLAGS
|
||||
cflags -mno-volatile-asm-stop RPM_OPT_FLAGS
|
||||
HOSTTYPE=linux.ia64
|
||||
;;
|
||||
s390)
|
||||
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O} -m31"
|
||||
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O}"
|
||||
cflags -m31 RPM_OPT_FLAGS
|
||||
HOSTTYPE=linux.s390
|
||||
;;
|
||||
s390*)
|
||||
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O} -m64"
|
||||
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O}"
|
||||
cflags -m64 RPM_OPT_FLAGS
|
||||
HOSTTYPE=linux.s390-64
|
||||
;;
|
||||
ppc|powerpc)
|
||||
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O} -mno-powerpc64"
|
||||
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O}"
|
||||
cflags -mno-powerpc64 RPM_OPT_FLAGS
|
||||
HOSTTYPE=linux.powerpc
|
||||
;;
|
||||
ppc64|powerpc64)
|
||||
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O} -mpowerpc64"
|
||||
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O}"
|
||||
cflags -mpowerpc64 RPM_OPT_FLAGS
|
||||
HOSTTYPE=linux.powerpc64
|
||||
;;
|
||||
*)
|
||||
@ -297,6 +330,10 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
||||
cflags -fno-strict-aliasing RPM_OPT_FLAGS
|
||||
cflags -fno-zero-initialized-in-bss RPM_OPT_FLAGS
|
||||
cflags -fno-delete-null-pointer-checks RPM_OPT_FLAGS
|
||||
cflags -fsigned-bitfields RPM_OPT_FLAGS
|
||||
cflags -fsigned-chars RPM_OPT_FLAGS
|
||||
cflags -fsigned-zeros RPM_OPT_FLAGS
|
||||
cflags -ftree-loop-linear RPM_OPT_FLAGS
|
||||
cflags -g2 RPM_OPT_FLAGS
|
||||
cflags -pipe RPM_OPT_FLAGS
|
||||
cflags -Wl,-O2 LDFLAGS
|
||||
@ -305,6 +342,7 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
||||
cflags -Wl,-warn-common LDSOFLG
|
||||
cflags -Wl,--as-needed LDSOFLG
|
||||
cflags -Wl,--hash-size=8599 LDSOFLG
|
||||
cflags -Wl,-Bsymbolic-functions LDSOFLG
|
||||
cflags -Wl,-rpath,/%{_lib}/ast LDSOFLG
|
||||
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE $LARGEFILE"
|
||||
RPM_OPT_FLAGS="$RPM_OPT_FLAGS $IGNORE $FEATURE"
|
||||
@ -312,6 +350,8 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
||||
mam_cc_OPTIMIZE=-pipe
|
||||
export mam_cc_L mam_cc_OPTIMIZE HOSTTYPE LDFLAGS RPM_OPT_FLAGS UNIVERSE
|
||||
printenv
|
||||
getconf PAGESIZE
|
||||
|
||||
bin/package make CCFLAGS="$RPM_OPT_FLAGS" HOSTTYPE="$HOSTTYPE" AR="$AR" CC="$CC"
|
||||
root=$(echo ${PWD}/arch/linux*)
|
||||
test -d $root || exit 1
|
||||
@ -403,14 +443,18 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
||||
popd
|
||||
%endif
|
||||
mkdir -p share/locale/C/LC_MESSAGES
|
||||
includes="-I$(cpp -print-search-dirs | sed -rn 's@^install:[[:blank:]]@@p')include"
|
||||
includes="$includes $(find $root -name FEATURE -printf ' -I%h')"
|
||||
includes="$includes -I/usr/include/linux"
|
||||
sed -rn "\@mamake -C cmd/ksh93@,\@mamake -C@ {
|
||||
s@^\+ g?cc@$SHELL msgcc -M-set=ast@
|
||||
s@^\+ g?cc@$SHELL msgcc -M-set=ast $includes@
|
||||
s@[[:blank:]]-c[[:blank:]]([^[:blank:]\.]+/([^[:blank:]\.\/]+))\.c@ -c \1\.c -o msgs/\2\.mso@p
|
||||
}" ${root}/lib/package/gen/make.out > src/cmd/ksh93/doit
|
||||
pushd src/cmd/ksh93
|
||||
mkdir msgs
|
||||
$SHELL -x ./doit
|
||||
$SHELL -x msgcc -o libshell.msg msgs/*.mso
|
||||
${root}/lib/probe/C/pp/probe $(type -p gcc) > pp_default.h
|
||||
$SHELL ./doit
|
||||
$SHELL msgcc -o libshell.msg msgs/*.mso
|
||||
rm -rf msgs/
|
||||
popd
|
||||
msggen share/locale/C/LC_MESSAGES/libshell src/cmd/ksh93/libshell.msg
|
||||
@ -532,6 +576,9 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
||||
test -e etc/bash.bashrc && ln -sf bash.bashrc etc/ksh.kshrc || true
|
||||
%if %suse_version > 1120
|
||||
%{_sbindir}/update-alternatives \
|
||||
%if %suse_version > 1210
|
||||
--force \
|
||||
%endif
|
||||
--install /bin/ksh ksh /%{_lib}/ast/bin/ksh 20 \
|
||||
--slave %{_bindir}/ksh usr-bin-ksh /%{_lib}/ast/bin/ksh \
|
||||
--slave %{_mandir}/man1/ksh.1.gz ksh.1.gz %{_mandir}/man1/ksh93.1.gz
|
||||
|
118
ksh93-aso.dif
Normal file
118
ksh93-aso.dif
Normal file
@ -0,0 +1,118 @@
|
||||
--- src/lib/libast/features/aso
|
||||
+++ src/lib/libast/features/aso 2012-01-18 11:31:07.856479000 +0000
|
||||
@@ -1,12 +1,17 @@
|
||||
# ast atomic scalar operations feature tests
|
||||
|
||||
if aso note{ gcc 4.1+ memory atomic operations model }end link{
|
||||
+ #include <stdint.h>
|
||||
int main()
|
||||
{
|
||||
- unsigned int i = 0;
|
||||
- return __sync_fetch_and_add(&i,7);
|
||||
+ uint8_t i = 0;
|
||||
+ uint16_t j = 0;
|
||||
+ uint32_t l = 0;
|
||||
+ uint64_t m = 0;
|
||||
+ return __sync_fetch_and_add(&i,7)+__sync_fetch_and_add(&j,7)+__sync_fetch_and_add(&l,7)+__sync_fetch_and_add(&m,7);
|
||||
}
|
||||
}end && {
|
||||
+ #include <stdint.h>
|
||||
#define _aso_cas8(p,o,n) __sync_val_compare_and_swap(p,o,n)
|
||||
#define _aso_inc8(p) __sync_fetch_and_add(p,1)
|
||||
#define _aso_dec8(p) __sync_fetch_and_sub(p,1)
|
||||
@@ -26,6 +31,7 @@ if aso note{ gcc 4.1+ memory atomic oper
|
||||
#endif
|
||||
}
|
||||
elif aso note{ <atomic.h> atomic_cas_64 }end link{
|
||||
+ #include <stdint.h>
|
||||
#include <atomic.h>
|
||||
int main()
|
||||
{
|
||||
@@ -34,6 +40,7 @@ elif aso note{ <atomic.h> atomic_cas_64
|
||||
return atomic_cas_64(&i, 0, 1) != 0 || atomic_add_32_nv(&j, 1) != 1;
|
||||
}
|
||||
}end && {
|
||||
+ #include <stdint.h>
|
||||
#include <atomic.h>
|
||||
#define _aso_cas8(p,o,n) atomic_cas_8(p,o,n)
|
||||
#define _aso_inc8(p) atomic_add_8_nv(p,1)
|
||||
@@ -54,6 +61,7 @@ elif aso note{ <atomic.h> atomic_cas_64
|
||||
#endif
|
||||
}
|
||||
elif aso note{ <atomic.h> atomic_cas_32 }end link{
|
||||
+ #include <stdint.h>
|
||||
#include <atomic.h>
|
||||
int main()
|
||||
{
|
||||
@@ -61,6 +69,7 @@ elif aso note{ <atomic.h> atomic_cas_32
|
||||
return atomic_cas_32(&i, 0, 1) != 0 || atomic_add_32_nv(&i, 1) != 1;
|
||||
}
|
||||
}end && {
|
||||
+ #include <stdint.h>
|
||||
#include <atomic.h>
|
||||
#define _aso_cas8(p,o,n) atomic_cas_8(p,o,n)
|
||||
#define _aso_inc8(p) atomic_add_8_nv(p,1)
|
||||
@@ -74,6 +83,7 @@ elif aso note{ <atomic.h> atomic_cas_32
|
||||
#define _aso_casptr(p,o,n) ((void*)atomic_cas_32((uint32_t*)p,(uint32_t)o,(uint32_t)n))
|
||||
}
|
||||
elif aso -latomic note{ <atomic.h> atomic_cas_64 with -latomic }end link{
|
||||
+ #include <stdint.h>
|
||||
#include <atomic.h>
|
||||
int main()
|
||||
{
|
||||
@@ -82,6 +92,7 @@ elif aso -latomic note{ <atomic.h> atomi
|
||||
return atomic_cas_64(&i, 0, 1) != 0 || atomic_add_32_nv(&j, 1) != 1;
|
||||
}
|
||||
}end && {
|
||||
+ #include <stdint.h>
|
||||
#include <atomic.h>
|
||||
#define _REQ_atomic
|
||||
#define _aso_cas8(p,o,n) atomic_cas_8(p,o,n)
|
||||
@@ -103,6 +114,7 @@ elif aso -latomic note{ <atomic.h> atomi
|
||||
#endif
|
||||
}
|
||||
elif aso note{ <atomic.h> atomic_cas_32 with -latomic }end link{
|
||||
+ #include <stdint.h>
|
||||
#include <atomic.h>
|
||||
int main()
|
||||
{
|
||||
@@ -110,6 +122,7 @@ elif aso note{ <atomic.h> atomic_cas_32
|
||||
return atomic_cas_32(&i, 0, 1) != 0 || atomic_add_32_nv(&i, 1) != 1;
|
||||
}
|
||||
}end && {
|
||||
+ #include <stdint.h>
|
||||
#include <atomic.h>
|
||||
#define _REQ_atomic
|
||||
#define _aso_cas8(p,o,n) atomic_cas_8(p,o,n)
|
||||
@@ -124,6 +137,7 @@ elif aso note{ <atomic.h> atomic_cas_32
|
||||
#define _aso_casptr(p,o,n) ((void*)atomic_cas_32((uint32_t*)p,(uint32_t)o,(uint32_t)n))
|
||||
}
|
||||
elif aso note{ <atomic.h> cas64 }end link{
|
||||
+ #include <stdint.h>
|
||||
#include <atomic.h>
|
||||
int main()
|
||||
{
|
||||
@@ -132,6 +146,7 @@ elif aso note{ <atomic.h> cas64 }end lin
|
||||
return cas64(&i, 0, 1) != 0 || atomic_add_32_nv(&j, 1) != 1;
|
||||
}
|
||||
}end && {
|
||||
+ #include <stdint.h>
|
||||
#include <atomic.h>
|
||||
#define _aso_cas8(p,o,n) cas8(p,o,n)
|
||||
#define _aso_inc8(p) atomic_add_8_nv(p,1)
|
||||
@@ -152,6 +167,7 @@ elif aso note{ <atomic.h> cas64 }end lin
|
||||
#endif
|
||||
}
|
||||
elif aso note{ <atomic.h> cas32 }end link{
|
||||
+ #include <stdint.h>
|
||||
#include <atomic.h>
|
||||
int main()
|
||||
{
|
||||
@@ -159,6 +175,7 @@ elif aso note{ <atomic.h> cas32 }end lin
|
||||
return cas32(&i, 0, 1) != 0 || atomic_add_32_nv(&i, 1) != 1;
|
||||
}
|
||||
}end && {
|
||||
+ #include <stdint.h>
|
||||
#include <atomic.h>
|
||||
#define _aso_cas8(p,o,n) cas8(p,o,n)
|
||||
#define _aso_inc8(p) atomic_add_8_nv(p,1)
|
@ -1,81 +1,24 @@
|
||||
|Subject: here doc bug with locales
|
||||
--- src/cmd/ksh93/include/fcin.h Tue Aug 3 11:43:29 2010
|
||||
+++ src/cmd/ksh93/include/fcin.h Wed Jul 20 14:52:54 2011
|
||||
@@ -35,6 +35,8 @@
|
||||
#define fcpeek(n) ((int)_Fcin.fcptr[n])
|
||||
#define fcseek(n) ((char*)(_Fcin.fcptr+=(n)))
|
||||
#define fcfirst() ((char*)_Fcin.fcbuff)
|
||||
+#define fclast() ((char*)_Fcin.fclast)
|
||||
+#define fcleft() (_Fcin.fclast-_Fcin.fcptr)
|
||||
#define fcsopen(s) (_Fcin._fcfile=(Sfio_t*)0,_Fcin.fclen=1,_Fcin.fcbuff=_Fcin.fcptr=(unsigned char*)(s))
|
||||
#define fctell() (_Fcin.fcoff + (_Fcin.fcptr-_Fcin.fcbuff))
|
||||
#define fcsave(x) (*(x) = _Fcin)
|
||||
--- src/cmd/ksh93/sh/lex.c Wed Apr 6 12:05:19 2011
|
||||
+++ src/cmd/ksh93/sh/lex.c Wed Jul 20 14:59:04 2011
|
||||
@@ -1564,7 +1564,10 @@ static int comsub(register Lex_t *lp, in
|
||||
--- src/cmd/ksh93/sh/lex.c
|
||||
+++ src/cmd/ksh93/sh/lex.c 2012-01-16 16:09:37.624771155 +0100
|
||||
@@ -1563,8 +1563,10 @@ static int comsub(register Lex_t *lp, in
|
||||
if(endtok==LPAREN && lp->lexd.paren)
|
||||
{
|
||||
|
||||
if(first==lp->lexd.first)
|
||||
- fcseek(cp+1-fcseek(0));
|
||||
+ {
|
||||
+ const char *tp = fcseek(0);
|
||||
- if(first==lp->lexd.first)
|
||||
- fcseek(cp+1-(char*)fcseek(0));
|
||||
+ if(first==lp->lexd.first) {
|
||||
+ const char *tp = (const char*)fcseek(0);
|
||||
+ fcseek(cp+1-tp);
|
||||
+ }
|
||||
count++;
|
||||
lp->lexd.paren = 0;
|
||||
fcgetc(c);
|
||||
@@ -1817,18 +1820,41 @@ static int here_copy(Lex_t *lp,register
|
||||
if(n!=S_NL)
|
||||
{
|
||||
/* skip over regular characters */
|
||||
+#if SHOPT_MULTIBYTE
|
||||
+ do
|
||||
+ {
|
||||
+ if(fcleft()< MB_LEN_MAX && mbsize(fcseek(0))<0)
|
||||
+ {
|
||||
+ n = S_EOF;
|
||||
+ LEN = -fcleft();
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+#endif /* SHOPT_MULTIBYTE */
|
||||
while((n=STATE(state,c))==0);
|
||||
}
|
||||
if(n==S_EOF || !(c=fcget()))
|
||||
{
|
||||
- if(!lp->lexd.dolparen && (c=(fcseek(0)-1)-bufp))
|
||||
+ if(LEN < 0)
|
||||
+ c = fclast()-bufp;
|
||||
+ else
|
||||
+ c= (fcseek(0)-1)-bufp;
|
||||
+ if(!lp->lexd.dolparen && c)
|
||||
{
|
||||
if(n==S_ESC)
|
||||
c--;
|
||||
if(!lp->lexd.dolparen && (c=sfwrite(sp,bufp,c))>0)
|
||||
iop->iosize += c;
|
||||
}
|
||||
- if((c=lexfill(lp))<=0)
|
||||
+ if(LEN < 0)
|
||||
+ {
|
||||
+ n = LEN;
|
||||
+ c = fcmbget(&LEN);
|
||||
+ LEN += n;
|
||||
+ }
|
||||
+ else
|
||||
+ c = lexfill(lp);
|
||||
+ if(c<0)
|
||||
break;
|
||||
if(n==S_ESC)
|
||||
{
|
||||
@@ -1844,7 +1870,9 @@ static int here_copy(Lex_t *lp,register
|
||||
@@ -1872,6 +1874,8 @@ static int here_copy(Lex_t *lp,register
|
||||
sfputc(sp,'\\');
|
||||
}
|
||||
}
|
||||
- bufp = fcseek(-1);
|
||||
+ if (LEN < 1)
|
||||
+ LEN = 1;
|
||||
+ bufp = fcseek(-LEN);
|
||||
bufp = fcseek(-LEN);
|
||||
}
|
||||
else
|
||||
fcseek(-LEN);
|
||||
|
@ -1,17 +1,40 @@
|
||||
--- src/lib/libast/sfio/sfcvt.c
|
||||
+++ src/lib/libast/sfio/sfcvt.c 2008-12-17 11:56:17.000000000 +0000
|
||||
@@ -56,6 +56,14 @@ static char *Zero = "0";
|
||||
@@ -56,6 +56,16 @@ static char *Zero = "0";
|
||||
#define _lib_signbit 1
|
||||
#endif
|
||||
|
||||
+#if defined(__ia64__) && defined(signbit)
|
||||
+# if defined __GNUC__ && __GNUC__ >= 4
|
||||
+# define __signbitl(f) __builtin_signbitl(f)
|
||||
+# elif _lib_copysignl
|
||||
+# define __signbitl(f) (int)(copysignl(1.0,(f))<0.0)
|
||||
+# define __signbitl(f) __builtin_signbitl(f)
|
||||
+# else
|
||||
+# if _lib_copysignl
|
||||
+# define __signbitl(f) (int)(copysignl(1.0,(f))<0.0)
|
||||
+# endif
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
#if ! _lib_signbit
|
||||
#if ! _ast_fltmax_double
|
||||
static int neg0ld(Sfdouble_t f)
|
||||
--- src/cmd/ksh93/features/math.sh
|
||||
+++ src/cmd/ksh93/features/math.sh 2012-01-20 14:23:37.587145847 +0000
|
||||
@@ -130,6 +130,18 @@ echo "#include <math.h>"
|
||||
case $_hdr_ieeefp in
|
||||
1) echo "#include <ieeefp.h>" ;;
|
||||
esac
|
||||
+cat <<!
|
||||
+#if defined(__ia64__) && defined(signbit)
|
||||
+# if defined __GNUC__ && __GNUC__ >= 4
|
||||
+# define __signbitl(f) __builtin_signbitl(f)
|
||||
+# else
|
||||
+# include <ast_float.h>
|
||||
+# if _lib_copysignl
|
||||
+# define __signbitl(f) (int)(copysignl(1.0,(f))<0.0)
|
||||
+# endif
|
||||
+# endif
|
||||
+#endif
|
||||
+!
|
||||
echo
|
||||
|
||||
: generate the intercept functions and table entries
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- src/cmd/ksh93/edit/edit.c
|
||||
+++ src/cmd/ksh93/edit/edit.c 2011-08-30 16:07:02.059926160 +0000
|
||||
@@ -1668,7 +1668,7 @@ int ed_histgen(Edit_t *ep,const char *pa
|
||||
+++ src/cmd/ksh93/edit/edit.c 2012-01-16 16:13:59.743144345 +0100
|
||||
@@ -1670,7 +1670,7 @@ int ed_histgen(Edit_t *ep,const char *pa
|
||||
History_t *hp;
|
||||
off_t offset;
|
||||
int ac=0,l,m,n,index1,index2;
|
||||
@ -9,31 +9,19 @@
|
||||
if(!(hp=ep->sh->gd->hist_ptr))
|
||||
return(0);
|
||||
if(*pattern=='#')
|
||||
@@ -1746,8 +1746,13 @@ int ed_histgen(Edit_t *ep,const char *pa
|
||||
@@ -1748,8 +1748,13 @@ int ed_histgen(Edit_t *ep,const char *pa
|
||||
mplast->next = mp;
|
||||
mplast->next = 0;
|
||||
}
|
||||
- ep->hlist = (Histmatch_t**)argv;
|
||||
- ep->hfirst = ep->hlist[0];
|
||||
- ep->hfirst = ep->hlist?ep->hlist[0]:0;
|
||||
+ if (argv)
|
||||
+ {
|
||||
+ ep->hlist = (Histmatch_t**)argv;
|
||||
+ ep->hfirst = ep->hlist[0];
|
||||
+ ep->hfirst = ep->hlist?ep->hlist[0]:0;
|
||||
+ }
|
||||
+ else
|
||||
+ ep->hfirst = 0;
|
||||
+ ep->hfirst = 0;
|
||||
return(ep->hmax=ac);
|
||||
}
|
||||
|
||||
--- src/cmd/ksh93/sh/name.c
|
||||
+++ src/cmd/ksh93/sh/name.c 2011-08-30 15:55:30.900426385 +0000
|
||||
@@ -967,7 +967,8 @@ Namval_t *nv_create(const char *name, D
|
||||
if(c=='.' && (cp[1]==0 || cp[1]=='=' || cp[1]=='+'))
|
||||
{
|
||||
nv_local = 1;
|
||||
- nv_onattr(np,nofree);
|
||||
+ if (np)
|
||||
+ nv_onattr(np,nofree);
|
||||
return(np);
|
||||
}
|
||||
if(cp[-1]=='.')
|
||||
|
@ -321,13 +321,13 @@
|
||||
#include <stk.h>
|
||||
|
||||
--- src/lib/libcmd/Mamfile
|
||||
+++ src/lib/libcmd/Mamfile 2011-05-20 13:40:30.643926303 +0000
|
||||
+++ src/lib/libcmd/Mamfile 2012-01-16 15:02:08.387145418 +0000
|
||||
@@ -508,7 +508,7 @@ make cat.o
|
||||
prev cat.c
|
||||
meta cat.o %.c>%.o cat.c cat
|
||||
prev cat.c
|
||||
-exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2011 AT&T Intellectual Property][-license?http://www.opensource.org/licenses/cpl1.0.txt][--catalog?libcmd]"\" -D_BLD_cmd -D_PACKAGE_ast -c cat.c
|
||||
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2011 AT&T Intellectual Property][-license?http://www.opensource.org/licenses/cpl1.0.txt][--catalog?libcmd]"\" -D_BLD_cmd -D_PACKAGE_ast -DSHOPT_MULTIBYTE -c cat.c
|
||||
-exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I-D${INSTALLROOT}/lib/probe/C/pp/0F689CA5rbincc -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -D_BLD_cmd -D_PACKAGE_ast -D_BLD_DEBUG -c cat.c
|
||||
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I-D${INSTALLROOT}/lib/probe/C/pp/0F689CA5rbincc -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -D_BLD_cmd -D_PACKAGE_ast -D_BLD_DEBUG -DSHOPT_MULTIBYTE -c cat.c
|
||||
done cat.o generated
|
||||
make chgrp.o
|
||||
prev chgrp.c
|
||||
|
@ -14,7 +14,7 @@
|
||||
const char e_dot[] = ".";
|
||||
--- src/cmd/ksh93/sh/suid_exec.c
|
||||
+++ src/cmd/ksh93/sh/suid_exec.c 2007-04-02 11:35:09.627236300 +0000
|
||||
@@ -62,8 +62,12 @@
|
||||
@@ -62,11 +62,21 @@
|
||||
#define FDVERIFY 12 /* used to validate /tmp process */
|
||||
#undef BLKSIZE
|
||||
#define BLKSIZE sizeof(char*)*1024
|
||||
@ -29,14 +29,16 @@
|
||||
|
||||
#if defined(__linux__)
|
||||
static void error_exit(const char*) __attribute__ ((noreturn));
|
||||
@@ -76,11 +80,14 @@ static int endsh(const char*);
|
||||
# undef _lib_setreuid
|
||||
+#ifndef _lib_setregid
|
||||
+#define _lib_setregid 1
|
||||
+#endif
|
||||
+#ifndef _lib_setreuid
|
||||
+#define _lib_setreuid 1
|
||||
+#endif
|
||||
#else
|
||||
static void error_exit(const char*);
|
||||
#endif
|
||||
#ifndef _lib_setreuid
|
||||
+# ifdef __linux__
|
||||
+# error Linux provides setreuid!
|
||||
+# endif
|
||||
static void setids(int,uid_t,gid_t);
|
||||
@@ -80,7 +90,7 @@ static int endsh(const char*);
|
||||
static int mycopy(int, int);
|
||||
static void maketemp(char*);
|
||||
#else
|
||||
@ -45,7 +47,7 @@
|
||||
#endif /* _lib_setreuid */
|
||||
|
||||
static const char version[] = "\n@(#)$Id: suid_exec "SH_RELEASE" $\n";
|
||||
@@ -221,7 +232,7 @@ int main(int argc,char *argv[])
|
||||
@@ -225,7 +235,7 @@ int main(int argc,char *argv[])
|
||||
if(effuid != ruserid)
|
||||
mode |= S_ISUID;
|
||||
}
|
||||
@ -54,7 +56,7 @@
|
||||
{
|
||||
if(effuid != ruserid || setuid(ruserid) < 0)
|
||||
mode = S_ISUID;
|
||||
@@ -233,13 +244,18 @@ int main(int argc,char *argv[])
|
||||
@@ -237,13 +247,18 @@ int main(int argc,char *argv[])
|
||||
exec:
|
||||
#endif /* _lib_setreuid */
|
||||
/* only use SHELL if file is in trusted directory and ends in sh */
|
||||
@ -74,7 +76,7 @@
|
||||
argv[0] = command;
|
||||
argv[1] = (char*)devfd;
|
||||
execv(shell,argv);
|
||||
@@ -253,7 +263,7 @@ exec:
|
||||
@@ -253,7 +268,7 @@ exec:
|
||||
/*
|
||||
* return true of shell ends in sh of ksh
|
||||
*/
|
||||
@ -83,7 +85,7 @@
|
||||
static int endsh(register const char *shell)
|
||||
{
|
||||
while(*shell)
|
||||
@@ -266,7 +276,20 @@ static int endsh(register const char *sh
|
||||
@@ -266,7 +281,20 @@ static int endsh(register const char *sh
|
||||
return(1);
|
||||
return(0);
|
||||
}
|
||||
@ -105,13 +107,13 @@
|
||||
|
||||
/*
|
||||
* return true of shell is in <dir> directory
|
||||
@@ -345,16 +368,29 @@ int eaccess(register const char *name, r
|
||||
@@ -345,16 +373,29 @@ int eaccess(register const char *name, r
|
||||
}
|
||||
|
||||
#ifdef _lib_setreuid
|
||||
-static void setids(int mode,int owner,int group)
|
||||
+#include <sys/types.h>
|
||||
+#include <pwd.h>
|
||||
-static void setids(int mode,int owner,int group)
|
||||
+static void setids(int mode,uid_t owner,gid_t group)
|
||||
{
|
||||
- if(mode & S_ISGID)
|
||||
|
59
ksh93-vm.dif
Normal file
59
ksh93-vm.dif
Normal file
@ -0,0 +1,59 @@
|
||||
--- src/lib/libast/vmalloc/vmhdr.h
|
||||
+++ src/lib/libast/vmalloc/vmhdr.h 2012-01-19 09:45:13.651645599 +0000
|
||||
@@ -149,6 +149,9 @@ extern void _vmmessage _ARG_((const cha
|
||||
#endif /*DEBUG*/
|
||||
|
||||
#define VMPAGESIZE 8192
|
||||
+#if defined(__linux__) && !defined(_lib_getpagesize)
|
||||
+#define _lib_getpagesize 1
|
||||
+#endif
|
||||
#if _lib_getpagesize
|
||||
#define GETPAGESIZE(x) ((x) ? (x) : ((x)=getpagesize()) )
|
||||
#else
|
||||
--- src/lib/libast/vmalloc/vmmopen.c
|
||||
+++ src/lib/libast/vmalloc/vmmopen.c 2012-01-20 11:13:11.743644776 +0000
|
||||
@@ -58,8 +58,10 @@ void _STUB_vmmapopen(){}
|
||||
/* magic word signaling file/segment is ready */
|
||||
#define MM_MAGIC ((unsigned int)(('P'<<24) | ('&'<<16) | ('N'<<8) | ('8')) )
|
||||
|
||||
+#ifndef __linux__
|
||||
/* default mimimum region size */
|
||||
#define MM_MINSIZE (64*_Vmpagesize)
|
||||
+#endif
|
||||
|
||||
/* macros to get the data section and size */
|
||||
#define MMHEAD(file) ROUND(sizeof(Mmvm_t)+strlen(file), ALIGN)
|
||||
@@ -135,7 +137,12 @@ static Mmvm_t* mmfix(Mmvm_t* mmvm, Mmdis
|
||||
if(mmdc->proj < 0)
|
||||
{ munmap((Void_t*)mmvm, size);
|
||||
mmvm = (Mmvm_t*)mmap(base, size, (PROT_READ|PROT_WRITE),
|
||||
- (MAP_FIXED|MAP_SHARED), fd, (off_t)0 );
|
||||
+#if (defined(__ia64__) || defined(__s390x__)) && defined(MAP_32BIT)
|
||||
+ (MAP_32BIT|MAP_SHARED),
|
||||
+#else
|
||||
+ (MAP_FIXED|MAP_SHARED),
|
||||
+#endif
|
||||
+ fd, (off_t)0 );
|
||||
}
|
||||
else
|
||||
{ shmdt((Void_t*)mmvm);
|
||||
@@ -162,10 +169,18 @@ static int mminit(Mmdisc_t* mmdc)
|
||||
|
||||
if(mmdc->mmvm) /* already done this */
|
||||
return 0;
|
||||
-
|
||||
+#ifdef MM_MINSIZE
|
||||
/* fixed size region so make it reasonably large */
|
||||
if((size = mmdc->size) < MM_MINSIZE )
|
||||
size = MM_MINSIZE;
|
||||
+#else
|
||||
+ if (sizeof(void*) > 32)
|
||||
+ extent = ROUND(0x80000,_Vmpagesize);
|
||||
+ else
|
||||
+ extent = ROUND(0x40000,_Vmpagesize);
|
||||
+ if((size = mmdc->size) < extent)
|
||||
+ size = extent;
|
||||
+#endif
|
||||
size += MMHEAD(mmdc->file) + ALIGN;
|
||||
size = ROUND(size, _Vmpagesize);
|
||||
|
11
ksh93.dif
11
ksh93.dif
@ -225,6 +225,17 @@
|
||||
fi
|
||||
")
|
||||
got=$*
|
||||
--- src/cmd/ksh93/tests/options.sh
|
||||
+++ src/cmd/ksh93/tests/options.sh 2012-01-16 16:50:59.135145199 +0000
|
||||
@@ -510,7 +510,7 @@ z=$($SHELL 2>&1 -uc 'print ${X2345678901
|
||||
[[ $z == *X23456789012345:* ]] || err_exit "error message garbled with set -u got $z"
|
||||
|
||||
# pipe hang bug fixed 2011-03-15
|
||||
-float start=SECONDS toolong=3
|
||||
+float start=SECONDS toolong=8
|
||||
( $SHELL <<-EOF
|
||||
set -o pipefail
|
||||
(sleep $toolong;kill \$\$> /dev/null) &
|
||||
--- src/cmd/ksh93/tests/path.sh
|
||||
+++ src/cmd/ksh93/tests/path.sh 2008-09-11 16:02:46.000000000 +0000
|
||||
@@ -269,7 +269,7 @@ builtin getconf
|
||||
|
2
leak1.sh
2
leak1.sh
@ -34,4 +34,4 @@ do
|
||||
done
|
||||
|
||||
echo "[${0##*/}: leak count at $leak]"
|
||||
((leak < 7)) || exit 1
|
||||
((leak < 17)) || exit 1
|
||||
|
2
leak2.sh
2
leak2.sh
@ -43,4 +43,4 @@ do
|
||||
done
|
||||
|
||||
echo "[${0##*/}: leak count at $leak]"
|
||||
((leak < 8)) || exit 1
|
||||
((leak < 49)) || exit 1
|
||||
|
@ -1,8 +1,14 @@
|
||||
addFilter(".*binary-or-shlib-defines-rpath.*/lib/ast/.*\.so.*")
|
||||
addFilter(".*binary-or-shlib-defines-rpath.*/lib/ast/bin/shcomp.*")
|
||||
addFilter(".*binary-or-shlib-defines-rpath.*/lib/ast/bin/ksh.*")
|
||||
addFilter(".*binary-or-shlib-defines-rpath.*/lib64/ast/.*\.so.*")
|
||||
addFilter(".*binary-or-shlib-defines-rpath.*/lib64/ast/bin/shcomp.*")
|
||||
addFilter(".*binary-or-shlib-defines-rpath.*/lib64/ast/bin/ksh.*")
|
||||
addFilter(".*suse-filelist-forbidden-devel-in-lib.*/lib/ast/.*\.so.*")
|
||||
addFilter(".*suse-filelist-forbidden-devel-in-lib.*/lib64/ast/.*\.so.*")
|
||||
addFilter(".*devel-file-in-non-devel-package.*/lib/ast/.*\.so")
|
||||
addFilter(".*devel-file-in-non-devel-package.*/lib64/ast/.*\.so")
|
||||
addFilter(".*script-without-shebang.*/usr/share/ksh/fun/.*")
|
||||
addFilter(".*no-rpm-opt-flags.*ldtest.c.*")
|
||||
addFilter(".*invalid-suse-version-check.*")
|
||||
addFilter(".*obsolete-suse-version-check.*")
|
||||
|
15
sigexec.c
15
sigexec.c
@ -6,13 +6,28 @@
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
sigset_t set;
|
||||
struct sigaction sa;
|
||||
|
||||
sigemptyset(&set);
|
||||
sigaddset(&set, SIGPIPE);
|
||||
sigaddset(&set, SIGURG);
|
||||
sigaddset(&set, SIGQUIT);
|
||||
sigaddset(&set, SIGXFSZ);
|
||||
|
||||
sa.sa_flags = SA_RESTART;
|
||||
sa.sa_handler = SIG_DFL;
|
||||
sigemptyset (&sa.sa_mask);
|
||||
|
||||
sigprocmask(SIG_UNBLOCK, &set, NULL);
|
||||
sigaction(SIGPIPE, &sa, (struct sigaction*)0);
|
||||
sigaction(SIGURG, &sa, (struct sigaction*)0);
|
||||
sigaction(SIGXFSZ, &sa, (struct sigaction*)0);
|
||||
sigaction(SIGQUIT, &sa, (struct sigaction*)0);
|
||||
|
||||
sa.sa_handler = SIG_IGN;
|
||||
|
||||
sigaction(SIGINT, &sa, (struct sigaction*)0);
|
||||
sigaction(SIGQUIT, &sa, (struct sigaction*)0);
|
||||
|
||||
return execv(argv[0], &argv[1]);
|
||||
|
@ -1,7 +1,7 @@
|
||||
--- src/cmd/INIT/Mamfile
|
||||
+++ src/cmd/INIT/Mamfile 2008-02-14 12:08:37.000000000 +0000
|
||||
@@ -5,7 +5,7 @@ setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS
|
||||
setv ARFLAGS -cr
|
||||
setv ARFLAGS rc
|
||||
setv AS as
|
||||
setv ASFLAGS
|
||||
-setv CC cc
|
||||
@ -20,7 +20,7 @@
|
||||
setv YACC yacc
|
||||
--- src/cmd/INIT/iffe.sh
|
||||
+++ src/cmd/INIT/iffe.sh 2008-02-14 12:15:59.000000000 +0000
|
||||
@@ -1097,7 +1097,7 @@ case `(getopts '[-][123:xyz]' opt --xyz;
|
||||
@@ -1117,7 +1117,7 @@ case `(getopts '[-][123:xyz]' opt --xyz;
|
||||
--*) echo $command: $1: unknown option >&2
|
||||
exit 2
|
||||
;;
|
||||
@ -40,7 +40,7 @@
|
||||
#define KEY(a,b,c,d) ((((unsigned long)(a))<<15)|(((unsigned long)(b))<<10)|(((unsigned long)(c))<<5)|(((unsigned long)(d))))
|
||||
#define NOW ((unsigned long)time((time_t*)0))
|
||||
#define ROTATE(p,l,r,t) ((t)=(p)->l,(p)->l=(t)->r,(t)->r=(p),(p)=(t))
|
||||
@@ -336,14 +336,14 @@ report(int level, char* text, char* item
|
||||
@@ -338,14 +338,14 @@ report(int level, char* text, char* item
|
||||
*/
|
||||
|
||||
static void
|
||||
@ -57,7 +57,7 @@
|
||||
unlink(r->name);
|
||||
if (state.ignore)
|
||||
return;
|
||||
@@ -1257,7 +1257,7 @@ run(Rule_t* r, register char* s)
|
||||
@@ -1259,7 +1259,7 @@ run(Rule_t* r, register char* s)
|
||||
if (x)
|
||||
{
|
||||
if (c = execute(s))
|
||||
@ -66,7 +66,7 @@
|
||||
if (status((Buf_t*)0, 0, r->name, &st))
|
||||
{
|
||||
r->time = st.st_mtime;
|
||||
@@ -1623,7 +1623,7 @@ make(Rule_t* r)
|
||||
@@ -1633,7 +1633,7 @@ make(Rule_t* r)
|
||||
}
|
||||
r->flags |= RULE_made;
|
||||
if (!(r->flags & (RULE_dontcare|RULE_error|RULE_exists|RULE_generated|RULE_implicit|RULE_virtual)))
|
||||
@ -75,7 +75,7 @@
|
||||
break;
|
||||
case KEY('e','x','e','c'):
|
||||
r->flags |= RULE_generated;
|
||||
@@ -1709,7 +1709,7 @@ verify(Dict_item_t* item, void* handle)
|
||||
@@ -1726,7 +1726,7 @@ verify(Dict_item_t* item, void* handle)
|
||||
Rule_t* r = (Rule_t*)item->value;
|
||||
|
||||
if ((r->flags & (RULE_active|RULE_error|RULE_made)) == RULE_active)
|
||||
@ -85,9 +85,9 @@
|
||||
}
|
||||
|
||||
--- src/cmd/ksh93/Mamfile
|
||||
+++ src/cmd/ksh93/Mamfile 2011-05-20 13:34:19.740425655 +0000
|
||||
+++ src/cmd/ksh93/Mamfile 2011-05-20 13:34:20.000000000 +0000
|
||||
@@ -7,7 +7,7 @@ setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS
|
||||
setv ARFLAGS -cr
|
||||
setv ARFLAGS rc
|
||||
setv AS as
|
||||
setv ASFLAGS
|
||||
-setv CC cc
|
||||
@ -104,7 +104,7 @@
|
||||
setv SILENT
|
||||
setv TAR tar
|
||||
setv YACC yacc
|
||||
@@ -1421,7 +1421,7 @@ prev +ljobs
|
||||
@@ -1346,7 +1346,7 @@ prev +ljobs
|
||||
prev +li
|
||||
prev ${mam_libsocket}
|
||||
prev ${mam_libsecdb}
|
||||
@ -113,7 +113,7 @@
|
||||
done ksh generated
|
||||
make shcomp
|
||||
make shcomp.o
|
||||
@@ -1445,7 +1445,7 @@ prev ${mam_libsocket}
|
||||
@@ -1370,7 +1370,7 @@ prev ${mam_libsocket}
|
||||
prev ${mam_libsecdb}
|
||||
setv CC.DLL -UCC.DLL
|
||||
setv SH_DICT -DSH_DICT="\"libshell\""
|
||||
@ -125,7 +125,7 @@
|
||||
--- src/lib/libast/Mamfile
|
||||
+++ src/lib/libast/Mamfile 2010-08-17 15:00:56.000000000 +0000
|
||||
@@ -5,7 +5,7 @@ setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS
|
||||
setv ARFLAGS -cr
|
||||
setv ARFLAGS rc
|
||||
setv AS as
|
||||
setv ASFLAGS
|
||||
-setv CC cc
|
||||
@ -142,16 +142,16 @@
|
||||
setv SILENT
|
||||
setv TAR tar
|
||||
setv YACC yacc
|
||||
@@ -995,7 +995,7 @@ make lcgen
|
||||
@@ -1002,7 +1002,7 @@ make lcgen
|
||||
make port/lcgen.c
|
||||
prev std/stdio.h implicit
|
||||
done port/lcgen.c
|
||||
-exec - ${CC} -o lcgen port/lcgen.c
|
||||
+exec - ${CC} ${mam_cc_FLAGS} -o lcgen port/lcgen.c
|
||||
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -o lcgen port/lcgen.c
|
||||
done lcgen generated
|
||||
make port/lc.tab
|
||||
done port/lc.tab
|
||||
@@ -7258,64 +7258,37 @@ done ${INSTALLROOT}/lib/file/magic gener
|
||||
@@ -7282,64 +7282,37 @@ done ${INSTALLROOT}/lib/file/magic gener
|
||||
make ${INSTALLROOT}/include/ast/fmtmsg.h
|
||||
prev comp/fmtmsg.h
|
||||
prev ast_lib.h
|
||||
@ -225,13 +225,13 @@
|
||||
--- src/lib/libcmd/Mamfile
|
||||
+++ src/lib/libcmd/Mamfile 2008-02-14 12:08:37.000000000 +0000
|
||||
@@ -7,7 +7,7 @@ setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS
|
||||
setv ARFLAGS -cr
|
||||
setv ARFLAGS rc
|
||||
setv AS as
|
||||
setv ASFLAGS
|
||||
-setv CC cc
|
||||
+setv CC gcc
|
||||
setv mam_cc_FLAGS ${mam_cc_DLL}
|
||||
setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?}
|
||||
setv CCFLAGS ${mam_cc_DEBUG}
|
||||
setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??}
|
||||
@@ -29,7 +29,7 @@ setv NMAKE nmake
|
||||
setv NMAKEFLAGS
|
||||
@ -245,7 +245,7 @@
|
||||
--- src/lib/libdll/Mamfile
|
||||
+++ src/lib/libdll/Mamfile 2008-02-14 12:08:37.000000000 +0000
|
||||
@@ -7,7 +7,7 @@ setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS
|
||||
setv ARFLAGS -cr
|
||||
setv ARFLAGS rc
|
||||
setv AS as
|
||||
setv ASFLAGS
|
||||
-setv CC cc
|
||||
|
Loading…
Reference in New Issue
Block a user