Hello community,
here is the log from the commit of package ksh for openSUSE:Factory checked in at 2012-02-25 07:30:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ksh (Old)
and /work/SRC/openSUSE:Factory/.ksh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ksh", Maintainer is "werner@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ksh/ksh.changes 2012-02-07 22:12:57.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ksh.new/ksh.changes 2012-02-25 07:30:27.000000000 +0100
@@ -1,0 +2,75 @@
+Fri Feb 24 11:38:56 UTC 2012 - werner@suse.de
+
+- Remove check-build.sh as the memory leaks are fixed now
+
+-------------------------------------------------------------------
+Tue Feb 21 10:43:58 UTC 2012 - werner@suse.de
+
+- Avoid possible problems pointed out by a gcc warning about overflow
+ in arraysubscript, that is use full size of structure Namval as
+ well as access this area at position 0
+
+-------------------------------------------------------------------
+Mon Feb 20 14:09:55 UTC 2012 - werner@suse.de
+
+- Update to 2012-02-14 of ksh93u+ which includes the real fix for
+ the IFS crash, the ulimit, and the mem leaks (bnc#743244, bnc#744355,
+ bnc#744589, and bnc#744992) as well as other fixes like:
+ 12-02-14 A bug in which ^Z did not stop a pipeline when the last component
+ was a shell built-in has been fixed.
+ 12-02-14 getconf("PATH") used to initialize ed(1) path.
+ 12-02-13 +In earlier version read from standard input would fail when called
+ from the KEYBD trap. Now read options -N, -n, and -t should work
+ when called from a KEYBD trap.
+ 12-02-13 If FCEDIT is not set and fc is invoked without the -e option,
+ ed will be invoked if found instead of /bin/ed.
+ 12-02-10 Another bug in the saving and restoring of IFS in a subshell
+ that caused a core dump has been fixed.
+ 12-02-08 A bug in which .sh.fun disciplines could be cleared after a
+ function completes has been fixed.
+ 12-02-08 A bug in job control in which the foregroup process group was not
+ set correctly after restarting a stopped pipeline has been fixed.
+ 12-02-07 A bug in which numbers with leading zeros could be treated as
+ octal constants outside of ((...)) has been fixed.
+ 12-02-06 A bug in arithmetic with compound variables containing multiple
+ array elements has been fixed.
+ libast:
+ 12-02-10 sfvprintf.c: fix 1 byte too long buffer access
+ 12-02-07 malloc.c/features/vmalloc: add gnu __malloc_hook tests
+ 12-02-06 vmmopen.c: fix ALIGN vs sys/param.h macro conflict
+ libcmd:
+ 12-02-14 rm.c: --force ignores no file operands specified
+ libpp:
+ 12-02-14 ppproto.c: fix "already noticed" logic
+ cmd/builtin:
+ 12-02-11 what.c: fix boyer moore cut n paste bug -- thanks werner
+
+-------------------------------------------------------------------
+Tue Feb 14 15:36:22 UTC 2012 - werner@suse.de
+
+- Fix a nasty crash in IFS handling
+
+-------------------------------------------------------------------
+Fri Feb 10 17:11:36 UTC 2012 - werner@suse.de
+
+- Fix bug in src/cmd/builtin/what.c
+
+-------------------------------------------------------------------
+Fri Feb 10 15:45:09 UTC 2012 - werner@suse.de
+
+- Make pty and other ast-base command available as this helps to
+ test out some major features of the ksh (compare with bnc#743244)
+
+-------------------------------------------------------------------
+Thu Feb 9 14:14:53 UTC 2012 - werner@suse.de
+
+- Modify some tests of the test suite not to show false results on
+ highly loaded build hosts as well as on build shares mounted with
+ noatime option
+
+-------------------------------------------------------------------
+Thu Feb 9 09:47:38 UTC 2012 - werner@suse.de
+
+- Add patch from David Korn to fix foreground job control (bnc #743244)
+
+-------------------------------------------------------------------
Old:
----
INIT.2012-02-02.tar.bz2
ast-ksh.2012-02-02.tar.bz2
ast-msgcc.2012-02-02.tar.bz2
check-build.sh
New:
----
INIT.2012-02-14.tar.bz2
ast-base.2012-02-14.tar.bz2
ast-ksh.2012-02-14.tar.bz2
ksh93-builtin.dif
ksh93-foreground-prgrp.dif
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ksh.spec ++++++
--- /var/tmp/diff_new_pack.VoyBbM/_old 2012-02-25 07:30:29.000000000 +0100
+++ /var/tmp/diff_new_pack.VoyBbM/_new 2012-02-25 07:30:29.000000000 +0100
@@ -19,6 +19,19 @@
Name: ksh
+%global date 2012-02-14
+%global use_suid_exe 0
+%if %suse_version > 1210
+%global use_opt_bins 1
+%else
+%global use_opt_bins 0
+%endif
+%if !0%{?qemu_user_space_build:1}
+%global do_tests 1
+%else
+%global do_tests 0
+%endif
+%global use_locale 0
BuildRequires: bind-utils bison flex gdbm-devel glibc-devel ncurses-devel procps psmisc pwdutils zlib-devel
%if %suse_version > 1020
BuildRequires: bind-libs libbz2-devel
@@ -40,15 +53,18 @@
Requires(post): update-alternatives
Requires(preun): update-alternatives
%endif
+%if %use_suid_exe
+PreReq: permissions
+%endif
AutoReqProv: on
Version: 93u
Release: 1
Summary: Korn Shell
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: INIT.2012-02-02.tar.bz2
-Source1: ast-ksh.2012-02-02.tar.bz2
-Source2: ast-msgcc.2012-02-02.tar.bz2
-Source3: CPL
+Source: INIT.%{date}.tar.bz2
+Source1: ast-ksh.%{date}.tar.bz2
+Source2: ast-base.%{date}.tar.bz2
+Source4: CPL
Source10: leak1.sh
Source11: leak2.sh
Source12: ifs-crash.sh
@@ -82,10 +98,9 @@
Patch20: ksh93-aso.dif
Patch21: ksh93-vm.dif
Patch22: ksh93-limit-name-len.dif
+Patch23: ksh93-foreground-prgrp.dif
+Patch24: ksh93-builtin.dif
Patch42: ksh-locale.patch
-%global use_suid_exe 0
-%global use_locale 0
-%global debug_memleak 0
%description
The original Korn Shell. The ksh is an sh-compatible command
@@ -123,7 +138,8 @@
%prep
chmod +x %{S:31}
-%setup -q -n ksh93 -T -c -a 0 -a 1 -a 2
+%setup -q -n ksh93 -T -c -a 0 -a 1
+tar --use-compress-program=bzcat -xf %{S:2} src/cmd/builtin/ src/cmd/msgcc/ src/lib/libpp/ src/lib/libuu/
if test -d share ; then
find share/ \( -name chef -o -name fudd -o -name piglatin -o -name valley \) -a -type d |\
xargs -r rm -vrf
@@ -160,6 +176,8 @@
%patch20
%patch21
%patch22
+%patch23
+%patch24
%build
#
@@ -223,6 +241,7 @@
test -n "${!LC_*}" && unset "${!LC_*}"
cflags ()
{
+ set +x
local flag=$1; shift
local var=$1; shift
test -n "${flag}" -a -n "${var}" || return
@@ -243,6 +262,24 @@
fi
esac
set +o noclobber
+ set -x
+ }
+ relink ()
+ {
+ set +x
+ local search=$1; shift
+ local target=$1; shift
+ test -n "${search}" -a -n "${target}" || exit 1
+ local object=$(find ${root:-/tmp}/src/cmd/ -name ${search}.o)
+ local cmd=$(
+ grep -e "-o $search" ${log:-/dev/null} | tail -n 1 | \
+ sed -r -e "s@\+ g?cc@${CC:-gcc}@" \
+ -e "s@-o $search@-o ${root:-/tmp}$target@" \
+ -e "s@[[:blank:]]${search}.o[[:blank:]]@ $object @" \
+ -e "s@[[:blank:]](/[^[:blank:]]*)?lib([[:alnum:]]+)\.a@ -l\2@g" \
+ -e "s@'@@g")
+ set -x
+ $cmd ${1+"$@"}
}
#
# If _you_ are knowing how to fix this in the autogenerated
@@ -321,12 +358,13 @@
HOSTTYPE=linux.$RPM_ARCH
;;
esac
+ MEMORY=execve
for mm in mmap mmap2 mmap64 munmap munmap2 munmap64 ; do
if strace -e $mm /bin/true > /dev/null 2>&1 ; then
MEMORY="${MEMORY:+${MEMORY},}$mm"
fi
done
- MEMORY="${MEMORY:+-e ${MEMORY}}"
+ MEMORY="-s 128 ${MEMORY:+-e ${MEMORY}}"
RPM_OPT_FLAGS=$(echo "${RPM_OPT_FLAGS}"|sed -r 's/[[:blank:]]+-g[0-9]?/ -g2/g')
UNIVERSE=att
LDFLAGS="-lm"
@@ -408,71 +446,65 @@
diff -u $nobuiltin - || true
base=src/cmd/ksh93
test=${PWD}/${base}/tests
- pushd ${root}/${base}
- rm -f libshell.a
- rm -f ${root}/bin/ksh
- rm -f ${root}/bin/shcomp
- ksh=$(grep -e '-o ksh' $log | tail -n 1 |\
- sed "s@+ g\?cc@$CC@;s@-o ksh@-o ${root}/bin/ksh@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
- ksht=$(grep -e '-o ksh' $log | tail -n 1 |\
- sed "s@+ g\?cc@$CC@;s@-o ksh@-o ${root}/bin/ksh.test@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
- test -n "${ksh}" || { echo build of ksh failed; exit 1; }
- shcomp=$(grep -e '-o shcomp' $log | tail -n 1 |\
- sed "s@+ g\?cc@$CC@;s@-o shcomp@-o ${root}/bin/shcomp@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
- shcompt=$(grep -e '-o shcomp' $log | tail -n 1 |\
- sed "s@+ g\?cc@$CC@;s@-o shcomp@-o ${root}/bin/shcomp.test@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
- test -n "${shcomp}" || { echo build of shcomp failed; exit 1; }
- suidex=$(grep -e '-o suid_exec' $log | tail -n 1 |\
- sed "s@+ g\?cc@$CC@;s@-o shcomp@-o ${root}/bin/suid_exec@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
- test -n "${suidex}" || { echo build of suidex failed; exit 1; }
- ${ksht} -Wl,-rpath,${root}/lib
- ${shcompt} -Wl,-rpath,${root}/lib
- ${ksh} -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast
- ${shcomp} -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast
- ${suidex} -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast
- popd
OPATH=$PATH
OSHELL=$SHELL
PATH=$PATH:${root}/bin
- SHELL=${root}/bin/ksh.test
- SHCOMP=${root}/bin/shcomp.test
+ SHELL=${root}/bin/ksh
+ SHCOMP=${root}/bin/shcomp
export PATH SHCOMP SHELL
-%if !0%{?qemu_user_space_build:1}
+%if %do_tests
pushd ${test}
typeset -i failed=0
ln -sf ${root}/lib ${test}/../
- rm -f pty.sh
- ${root}/bin/ksh.test shtests
+ sed -ri '/^L[[:blank:]]/a \t 8000' pty.sh
+ sed -ri 's/(SECONDS[[:blank:]]*>[[:blank:]]*)([[:digit:]]+)/\18/p' signal.sh
+ unset ${!LESS*}
+ ${SHELL} shtests
+ exec 3> ${TMPDIR:-/tmp}/log
LANG=POSIX
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:10} 400
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:10} 4000
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:11} 400
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:11} 4000
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:12}
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:13} 400
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:13} 4000
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:14} 400
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:14} 4000
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:10} 400
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:10} 4000
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:11} 400
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:11} 4000
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:12} 4
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:12} 40
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:13} 400
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:13} 4000
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:14} 400
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:14} 4000
if test $((IGNORED & SIGPIPE)) -eq 0 ; then
- ${root}/bin/ksh.test -c 'g="false"; trap "print -u2 PIPED; \$g && exit 0 ; g=true" PIPE ; while true ; do echo hello ; done' | head -n 10
+ ${SHELL} -c 'g="false"; trap "print -u2 PIPED; \$g && exit 0 ; g=true" PIPE ; while true ; do echo hello ; done' | head -n 10
fi
LANG=en_US.UTF-8
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:10} 400
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:10} 4000
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:11} 400
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:11} 4000
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:12}
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:13} 400
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:13} 4000
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:14} 400
- strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:14} 4000
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:10} 400
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:10} 4000
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:11} 400
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:11} 4000
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:12} 4
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:12} 40
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:13} 400
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:13} 4000
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:14} 400
+ strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:14} 4000
if test $((IGNORED & SIGPIPE)) -eq 0 ; then
- ${root}/bin/ksh.test -c 'g="false"; trap "print -u2 PIPED; \$g && exit 0 ; g=true" PIPE ; while true ; do echo hello ; done' | head -n 10
+ ${SHELL} -c 'g="false"; trap "print -u2 PIPED; \$g && exit 0 ; g=true" PIPE ; while true ; do echo hello ; done' | head -n 10
fi
LANG=POSIX
- killall -q -s 9 ${root}/bin/ksh.test || true
+ exec 3>&-
+ uniq -c ${TMPDIR:-/tmp}/log
+ killall -q -s 9 ${SHELL} || true
popd
%endif
+ pushd ${root}/${base}
+ rm -f libshell.a
+ rm -f ${root}/bin/ksh
+ rm -f ${root}/bin/shcomp
+ for bin in ksh shcomp pty what mime asa dlls suid_exec ; do
+ relink $bin /bin/$bin -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast
+ done
+ popd
+ LD_LIBRARY_PATH=${root}/lib
+ export LD_LIBRARY_PATH
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')"
@@ -491,11 +523,13 @@
msggen share/locale/C/LC_MESSAGES/libshell src/cmd/ksh93/libshell.msg
pushd ${root}/bin
PATH=$PATH:.
- set -- $(shcomp.test --version 2>&1)
+ set -- $(shcomp --version 2>&1)
eval version=\${$#}
- shcomp.test --nroff 2>&1 | sed 's/\(\.TH .*\)/\1 "2003-03-02" "" "Korn shell utilities"/' > ../man/man1/shcomp.1
- rm -v ksh.test shcomp.test
+ for bin in shcomp pty what mime asa dlls ; do
+ $bin --nroff 2>&1 | sed 's/\(\.TH .*\)/\1 "%{date}" "" "Korn shell utilities"/' > ../man/man1/$bin.1
+ done
popd
+ test -d /tmp -ef ${TMPDIR} || rm -rf ${TMPDIR}
SHELL=$OSHELL
PATH=$OPATH
@@ -516,25 +550,27 @@
%endif
mkdir -p %{buildroot}%{_datadir}/ksh/fun
mkdir -p %{buildroot}%{_sysconfdir}/permissions.d
- install bin/ksh %{buildroot}/%{_lib}/ast/bin/
- install bin/shcomp %{buildroot}/%{_lib}/ast/bin/
+ install bin/ksh %{buildroot}/bin/ksh93
+ install bin/shcomp %{buildroot}%{_bindir}/shcomp
+%if %use_opt_bins
+ for bin in pty what mime asa dlls ; do
+ install bin/$bin %{buildroot}/%{_bindir}/$bin
+ done
+%endif
%if %use_suid_exe
install bin/suid_exec %{buildroot}/%{_lib}/ast/bin/
%endif
- ln -sf bin/ksh %{buildroot}/%{_lib}/ast/ksh
# create ghost files
ln -sf /bin/true %{buildroot}/bin/ksh
ln -sf /bin/true %{buildroot}%{_bindir}/ksh
-%if %suse_version > 1120
- ln -sf ../man1/ksh93.1.gz %{buildroot}/%{_mandir}/man1/ksh.1.gz
- ln -sf /%{_lib}/ast/bin/ksh %{buildroot}/bin/ksh93
- ln -sf /%{_lib}/ast/bin/ksh %{buildroot}%{_bindir}/ksh93
-%endif
- ln -sf /%{_lib}/ast/bin/ksh %{buildroot}%{_bindir}/rksh
- ln -sf /%{_lib}/ast/bin/shcomp %{buildroot}%{_bindir}/shcomp
+ ln -sf /bin/ksh93 %{buildroot}%{_bindir}/rksh
+ ln -sf /bin/ksh93 %{buildroot}/%{_lib}/ast/ksh
ln -sf ast %{buildroot}/%{_lib}/ksh
cp -a lib/*.so* %{buildroot}/%{_lib}/ast/
cp -a fun/* %{buildroot}%{_datadir}/ksh/fun/
+ if cmp -s %{buildroot}%{_datadir}/ksh/fun/pushd %{buildroot}%{_datadir}/ksh/fun/popd ; then
+ ln -sf pushd %{buildroot}%{_datadir}/ksh/fun/popd
+ fi
for so in %{buildroot}/%{_lib}/ast/*.so.*.* ; do
so=${so##*/}
ln -sf /%{_lib}/ast/$so %{buildroot}%{_libdir}/ast/${so%%%%.*}.so
@@ -550,16 +586,27 @@
install -m 0644 lib/*.a %{buildroot}%{_libdir}/ast/
%if %suse_version > 1120
install -m 0644 man/man1/sh.1 %{buildroot}%{_mandir}/man1/ksh93.1
+ ln -sf ../man1/ksh93.1.gz %{buildroot}/%{_mandir}/man1/ksh.1.gz
+ ln -sf ../man1/ksh93.1.gz %{buildroot}/%{_mandir}/man1/rksh.1.gz
%else
install -m 0644 man/man1/sh.1 %{buildroot}%{_mandir}/man1/ksh.1
+ ln -sf ../man1/ksh.1.gz %{buildroot}/%{_mandir}/man1/rksh.1.gz
%endif
install -m 0644 man/man1/shcomp.1 %{buildroot}%{_mandir}/man1/shcomp.1
+%if %use_opt_bins
+ for bin in pty what mime asa dlls ; do
+ install -m 0644 man/man1/$bin.1 %{buildroot}%{_mandir}/man1/$bin.1
+ done
+%endif
for man in man/man3/*.3 ; do
man=${man##*/}
ast=${man}ast
install -m 0644 man/man3/${man} %{buildroot}%{_mandir}/man3/${ast}
done
install -m 0644 include/ast/* %{buildroot}%{_includedir}/ast/
+ if cmp -s %{buildroot}%{_includedir}/ast/namval.h %{buildroot}%{_includedir}/ast/ast_namval.h ; then
+ ln -sf ast_namval.h %{buildroot}%{_includedir}/ast/namval.h
+ fi
popd
%if %use_locale
for msg in share/locale/* ; do
@@ -579,7 +626,7 @@
if test -s lib/package/LICENSES/ast ; then
cp lib/package/LICENSES/ast LICENSE
else
- cp %{S:3} LICENSE
+ cp %{S:4} LICENSE
fi
mv src/cmd/ksh93/OBSOLETE src/cmd/ksh93/OBSOLETE.mm
echo '.VERBON 22' > grep.mm
@@ -603,22 +650,50 @@
set +C
%endif
+%if %use_suid_exe
+%if %{defined verify_permissions}
+%verifyscript
+%verify_permissions -e /%{_lib}/ast/bin/suid_exec
+%endif
+%endif
+
%post
test -e etc/bash.bashrc && ln -sf bash.bashrc etc/ksh.kshrc || true
+%if %use_suid_exe
+%if %{defined set_permissions}
+%set_permissions /%{_lib}/ast/bin/suid_exec
+%endif
+%endif
%if %suse_version > 1120
+if test -x /%{_lib}/ast/bin/ksh ; then
+ %{_sbindir}/update-alternatives \
+ --quiet \
+%if %suse_version > 1210
+ --force \
+%endif
+ --remove ksh /%{_lib}/ast/bin/ksh
+ rm -f /%{_lib}/ast/bin/ksh
+ rm -f /%{_lib}/ast/bin/shcomp
+fi
%{_sbindir}/update-alternatives \
+ --quiet \
%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
+ --install /bin/ksh ksh /bin/ksh93 20 \
+ --slave %{_bindir}/ksh usr-bin-ksh /bin/ksh93 \
+ --slave %{_mandir}/man1/ksh.1.gz ksh.1.gz %{_mandir}/man1/ksh93.1.gz \
+ --slave %{_mandir}/man1/rksh.1.gz rksh.1.gz %{_mandir}/man1/ksh93.1.gz
%else
-if test -x %{_lib}/ast/bin/ksh ; then
+if test -x /%{_lib}/ast/bin/ksh ; then
+ rm -f /%{_lib}/ast/bin/ksh
+ rm -f /%{_lib}/ast/bin/shcomp
+fi
+if test -x /bin/ksh93 ; then
rm -f bin/ksh
- ln -sf /%{_lib}/ast/bin/ksh bin/ksh
+ ln -sf /bin/ksh93 bin/ksh
rm -f %{_exec_prefix}/bin/ksh
- ln -sf /%{_lib}/ast/bin/ksh %{_exec_prefix}/bin/ksh
+ ln -sf /bin/ksh93 %{_exec_prefix}/bin/ksh
fi
%endif
@@ -626,52 +701,55 @@
%preun
if test $1 -eq 0 ; then
- %{_sbindir}/update-alternatives --remove ksh /%{_lib}/ast/bin/ksh
+ %{_sbindir}/update-alternatives --quiet --remove ksh /bin/ksh93
fi
%endif
%postun
-if test ! -x %{_lib}/ast/bin/ksh ; then
+if test ! -x bin/ksh ; then
if test ! -x bin/pdksh ; then
rm -f etc/ksh.kshrc
fi
%if %suse_version <= 1120
- if test ! -e bin/ksh ; then
rm -f bin/ksh %{_exec_prefix}/bin/ksh
- fi
%endif
fi
%files -f ksh.lang
%defattr(-,root,root)
%if %use_suid_exe
-%{_sysconfdir}/permissions.d/ksh
-%{_sysconfdir}/permissions.d/ksh.paranoid
+%config %attr(0644,root,root) %{_sysconfdir}/permissions.d/ksh
+%config %attr(0644,root,root) %{_sysconfdir}/permissions.d/ksh.paranoid
%endif
%doc LICENSE src/cmd/ksh93/COMPATIBILITY src/cmd/ksh93/RELEASE*
%doc Builtins PROMO OBSOLETE MEMORANDUM
-%doc %{_mandir}/man1/shcomp.1.gz
+/bin/ksh93
%ghost %verify(not link) /bin/ksh
%ghost %verify(not link) %{_bindir}/ksh
%if %suse_version > 1120
%ghost %verify(not link) %{_mandir}/man1/ksh.1.gz
+%ghost %verify(not link) %{_mandir}/man1/rksh.1.gz
%doc %{_mandir}/man1/ksh93.1.gz
-/bin/ksh93
-%{_bindir}/ksh93
%else
%doc %{_mandir}/man1/ksh.1.gz
+%doc %{_mandir}/man1/rksh.1.gz
%endif
-%{_bindir}/rksh
-%{_bindir}/shcomp
+%doc %{_mandir}/man1/shcomp.1.gz
+%if %use_opt_bins
+%doc %{_mandir}/man1/pty.1.gz
+%doc %{_mandir}/man1/what.1.gz
+%doc %{_mandir}/man1/mime.1.gz
+%doc %{_mandir}/man1/asa.1.gz
+%doc %{_mandir}/man1/dlls.1.gz
+%endif
+%{_bindir}/*
%dir /%{_lib}/ast
%dir /%{_lib}/ast/bin
-/%{_lib}/ast/ksh
-/%{_lib}/ast/bin/ksh
-/%{_lib}/ast/bin/shcomp
%if %use_suid_exe
%attr(4755,root,root) /%{_lib}/ast/bin/suid_exec
%endif
/%{_lib}/ast/*.so*
+/%{_lib}/ast/ksh
/%{_lib}/ksh
%dir %{_datadir}/ksh
%dir %{_datadir}/ksh/fun
++++++ Agreement ++++++
--- /var/tmp/diff_new_pack.VoyBbM/_old 2012-02-25 07:30:29.000000000 +0100
+++ /var/tmp/diff_new_pack.VoyBbM/_new 2012-02-25 07:30:29.000000000 +0100
@@ -7,7 +7,3 @@
http://www2.research.att.com/sw/download/beta/ast-ksh.${version}.tgz \
http://www2.research.att.com/sw/download/beta/INIT.${version}.tgz \
http://www2.research.att.com/sw/download/beta/ast-base.${version}.tgz
-
-tar xfz ast-base.${version}.tgz src/cmd/msgcc/ src/lib/libpp/
-tar cfj ast-msgcc.${version}.tar.bz2 src/
-rm -f ast-base.${version}.tgz
++++++ INIT.2012-02-02.tar.bz2 -> INIT.2012-02-14.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bin/package new/bin/package
--- old/bin/package 2012-01-24 17:07:36.000000000 +0100
+++ new/bin/package 2012-02-15 08:40:25.000000000 +0100
@@ -52,7 +52,7 @@
case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
0123) USAGE=$'
[-?
-@(#)$Id: package (AT&T Research) 2012-01-21 $
+@(#)$Id: package (AT&T Research) 2012-02-14 $
]'$USAGE_LICENSE$'
[+NAME?package - source and binary package control]
[+DESCRIPTION?The \bpackage\b command controls source and binary
@@ -156,6 +156,9 @@
\bwrite\b action error counts. A non-numeric value in
any of these fields disables the corresponding action.]
}
+ [+clean | clobber?Delete the \barch/\b\aHOSTTYPE\a hierarchy; this
+ deletes all generated files and directories for \aHOSTTYPE\a.
+ The heirarchy can be rebuilt by \bpackage make\b.]
[+contents\b [ \apackage\a ... ]]?List description and
components for \apackage\a on the standard output.]
[+copyright\b [ \apackage\a ... ]]?List the general copyright
@@ -542,7 +545,7 @@
0) set host type ;;
esac
case $1 in
- admin|contents|copyright|export|host|install|license|list|make|read|regress|release|remove|results|setup|test|update|use|verify|view|write|TEST)
+ admin|clean|clobber|contents|copyright|export|host|install|license|list|make|read|regress|release|remove|results|setup|test|update|use|verify|view|write|TEST)
action=$1
shift
break
@@ -969,6 +972,10 @@
M T W The admin action make, test and write action error
counts. A non-numeric value in any of these fields
disables the corresponding action.
+ clean | clobber
+ Delete the arch/HOSTTYPE hierarchy; this deletes all generated
+ files and directories for HOSTTYPE. The heirarchy can be rebuilt
+ by package make.]
contents [ package ... ]
List description and components for PACKAGE on the standard
output.
@@ -4890,6 +4897,12 @@
esac
;;
+clean|clobber)
+ cd $PACKAGEROOT
+ $exec rm -rf $INSTALLROOT
+ exit
+ ;;
+
contents|list)
# all work in $PACKAGESRC
@@ -5424,7 +5437,7 @@
# check $CC and { ar cc ld ldd } intercepts
- h=$HOSTTYPE
+ h="${HOSTTYPE} ${HOSTTYPE}.*"
case $HOSTTYPE in
*.*) t=`echo $HOSTTYPE | sed 's/[.][^.]*//'`
h="$h $t"
@@ -5443,52 +5456,55 @@
b=$INSTALLROOT/bin/$c
t=$INSTALLROOT/lib/package/gen/$c.tim
intercept=0
- for a in $h
- do s=$INITROOT/$c.$a
- test -x "$s" || continue
- if cmp -s "$s" "$b" >/dev/null 2>&1
- then intercept=1
- break
- fi
- case `ls -t "$t" "$b" "$s" 2>/dev/null` in
- $t*) ;;
- $b*) cc=$b
- ;;
- $s*) cd $INSTALLROOT/lib/package/gen
- tmp=pkg$$
- eval '$'exec echo "'int main(){return 0;}' > $tmp.c"
- if $exec $s -o $tmp.exe $tmp.c >/dev/null 2>&1 &&
- test -x $tmp.exe
- then case $HOSTTYPE in
- *.mips*)$s -version >/dev/null 2>&1 || s= ;;
- esac
- case $s in
- ?*) $exec sed "s/^HOSTTYPE=.*/HOSTTYPE=$HOSTTYPE/" < "$s" > "$b" || exit
- $exec chmod +x "$b" || exit
- cc=$b
- intercept=1
- note update $b
- ;;
- esac
+ for k in $h
+ do for s in $INITROOT/$c.$k
+ do test -x "$s" || continue
+ if cmp -s "$s" "$b" >/dev/null 2>&1
+ then intercept=1
+ break 2
fi
- $exec rm -f $tmp.*
- $exec touch "$t"
- cd $PACKAGEROOT
- ;;
- esac
+ case `ls -t "$t" "$b" "$s" 2>/dev/null` in
+ $t*) ;;
+ $b*) cc=$b
+ ;;
+ $s*) cd $INSTALLROOT/lib/package/gen
+ tmp=pkg$$
+ eval '$'exec echo "'int main(){return 0;}' > $tmp.c"
+ if $exec $s -o $tmp.exe $tmp.c >/dev/null 2>&1 &&
+ test -x $tmp.exe
+ then case $HOSTTYPE in
+ *.mips*)$s -version >/dev/null 2>&1 || s= ;;
+ esac
+ case $s in
+ ?*) $exec sed "s/^HOSTTYPE=.*/HOSTTYPE=$HOSTTYPE/" < "$s" > "$b" || exit
+ $exec chmod +x "$b" || exit
+ cc=$b
+ intercept=1
+ note update $b
+ ;;
+ esac
+ fi
+ $exec rm -f $tmp.*
+ $exec touch "$t"
+ cd $PACKAGEROOT
+ ;;
+ esac
+ break 2
+ done
done
case $intercept in
1) c=ld
b=$INSTALLROOT/bin/$c
- for t in $h
- do s=$INITROOT/$c.$t
- test -x "$s" || continue
- case `ls -t "$b" "$s" 2>/dev/null` in
- $b*) ;;
- $s*) $exec cp "$s" "$b"
- note update $b
- ;;
- esac
+ for k in $h
+ do for s in $INITROOT/$c.$k
+ do test -x "$s" || continue
+ case `ls -t "$b" "$s" 2>/dev/null` in
+ $b*) ;;
+ $s*) $exec cp "$s" "$b"
+ note update $b
+ ;;
+ esac
+ done
done
;;
esac
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/package/INIT.README new/lib/package/INIT.README
--- old/lib/package/INIT.README 2012-02-03 15:08:57.000000000 +0100
+++ new/lib/package/INIT.README 2012-02-15 17:56:22.000000000 +0100
@@ -93,6 +93,10 @@
:::::::: INIT ::::::::
+12-02-14 package.mk: { --clobber --compare --link=lib*.a* } for --mam=static
+12-02-14 package.mk: export LICENSEFILEDEFAULT instead of LICENSEFILE
+12-02-14 package.sh: handle @(cc|ld).${HOSTTYPE}* intercepts
+12-02-07 package.sh: add { clean clobber } actions
12-02-02 regress.sh: fix ulimit -c defaults for --nokeep
12-01-18 regress.sh: add INPUT|OUTPUT|ERROR -e 'filter' to filter before comparison
12-01-21 package.sh: fix `admin make' bug that created unused $INSTALLROOT/lib
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/package/INIT.html new/lib/package/INIT.html
--- old/lib/package/INIT.html 2012-02-03 15:08:57.000000000 +0100
+++ new/lib/package/INIT.html 2012-02-17 06:45:13.000000000 +0100
@@ -55,6 +55,10 @@
<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="INIT changes">INIT changes</A></H3></FONT></FONT></CENTER>
<PRE>
+12-02-14 package.mk: { --clobber --compare --link=lib*.a* } for --mam=static
+12-02-14 package.mk: export LICENSEFILEDEFAULT instead of LICENSEFILE
+12-02-14 package.sh: handle @(cc|ld).${HOSTTYPE}* intercepts
+12-02-07 package.sh: add { clean clobber } actions
12-02-02 regress.sh: fix ulimit -c defaults for --nokeep
12-01-18 regress.sh: add INPUT|OUTPUT|ERROR -e 'filter' to filter before comparison
12-01-21 package.sh: fix `admin make' bug that created unused $INSTALLROOT/lib
@@ -971,7 +975,7 @@
<TR>
<TD align=left></TD>
<TD align=center></TD>
-<TD align=right>February 03, 2012</TD>
+<TD align=right>February 17, 2012</TD>
</TR>
</TABLE>
<P>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/package/INIT.ver new/lib/package/INIT.ver
--- old/lib/package/INIT.ver 2012-02-03 15:08:57.000000000 +0100
+++ new/lib/package/INIT.ver 2012-02-14 07:17:59.000000000 +0100
@@ -1 +1 @@
-INIT 2012-02-02 2012-02-02 1
+INIT 2012-02-14 2012-02-14 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/package/package.mk new/lib/package/package.mk
--- old/lib/package/package.mk 2011-08-01 22:32:28.000000000 +0200
+++ new/lib/package/package.mk 2012-02-15 17:53:21.000000000 +0100
@@ -1,7 +1,7 @@
/*
* source and binary package support
*
- * @(#)package.mk (AT&T Research) 2011-05-09
+ * @(#)package.mk (AT&T Research) 2012-02-14
*
* usage:
*
@@ -247,6 +247,8 @@
package.src = $(package.src.pat:P=G) $(.package.licenses. --save $(name))
package.bin = $(PACKAGEBIN)/$(name).ini
+package.mam = --never --force --mam=static --corrupt=accept --clobber --compare --link='lib*.a*' CC=$(CC.DIALECT:N=C++:?CC?cc?) package.license.class=$(license:Q) $(=) 'dontcare test' install test
+
op = current
stamp = [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]
source = $(PACKAGEDIR)/$(name).$(version)$(release:?.$(release)??).$(suffix)
@@ -290,8 +292,8 @@
version := $(I)
end
end
- LICENSEFILE := $(.package.licenses. $(name):@/ /:/G)
- export LICENSEFILE
+ LICENSEFILEDEFAULT := $(.package.licenses. $(name):@/ /:/G)
+ export LICENSEFILEDEFAULT
end
if "$(>)"
for I $(>:V)
@@ -704,7 +706,7 @@
then cd $j
if [[ ! '$(license)' ]] || $(MAKE) --noexec --silent 'exit $$(LICENSECLASS:N=$(license):?0?1?)' .
then (( m++ ))
- $(MAKE) --never --force --mam=static --corrupt=accept CC=$(CC.DIALECT:N=C++:?CC?cc?) package.license.class=$(license:Q) $(=) 'dontcare test' install test $(export.$(style):Q) > $tmp/$m.mam
+ $(MAKE) $(package.mam) $(export.$(style):Q) > $tmp/$m.mam
echo ";;;$tmp/$m.mam;$i/$j/Mamfile"
fi
cd $(INSTALLROOT)/$i
@@ -724,7 +726,7 @@
echo ";;;$tmp/$m.mam;$i/Mamfile"
fi
else (( m++ ))
- $(MAKE) --never --force --mam=static --corrupt=accept CC=$(CC.DIALECT:N=C++:?CC?cc?) package.license.class=$(license:Q) $(=) 'dontcare test' install test $(export.$(style):Q) > $tmp/$m.mam
+ $(MAKE) $(package.mam) $(export.$(style):Q) > $tmp/$m.mam
echo ";;;$tmp/$m.mam;$i/Mamfile"
fi
fi
@@ -988,7 +990,7 @@
then cd $j
if [[ ! '$(license)' ]] || $(MAKE) --noexec --silent 'exit $$(LICENSECLASS:N=$(license):?0?1?)' .
then (( m++ ))
- $(MAKE) --never --force --mam=static --corrupt=accept CC=$(CC.DIALECT:N=C++:?CC?cc?) package.license.class=$(license:Q) $(=) 'dontcare test' install test > $tmp/$m.mam
+ $(MAKE) $(package.mam) > $tmp/$m.mam
$(CMP) $(CMPFLAGS) $tmp/$m.mam $(PACKAGEROOT)/$i/$j/Mamfile && touch -r $(PACKAGEROOT)/$i/$j/Mamfile $tmp/$m.mam
echo ";;;$tmp/$m.mam;$i/$j/Mamfile"
fi
@@ -1010,7 +1012,7 @@
echo ";;;$tmp/$m.mam;$i/Mamfile"
fi
else (( m++ ))
- $(MAKE) --never --force --mam=static --corrupt=accept CC=$(CC.DIALECT:N=C++:?CC?cc?) package.license.class=$(license:Q) $(=) 'dontcare test' install test > $tmp/$m.mam
+ $(MAKE) $(package.mam) > $tmp/$m.mam
$(CMP) $(CMPFLAGS) $tmp/$m.mam $(PACKAGEROOT)/$i/Mamfile && touch -r $(PACKAGEROOT)/$i/Mamfile $tmp/$m.mam
echo ";;;$tmp/$m.mam;$i/Mamfile"
fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/INIT/Makefile new/src/cmd/INIT/Makefile
--- old/src/cmd/INIT/Makefile 2012-01-22 07:57:48.000000000 +0100
+++ new/src/cmd/INIT/Makefile 2012-02-13 23:16:07.000000000 +0100
@@ -49,7 +49,7 @@
ldd.cygwin.i386 \
cc.darwin ldd.darwin \
cc.hp.ia64 cc.hp.pa cc.hp.pa64 ld.hp.pa ldd.hp.pa \
- cc.ibm.risc ldd.ibm.risc \
+ cc.ibm.risc cc.ibm.risc.gcc ldd.ibm.risc \
cc.linux.ia64-icc cc.linux.i386-icc cc.linux.i386-64-icc \
cc.lynxos.i386 cc.lynxos.ppc ldd.lynxos \
cc.mvs.390 cc.next.i386 cc.next.m68k ldd.mvs.390 \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/INIT/Mamfile new/src/cmd/INIT/Mamfile
--- old/src/cmd/INIT/Mamfile 2012-02-03 21:13:06.000000000 +0100
+++ new/src/cmd/INIT/Mamfile 2012-02-17 07:18:13.000000000 +0100
@@ -1,4 +1,4 @@
-info mam static 00000 1994-07-17 make (AT&T Research) 5.7 2012-01-21
+info mam static 00000 1994-07-17 make (AT&T Research) 5.7 2012-02-07
setv INSTALLROOT ../../..
setv PACKAGEROOT ../../../../..
setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS}
@@ -1326,7 +1326,7 @@
exec - if [[ "1" || "mamake.rt" -nt "mamake.tst" ]]
exec - then mktest --style=regress mamake.rt > mamake.tst
exec - fi
-done mamake.tst generated
+done mamake.tst virtual
exec - regress mamake.tst mamake
done test.mamake virtual
done test dontcare virtual
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/INIT/RELEASE new/src/cmd/INIT/RELEASE
--- old/src/cmd/INIT/RELEASE 2012-02-03 05:55:54.000000000 +0100
+++ new/src/cmd/INIT/RELEASE 2012-02-15 17:55:39.000000000 +0100
@@ -1,3 +1,7 @@
+12-02-14 package.mk: { --clobber --compare --link=lib*.a* } for --mam=static
+12-02-14 package.mk: export LICENSEFILEDEFAULT instead of LICENSEFILE
+12-02-14 package.sh: handle @(cc|ld).${HOSTTYPE}* intercepts
+12-02-07 package.sh: add { clean clobber } actions
12-02-02 regress.sh: fix ulimit -c defaults for --nokeep
12-01-18 regress.sh: add INPUT|OUTPUT|ERROR -e 'filter' to filter before comparison
12-01-21 package.sh: fix `admin make' bug that created unused $INSTALLROOT/lib
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/INIT/cc.ibm.risc.gcc new/src/cmd/INIT/cc.ibm.risc.gcc
--- old/src/cmd/INIT/cc.ibm.risc.gcc 1970-01-01 01:00:00.000000000 +0100
+++ new/src/cmd/INIT/cc.ibm.risc.gcc 2012-02-13 23:15:02.000000000 +0100
@@ -0,0 +1,35 @@
+: cc wrapper for aix risc gcc : 2012-02-14 :
+
+hosttype=ibm.risc
+
+case $HOSTTYPE in
+$hosttype-64)
+ case " $* " in
+ *" -maix64 "*) ;;
+ *) set -- -maix64 "$@" ;;
+ esac
+ ;;
+*) case " $* " in
+ *" -maix64 "*) HOSTTYPE=$hosttype-64 ;;
+ *) HOSTTYPE=$hosttype ;;
+ esac
+ ;;
+esac
+
+case " $* " in
+*" -dumpmachine "*)
+ echo $HOSTTYPE
+ exit
+ ;;
+esac
+
+cc=gcc
+
+case " $@ " in
+*" -shared "*)
+ ccflags="$ccflags -shared -Wl,-G -Wl,-berok"
+ ;;
+*) ccflags="-Wl,-brtl"
+ ;;
+esac
+$cc $ccflags "$@"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/INIT/iffe.sh new/src/cmd/INIT/iffe.sh
--- old/src/cmd/INIT/iffe.sh 2012-01-12 08:35:13.000000000 +0100
+++ new/src/cmd/INIT/iffe.sh 2012-02-13 23:45:37.000000000 +0100
@@ -30,7 +30,7 @@
esac
command=iffe
-version=2011-12-13 # update in USAGE too #
+version=2012-02-14 # update in USAGE too #
compile() # $cc ...
{
@@ -94,8 +94,17 @@
pkg() # package
{
case $1 in
- '<') shift ;;
- *) return ;;
+ '') pth=`getconf PATH 2>/dev/null`
+ case $pth in
+ '') pth="/bin /usr/bin" ;;
+ *:*) pth=`echo "$pth" | sed 's/:/ /g'` ;;
+ esac
+ return
+ ;;
+ '<') shift
+ ;;
+ *) return
+ ;;
esac
case $1 in
X|X11*) i="openwin"
@@ -659,7 +668,7 @@
case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
0123) USAGE=$'
[-?
-@(#)$Id: iffe (AT&T Research) 2011-12-13 $
+@(#)$Id: iffe (AT&T Research) 2012-02-14 $
]
'$USAGE_LICENSE$'
[+NAME?iffe - C compilation environment feature probe]
@@ -921,8 +930,9 @@
\adir\a directories. \b{\b ... \b}\b forms a directory list
from the cross-product of \b-\b separated directory groups
\ag1\a ... \agn\a. < ... > forms a directory list for the
- package \apkg\a with optional versions. The \b--config\b macro
- name is \aNAME\a\b_PATH\b.]
+ package \apkg\a with optional versions. If no operands are
+ specified then the default PATH directories are used. The
+ \b--config\b macro name is \aNAME\a\b_PATH\b.]
[+run \afile\a?Runs the tests in \afile\a based on the \afile\a
suffix:]{
[+.c?\afile\a is compiled and executed and the output is copied
@@ -1003,8 +1013,8 @@
\b{\b ... \b}\b. Deprecated: use { \bif\b \belif\b \belse\b
\bendif\b } with unnamed \b{\b ... \b}\b blocks.]
}
-[+SEE ALSO?\bautoconf\b(1), \bconfig\b(1), \bcrossexec\b(1), \bnmake\b(1),
- \bpackage\b(1), \bproto\b(1), \bsh\b(1)]
+[+SEE ALSO?\bautoconf\b(1), \bconfig\b(1), \bgetconf\b(1), \bcrossexec\b(1),
+ \bnmake\b(1), \bpackage\b(1), \bproto\b(1), \bsh\b(1)]
'
while getopts -a "$command" "$USAGE" OPT
do case $OPT in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/INIT/mamake.tst new/src/cmd/INIT/mamake.tst
--- old/src/cmd/INIT/mamake.tst 2011-06-16 15:43:42.000000000 +0200
+++ new/src/cmd/INIT/mamake.tst 1970-01-01 01:00:00.000000000 +0100
@@ -1,63 +0,0 @@
-# : : generated from /home/gsf/src/cmd/INIT/mamake.rt by mktest : : #
-
-# regression tests for the mamake command
-
-UNIT mamake
-
-TEST 01 macros
-
- EXEC -n
- INPUT -n -
- INPUT Mamfile $'info mam static 00000 1994-07-17 make (AT&T Research) 5.3 2009-05-05
-setv DEFINED defined
-setv EMPTY
-make all
-
-exec - echo DEFINED ${DEFINED}
-exec - echo DEFINED:VALUE ${DEFINED:VALUE}
-exec - echo DEFINED:-VALUE ${DEFINED:-VALUE}
-exec - echo DEFINED=VALUE ${DEFINED=VALUE}
-exec - echo DEFINED[VALUE] ${DEFINED[VALUE]}
-exec - echo DEFINED.COMPONENT ${DEFINED.COMPONENT}
-exec - echo DEFINED.COMPONENT[VALUE] ${DEFINED.COMPONENT[VALUE]}
-
-exec - echo EMPTY ${EMPTY}
-exec - echo EMPTY:VALUE ${EMPTY:VALUE}
-exec - echo EMPTY:-VALUE ${EMPTY:-VALUE}
-exec - echo EMPTY=VALUE ${EMPTY=VALUE}
-exec - echo EMPTY[VALUE] ${EMPTY[VALUE]}
-exec - echo EMPTY.COMPONENT ${EMPTY.COMPONENT}
-exec - echo EMPTY.COMPONENT[VALUE] ${EMPTY.COMPONENT[VALUE]}
-
-exec - echo __NoT_DeFiNeD__ ${__NoT_DeFiNeD__}
-exec - echo __NoT_DeFiNeD__:VALUE ${__NoT_DeFiNeD__:VALUE}
-exec - echo __NoT_DeFiNeD__:-VALUE ${__NoT_DeFiNeD__:-VALUE}
-exec - echo __NoT_DeFiNeD__=VALUE ${__NoT_DeFiNeD__=VALUE}
-exec - echo __NoT_DeFiNeD__[VALUE] ${__NoT_DeFiNeD__[VALUE]}
-exec - echo __NoT_DeFiNeD__.COMPONENT ${__NoT_DeFiNeD__.COMPONENT}
-exec - echo __NoT_DeFiNeD__.COMPONENT[VALUE] ${__NoT_DeFiNeD__.COMPONENT[VAL'\
-$'UE]}
-
-done all generated virtual'
- OUTPUT - $'echo DEFINED defined
-echo DEFINED:VALUE
-echo DEFINED:-VALUE
-echo DEFINED=VALUE defined
-echo DEFINED[VALUE] ${DEFINED[VALUE]}
-echo DEFINED.COMPONENT
-echo DEFINED.COMPONENT[VALUE] ${DEFINED.COMPONENT[VALUE]}
-echo EMPTY
-echo EMPTY:VALUE ${EMPTY:VALUE}
-echo EMPTY:-VALUE ${EMPTY:-VALUE}
-echo EMPTY=VALUE
-echo EMPTY[VALUE] ${EMPTY[VALUE]}
-echo EMPTY.COMPONENT
-echo EMPTY.COMPONENT[VALUE] ${EMPTY.COMPONENT[VALUE]}
-echo __NoT_DeFiNeD__ ${__NoT_DeFiNeD__}
-echo __NoT_DeFiNeD__:VALUE ${__NoT_DeFiNeD__:VALUE}
-echo __NoT_DeFiNeD__:-VALUE ${__NoT_DeFiNeD__:-VALUE}
-echo __NoT_DeFiNeD__=VALUE ${__NoT_DeFiNeD__=VALUE}
-echo __NoT_DeFiNeD__[VALUE] ${__NoT_DeFiNeD__[VALUE]}
-echo __NoT_DeFiNeD__.COMPONENT
-echo __NoT_DeFiNeD__.COMPONENT[VALUE] ${__NoT_DeFiNeD__.COMPONENT[VALUE]}'
- ERROR -n -
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/INIT/package.mk new/src/cmd/INIT/package.mk
--- old/src/cmd/INIT/package.mk 2011-05-12 22:18:20.000000000 +0200
+++ new/src/cmd/INIT/package.mk 2012-02-15 17:55:19.000000000 +0100
@@ -1,7 +1,7 @@
/*
* source and binary package support
*
- * @(#)package.mk (AT&T Research) 2011-05-09
+ * @(#)package.mk (AT&T Research) 2012-02-14
*
* usage:
*
@@ -247,6 +247,8 @@
package.src = $(package.src.pat:P=G) $(.package.licenses. --save $(name))
package.bin = $(PACKAGEBIN)/$(name).ini
+package.mam = --never --force --mam=static --corrupt=accept --clobber --compare --link='lib*.a*' CC=$(CC.DIALECT:N=C++:?CC?cc?) package.license.class=$(license:Q) $(=) 'dontcare test' install test
+
op = current
stamp = [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]
source = $(PACKAGEDIR)/$(name).$(version)$(release:?.$(release)??).$(suffix)
@@ -290,8 +292,8 @@
version := $(I)
end
end
- LICENSEFILE := $(.package.licenses. $(name):@/ /:/G)
- export LICENSEFILE
+ LICENSEFILEDEFAULT := $(.package.licenses. $(name):@/ /:/G)
+ export LICENSEFILEDEFAULT
end
if "$(>)"
for I $(>:V)
@@ -704,7 +706,7 @@
then cd $j
if [[ ! '$(license)' ]] || $(MAKE) --noexec --silent 'exit $$(LICENSECLASS:N=$(license):?0?1?)' .
then (( m++ ))
- $(MAKE) --never --force --mam=static --corrupt=accept CC=$(CC.DIALECT:N=C++:?CC?cc?) package.license.class=$(license:Q) $(=) 'dontcare test' install test $(export.$(style):Q) > $tmp/$m.mam
+ $(MAKE) $(package.mam) $(export.$(style):Q) > $tmp/$m.mam
echo ";;;$tmp/$m.mam;$i/$j/Mamfile"
fi
cd $(INSTALLROOT)/$i
@@ -724,7 +726,7 @@
echo ";;;$tmp/$m.mam;$i/Mamfile"
fi
else (( m++ ))
- $(MAKE) --never --force --mam=static --corrupt=accept CC=$(CC.DIALECT:N=C++:?CC?cc?) package.license.class=$(license:Q) $(=) 'dontcare test' install test $(export.$(style):Q) > $tmp/$m.mam
+ $(MAKE) $(package.mam) $(export.$(style):Q) > $tmp/$m.mam
echo ";;;$tmp/$m.mam;$i/Mamfile"
fi
fi
@@ -988,7 +990,7 @@
then cd $j
if [[ ! '$(license)' ]] || $(MAKE) --noexec --silent 'exit $$(LICENSECLASS:N=$(license):?0?1?)' .
then (( m++ ))
- $(MAKE) --never --force --mam=static --corrupt=accept CC=$(CC.DIALECT:N=C++:?CC?cc?) package.license.class=$(license:Q) $(=) 'dontcare test' install test > $tmp/$m.mam
+ $(MAKE) $(package.mam) > $tmp/$m.mam
$(CMP) $(CMPFLAGS) $tmp/$m.mam $(PACKAGEROOT)/$i/$j/Mamfile && touch -r $(PACKAGEROOT)/$i/$j/Mamfile $tmp/$m.mam
echo ";;;$tmp/$m.mam;$i/$j/Mamfile"
fi
@@ -1010,7 +1012,7 @@
echo ";;;$tmp/$m.mam;$i/Mamfile"
fi
else (( m++ ))
- $(MAKE) --never --force --mam=static --corrupt=accept CC=$(CC.DIALECT:N=C++:?CC?cc?) package.license.class=$(license:Q) $(=) 'dontcare test' install test > $tmp/$m.mam
+ $(MAKE) $(package.mam) > $tmp/$m.mam
$(CMP) $(CMPFLAGS) $tmp/$m.mam $(PACKAGEROOT)/$i/Mamfile && touch -r $(PACKAGEROOT)/$i/Mamfile $tmp/$m.mam
echo ";;;$tmp/$m.mam;$i/Mamfile"
fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/INIT/package.sh new/src/cmd/INIT/package.sh
--- old/src/cmd/INIT/package.sh 2012-01-24 17:06:14.000000000 +0100
+++ new/src/cmd/INIT/package.sh 2012-02-15 08:40:21.000000000 +0100
@@ -70,7 +70,7 @@
case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
0123) USAGE=$'
[-?
-@(#)$Id: package (AT&T Research) 2012-01-21 $
+@(#)$Id: package (AT&T Research) 2012-02-14 $
]'$USAGE_LICENSE$'
[+NAME?package - source and binary package control]
[+DESCRIPTION?The \bpackage\b command controls source and binary
@@ -174,6 +174,9 @@
\bwrite\b action error counts. A non-numeric value in
any of these fields disables the corresponding action.]
}
+ [+clean | clobber?Delete the \barch/\b\aHOSTTYPE\a hierarchy; this
+ deletes all generated files and directories for \aHOSTTYPE\a.
+ The heirarchy can be rebuilt by \bpackage make\b.]
[+contents\b [ \apackage\a ... ]]?List description and
components for \apackage\a on the standard output.]
[+copyright\b [ \apackage\a ... ]]?List the general copyright
@@ -560,7 +563,7 @@
0) set host type ;;
esac
case $1 in
- admin|contents|copyright|export|host|install|license|list|make|read|regress|release|remove|results|setup|test|update|use|verify|view|write|TEST)
+ admin|clean|clobber|contents|copyright|export|host|install|license|list|make|read|regress|release|remove|results|setup|test|update|use|verify|view|write|TEST)
action=$1
shift
break
@@ -987,6 +990,10 @@
M T W The admin action make, test and write action error
counts. A non-numeric value in any of these fields
disables the corresponding action.
+ clean | clobber
+ Delete the arch/HOSTTYPE hierarchy; this deletes all generated
+ files and directories for HOSTTYPE. The heirarchy can be rebuilt
+ by package make.]
contents [ package ... ]
List description and components for PACKAGE on the standard
output.
@@ -4908,6 +4915,12 @@
esac
;;
+clean|clobber)
+ cd $PACKAGEROOT
+ $exec rm -rf $INSTALLROOT
+ exit
+ ;;
+
contents|list)
# all work in $PACKAGESRC
@@ -5442,7 +5455,7 @@
# check $CC and { ar cc ld ldd } intercepts
- h=$HOSTTYPE
+ h="${HOSTTYPE} ${HOSTTYPE}.*"
case $HOSTTYPE in
*.*) t=`echo $HOSTTYPE | sed 's/[.][^.]*//'`
h="$h $t"
@@ -5461,52 +5474,55 @@
b=$INSTALLROOT/bin/$c
t=$INSTALLROOT/lib/package/gen/$c.tim
intercept=0
- for a in $h
- do s=$INITROOT/$c.$a
- test -x "$s" || continue
- if cmp -s "$s" "$b" >/dev/null 2>&1
- then intercept=1
- break
- fi
- case `ls -t "$t" "$b" "$s" 2>/dev/null` in
- $t*) ;;
- $b*) cc=$b
- ;;
- $s*) cd $INSTALLROOT/lib/package/gen
- tmp=pkg$$
- eval '$'exec echo "'int main(){return 0;}' > $tmp.c"
- if $exec $s -o $tmp.exe $tmp.c >/dev/null 2>&1 &&
- test -x $tmp.exe
- then case $HOSTTYPE in
- *.mips*)$s -version >/dev/null 2>&1 || s= ;;
- esac
- case $s in
- ?*) $exec sed "s/^HOSTTYPE=.*/HOSTTYPE=$HOSTTYPE/" < "$s" > "$b" || exit
- $exec chmod +x "$b" || exit
- cc=$b
- intercept=1
- note update $b
- ;;
- esac
+ for k in $h
+ do for s in $INITROOT/$c.$k
+ do test -x "$s" || continue
+ if cmp -s "$s" "$b" >/dev/null 2>&1
+ then intercept=1
+ break 2
fi
- $exec rm -f $tmp.*
- $exec touch "$t"
- cd $PACKAGEROOT
- ;;
- esac
+ case `ls -t "$t" "$b" "$s" 2>/dev/null` in
+ $t*) ;;
+ $b*) cc=$b
+ ;;
+ $s*) cd $INSTALLROOT/lib/package/gen
+ tmp=pkg$$
+ eval '$'exec echo "'int main(){return 0;}' > $tmp.c"
+ if $exec $s -o $tmp.exe $tmp.c >/dev/null 2>&1 &&
+ test -x $tmp.exe
+ then case $HOSTTYPE in
+ *.mips*)$s -version >/dev/null 2>&1 || s= ;;
+ esac
+ case $s in
+ ?*) $exec sed "s/^HOSTTYPE=.*/HOSTTYPE=$HOSTTYPE/" < "$s" > "$b" || exit
+ $exec chmod +x "$b" || exit
+ cc=$b
+ intercept=1
+ note update $b
+ ;;
+ esac
+ fi
+ $exec rm -f $tmp.*
+ $exec touch "$t"
+ cd $PACKAGEROOT
+ ;;
+ esac
+ break 2
+ done
done
case $intercept in
1) c=ld
b=$INSTALLROOT/bin/$c
- for t in $h
- do s=$INITROOT/$c.$t
- test -x "$s" || continue
- case `ls -t "$b" "$s" 2>/dev/null` in
- $b*) ;;
- $s*) $exec cp "$s" "$b"
- note update $b
- ;;
- esac
+ for k in $h
+ do for s in $INITROOT/$c.$k
+ do test -x "$s" || continue
+ case `ls -t "$b" "$s" 2>/dev/null` in
+ $b*) ;;
+ $s*) $exec cp "$s" "$b"
+ note update $b
+ ;;
+ esac
+ done
done
;;
esac
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/INIT/proto.c new/src/cmd/INIT/proto.c
--- old/src/cmd/INIT/proto.c 2012-02-03 15:47:16.000000000 +0100
+++ new/src/cmd/INIT/proto.c 2012-02-17 06:37:36.000000000 +0100
@@ -198,7 +198,7 @@
#line 1 "../../lib/libpp/ppproto.c"
#line 13
-static const char id[] = "\n@(#)$Id: proto (AT&T Research) 2011-08-30 $\000\n";
+static const char id[] = "\n@(#)$Id: proto (AT&T Research) 2012-04-14 $\000\n";
#line 1 "../../lib/libpp/ppfsm.c"
@@ -1286,7 +1286,15 @@
#line 20 "../../lib/libpp/ppproto.c"
#line 41
-struct proto
+typedef struct Key_s
+{
+ const char* name;
+ size_t size;
+ int hit;
+ int val;
+} Key_t;
+
+typedef struct Proto_s
{
int brace;
int call;
@@ -1317,10 +1325,32 @@
+} Proto_t;
+
+
+#line 171
+static const Key_t pragmas[] =
+{
+ { "prototyped",sizeof( "prototyped")-1, 0x01, 1},
+ { "noprototyped",sizeof( "noprototyped")-1, 0x01, 0},
+ { "noticed",sizeof( "noticed")-1, 0x02, 1},
+ { "nonoticed",sizeof( "nonoticed")-1, 0x02, 0},
};
-
-#line 163
+static const Key_t notices[] =
+{
+ { "Copyright",sizeof( "Copyright")-1, 0x02, 1},
+ { "COPYRIGHT",sizeof( "COPYRIGHT")-1, 0x02, 1},
+ { "copyright",sizeof( "copyright")-1, 0x02, 1},
+ { "Public Domain",sizeof( "Public Domain")-1, 0x02, 0},
+ { "PUBLIC DOMAIN",sizeof( "PUBLIC DOMAIN")-1, 0x02, 0},
+};
+
+
+
+
+
+
static char*
number __PARAM__((register char* p, register long n), (p, n)) __OTORP__(register char* p; register long n;){
register long d;
@@ -1336,7 +1366,7 @@
static int errors;
-#line 194
+#line 224
@@ -1354,7 +1384,7 @@
static int
-sstrncmp __PARAM__((register const char* s, register char* t, register int n), (s, t, n)) __OTORP__(register const char* s; register char* t; register int n;){
+sstrncmp __PARAM__((register const char* s, register const char* t, register int n), (s, t, n)) __OTORP__(register const char* s; register const char* t; register int n;){
register const char* e = s + n;
while (s < e)
@@ -1387,7 +1417,7 @@
p = strcopy(buf, "proto: ");
if (iob)
{
- register struct proto* proto = (struct proto*)(iob - sizeof(struct proto));
+ register Proto_t* proto = (Proto_t*)(iob - sizeof(Proto_t));
if (proto->line)
{
@@ -2616,11 +2646,11 @@
comment(¬ice, &buf, ((char*)0), -1, 0);
return (*(( &buf)->nxt>=( &buf)->end?(( &buf)->nxt=( &buf)->end-1):( &buf)->nxt)=0,( &buf)->nxt-( &buf)->buf);
}
-#line 306 "../../lib/libpp/ppproto.c"
+#line 336 "../../lib/libpp/ppproto.c"
-#line 318
+#line 348
static char*
-linesync __PARAM__((register struct proto* proto, register char* p, register long n), (proto, p, n)) __OTORP__(register struct proto* proto; register char* p; register long n;){
+linesync __PARAM__((register Proto_t* proto, register char* p, register long n), (proto, p, n)) __OTORP__(register Proto_t* proto; register char* p; register long n;){
if (proto->flags & (1L<<13))
@@ -2642,7 +2672,7 @@
static char*
-init __PARAM__((struct proto* proto, char* op, int flags), (proto, op, flags)) __OTORP__(struct proto* proto; char* op; int flags;){
+init __PARAM__((Proto_t* proto, char* op, int flags), (proto, op, flags)) __OTORP__(Proto_t* proto; char* op; int flags;){
register char* s;
if (flags & (1L<<10))
@@ -2759,7 +2789,7 @@
}
-#line 392
+#line 422
static char*
nns __PARAM__((register char* s), (s)) __OTORP__(register char* s;){
while (*s == ' ' || *s == '\t' || *s == '\n')
@@ -2768,7 +2798,7 @@
}
-#line 409
+#line 439
static int
directive __PARAM__((register char* s, int dir), (s, dir)) __OTORP__(register char* s; int dir;){
switch (*(s = nns(s)))
@@ -2800,7 +2830,7 @@
static int
-lex __PARAM__((register struct proto* proto, register long flags), (proto, flags)) __OTORP__(register struct proto* proto; register long flags;){
+lex __PARAM__((register Proto_t* proto, register long flags), (proto, flags)) __OTORP__(register Proto_t* proto; register long flags;){
register char* ip;
register char* op;
register int c;
@@ -3586,7 +3616,7 @@
*v++ = ' ';
v = memcopy(v, im, ie - im);
*v = 0;
- proto_error((char*)proto + sizeof(struct proto), 2, op, ((char*)0));
+ proto_error((char*)proto + sizeof(Proto_t), 2, op, ((char*)0));
}
ip--;
@@ -3737,7 +3767,7 @@
else if (*ie == ')')
{
if (op > om && *(op - 1) == '(')
- proto_error((char*)proto + sizeof(struct proto), 1, "function pointer argument prototype omitted", ((char*)0));
+ proto_error((char*)proto + sizeof(Proto_t), 1, "function pointer argument prototype omitted", ((char*)0));
(*op++=( *ie++));
while (*ie == ' ' || *ie == '\t' || *ie == '\n') ie++;
}
@@ -4322,27 +4352,40 @@
else if (flags & ((1L<<10)|(1L<<11)))
{
- if ((flags & (1L<<29)) && c == '%' && *ip == '{') t = 0;
+ if ((flags & (1L<<29)) && c == '%' && *ip == '{')
+ t = 0;
else
{
- if (c == '#') for (t = ip; *t == ' ' || *t == '\t'; t++);
- else t = "";
- if (*t++ == 'i' && *t++ == 'f' && *t++ == 'n' && *t++ == 'd' && *t++ == 'e' && *t++ == 'f')
+ if (c == '#')
{
+ for (t = ip; *t == ' ' || *t == '\t'; t++);
+ if (*t++ == 'i' && *t++ == 'f' && *t++ == 'n' && *t++ == 'd' && *t++ == 'e' && *t++ == 'f')
+ {
- t = 0;
+ t = 0;
+ }
}
+ else
+ t = "";
}
if (t)
{
- ip = bp;
- op = proto->op;
+
+ n = ip - proto->tp;
+ ip -= n;
+ op -= n;
+
+
+
+
}
- else while (*ip != '\n') *op++ = *ip++;
+ else
+ while (*ip != '\n')
+ *op++ = *ip++;
op = init(proto, op, flags);
op = linesync(proto, op, proto->line);
flags &= ~((1L<<10)|(1L<<11));
@@ -4359,21 +4402,26 @@
void
pppclose __PARAM__((char* iob), (iob)) __OTORP__(char* iob;){
- register struct proto* proto = (struct proto*)(iob - sizeof(struct proto));
+ register Proto_t* proto = (Proto_t*)(iob - sizeof(Proto_t));
if (proto->flags & (1L<<16)) close(proto->fd);
free((char*)proto);
}
-#line 2012
+#line 2055
char*
pppopen __PARAM__((char* file, int fd, char* notice, char* options, char* package, char* comment, int flags), (file, fd, notice, options, package, comment, flags)) __OTORP__(char* file; int fd; char* notice; char* options; char* package; char* comment; int flags;){
- register struct proto* proto;
+ register Proto_t* proto;
register char* iob;
register long n;
register char* s;
+ char* t;
int pragma;
+ int clr;
+ int hit;
+ int i;
+ int z;
char* b;
int comlen;
@@ -4421,7 +4469,7 @@
n = (16*1024);
- if (!(proto = (( 0)?( struct proto*)realloc((char*)( 0),sizeof( struct proto)*( 1)+( 5 * n + 2)):( struct proto*)calloc(1,sizeof( struct proto)*( 1)+( 5 * n + 2)))))
+ if (!(proto = (( 0)?( Proto_t*)realloc((char*)( 0),sizeof( Proto_t)*( 1)+( 5 * n + 2)):( Proto_t*)calloc(1,sizeof( Proto_t)*( 1)+( 5 * n + 2)))))
return 0;
proto->iz = n;
proto->oz = 3 * n;
@@ -4429,7 +4477,7 @@
}
proto->fd = fd;
proto->package = package;
- iob = (char*)proto + sizeof(struct proto);
+ iob = (char*)proto + sizeof(Proto_t);
proto->op = proto->ob = iob;
proto->ip = proto->ib = iob + proto->oz + n;
if (m) proto->options |= (1L<<0);
@@ -4460,47 +4508,57 @@
*(proto->ip + n) = 0;
-#line 2117
+#line 2165
if (!notice && !options || (comlen = astlicense(com, sizeof(com), ((char*)0), "type=check", proto->cc[0], proto->cc[1], proto->cc[2])) <= 0)
*com = 0;
+ hit = (notice || options) ? 0 : 0x02;
pragma = -1;
s = proto->ip;
m = 80;
- while (m-- > 0 && *s)
+ while (m-- > 0 && *s && hit != (0x01|0x02))
{
- while (*s == ' ' || *s == '\t') s++;
+ while (*s == ' ' || *s == '\t')
+ s++;
if (*s == '#')
{
b = s++;
- while (*s == ' ' || *s == '\t') s++;
- if (!sstrncmp( s, "pragma", sizeof("pragma") - 1) && (*(s += sizeof("pragma") - 1) == ' ' || *s == '\t'))
+ while (*s == ' ' || *s == '\t')
+ s++;
+ if (*s == *"pragma"&& !sstrncmp( s, "pragma", sizeof("pragma") - 1) && (*(s += sizeof("pragma") - 1) == ' ' || *s == '\t'))
{
- while (*s == ' ' || *s == '\t') s++;
- if (*s == 'n' && *(s + 1) == 'o')
+ clr = 0;
+ while (*s && *s != '\r' && *s != '\n')
{
- s += 2;
- pragma = -2;
- }
- if (!sstrncmp( s, "prototyped", sizeof("prototyped") - 1) && (*(s += sizeof("prototyped") - 1) == ' ' || *s == '\t' || *s == '\n' || *s == '\r'))
- while (*s)
- {
- if ((*(s - 1) == ' ' || *(s - 1) == '\t') && *s == *"noticed"&& !sstrncmp( s, "noticed", sizeof("noticed") - 1))
- notice = options = 0;
- if (*s++ == '\n')
+ for (; *s == ' ' || *s == '\t'; s++);
+ for (t = s; *s && *s != ' ' && *s != '\t' && *s != '\r' && *s != '\n'; s++);
+ z = s - t;
+ for (i = 0; i < (sizeof( pragmas)/sizeof( pragmas[0])); i++)
+ if (pragmas[i].size == z && !sstrncmp( t, pragmas[i].name, z))
{
- pragma += 2;
+ clr = 1;
+ hit |= pragmas[i].hit;
+ switch (pragmas[i].hit)
+ {
+ case 0x02:
+ notice = options = 0;
+ break;
+ case 0x01:
+ pragma = pragmas[i].val;
+ break;
+ }
+ }
+ }
+ if (clr)
+ {
- if (!(flags & (1<<1)) || (flags & (1<<8)))
+ if (!(flags & (1<<1)) || (flags & (1<<8)))
- for (s--; b < s; *b++ = ' ');
- goto magic;
- }
- }
- pragma = -1;
+ for (; b < s; *b++ = ' ');
+ }
}
}
- else if (*s == '/' && !sstrncmp( s, "/* : : generated by proto : : */\n", sizeof("/* : : generated by proto : : */\n") - 1))
+ else if (*s == *"/* : : generated by proto : : */\n"&& !sstrncmp( s, "/* : : generated by proto : : */\n", sizeof("/* : : generated by proto : : */\n") - 1))
{
pragma = 0;
break;
@@ -4508,40 +4566,40 @@
else if (*s == '%' && *(s + 1) == '{')
proto->flags |= (1L<<29);
- if (notice || options)
+ else if (!(hit & 0x02))
{
if (*s == *com && !sstrncmp( s, com, comlen))
+ {
+ hit |= 0x02;
notice = options = 0;
+ }
else
- while (*s)
- {
- if (*s == *"Copyright"&& !sstrncmp( s, "Copyright", sizeof("Copyright") - 1))
- {
- s += sizeof("Copyright") - 1;
- while (*s == ' ' || *s == '\t')
- s++;
- if (*s == '(' && (*(s + 1) == 'c' || *(s + 1) == 'C') && *(s + 2) == ')' || *s >= '0' && *s <= '9' && *(s + 1) >= '0' && *(s + 1) <= '9')
+ for (; *s && *s != '\n' && !(hit & 0x02); s++)
+ for (i = 0; i < (sizeof( notices)/sizeof( notices[0])); i++)
+ if (*s == notices[i].name[0] && !sstrncmp( s, notices[i].name, notices[i].size))
{
- notice = options = 0;
+ s += notices[i].size;
+ if (notices[i].val)
+ {
+ while (*s == ' ' || *s == '\t')
+ s++;
+ if (*s == '(' && (*(s + 1) == 'c' || *(s + 1) == 'C') && *(s + 2) == ')' || *s >= '0' && *s <= '9' && *(s + 1) >= '0' && *(s + 1) <= '9')
+ {
+ hit |= notices[i].hit;
+ notice = options = 0;
+ }
+ }
+ else
+ {
+ hit |= notices[i].hit;
+ notice = options = 0;
+ }
break;
}
- }
- if (*s == *"Public Domain"&& !sstrncmp( s, "Public Domain", sizeof("Public Domain") - 1))
- {
- notice = options = 0;
- break;
- }
- else if (*s++ == '\n')
- {
- s--;
- break;
- }
- }
}
while (*s && *s++ != '\n');
}
- magic:
if (flags & (1<<10)) proto->flags |= (1L<<20);
if (flags & (1<<12)) proto->test = 1;
if (flags & (1<<2)) proto->options |= (1L<<6);
@@ -4585,7 +4643,7 @@
if (proto->cc[0])
{
if ((comlen = astlicense(proto->op, proto->oz, notice, options, proto->cc[0], proto->cc[1], proto->cc[2])) < 0)
- proto_error((char*)proto + sizeof(struct proto), 1, proto->op, ((char*)0));
+ proto_error((char*)proto + sizeof(Proto_t), 1, proto->op, ((char*)0));
else
proto->op += comlen;
}
@@ -4613,7 +4671,7 @@
if (notice || options)
{
if ((comlen = astlicense(proto->op, proto->oz, notice, options, proto->cc[0], proto->cc[1], proto->cc[2])) < 0)
- proto_error((char*)proto + sizeof(struct proto), 1, proto->op, ((char*)0));
+ proto_error((char*)proto + sizeof(Proto_t), 1, proto->op, ((char*)0));
else
proto->op += comlen;
}
@@ -4633,7 +4691,7 @@
*proto->op++ = '#';
proto->op = strcopy(proto->op, "pragma");
*proto->op++ = ' ';
- proto->op = strcopy(proto->op, "prototyped");
+ proto->op = strcopy(proto->op, pragmas[0].name);
*proto->op++ = '\n';
}
else
@@ -4681,7 +4739,7 @@
int
pppread __PARAM__((char* iob), (iob)) __OTORP__(char* iob;){
- register struct proto* proto = (struct proto*)(iob - sizeof(struct proto));
+ register Proto_t* proto = (Proto_t*)(iob - sizeof(Proto_t));
register int n;
if (proto->flags & (1L<<18))
++++++ ast-ksh.2012-02-02.tar.bz2 -> ast-base.2012-02-14.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/ksh/ast-ksh.2012-02-02.tar.bz2 /work/SRC/openSUSE:Factory/.ksh.new/ast-base.2012-02-14.tar.bz2 differ: char 11, line 1
++++++ ast-ksh.2012-02-02.tar.bz2 -> ast-ksh.2012-02-14.tar.bz2 ++++++
++++ 4476 lines of diff (skipped)
++++++ ifs-crash.sh ++++++
--- /var/tmp/diff_new_pack.VoyBbM/_old 2012-02-25 07:30:30.000000000 +0100
+++ /var/tmp/diff_new_pack.VoyBbM/_new 2012-02-25 07:30:30.000000000 +0100
@@ -1,6 +1,23 @@
#!/bin/ksh
-trap 'echo "[${0##*/}: crash]"' SIGSEGV SIGABRT SIGBUS SIGFPE
+typeset -lui count=${1:-4}
+
+function g
+{
+ IFS=
+}
+
+function f
+{
+ typeset IFS
+ (g)
+ : $V
+}
+
+while ((count-- > 0))
+do
+ f
+done
function crash
{
++++++ ksh93-aso.dif ++++++
--- /var/tmp/diff_new_pack.VoyBbM/_old 2012-02-25 07:30:30.000000000 +0100
+++ /var/tmp/diff_new_pack.VoyBbM/_new 2012-02-25 07:30:30.000000000 +0100
@@ -1,5 +1,5 @@
--- src/lib/libast/features/aso
-+++ src/lib/libast/features/aso 2012-02-06 11:25:03.897933168 +0100
++++ src/lib/libast/features/aso 2012-02-20 12:09:41.065934089 +0100
@@ -5,7 +5,10 @@ if aso note{ gcc 4.1+ 64 bit memory atom
int main()
{
@@ -12,115 +12,14 @@
}
}end && {
#define _aso_cas8(p,o,n) __sync_val_compare_and_swap(p,o,n)
-@@ -27,10 +30,13 @@ if aso note{ gcc 4.1+ 64 bit memory atom
- #endif
- }
- elif aso note{ gcc 4.1+ 32 bit memory atomic operations model }end link{
-+ #include