Hello community,
here is the log from the commit of package ksh for openSUSE:Factory
checked in at Fri Mar 12 17:34:54 CET 2010.
--------
--- ksh/ksh.changes 2010-03-08 17:20:50.000000000 +0100
+++ /mounts/work_src_done/STABLE/ksh/ksh.changes 2010-03-10 15:26:15.000000000 +0100
@@ -1,0 +2,28 @@
+Wed Mar 10 12:34:45 CET 2010 - werner@suse.de
+
+- Use a wrapper to execute the ksh test suite without ignoring the
+ signals SIGPIPE and SIGQUIT
+- Update to 2010-03-09 of ksh93t+ for bug fix version
+
+ ksh:
+ 10-03-05 --- Release ksh93t+ ---
+ 10-03-05 A varibale unset memory leak has been fixed and tests/leaks.sh
+ has been added to verify the fix.
+ 10-03-04 Documentation, comment, and disgnostic spelling typos corrected.
+
+ libast:
+ 10-03-08 features/tvlib: fix utimensat probe to include all macros/structs
+ 10-03-07 features/lib: change stream_peek to test pipes only
+ 10-03-07 string/strelapsed.c: fix next char return overrun
+ 10-03-06 tm/tvtouch.c: use runtime fallback if utimensat() fails with ENOSYS
+ 10-03-05 path/pathtemp.c: add pfx /seed for regression testing
+ 10-03-04 vmalloc/vmwalk.c: add user supplied handle arg
+ 10-03-04 path/pathtemp.c: properly handle mktemp()-style *+(X) templates
+ 10-03-03 include/ast_getopt.h: remove NULL guard - _AST_GETOPT_H now handles it
+
+ libcmd:
+ 10-03-07 tail.c: sfsync(sfstdout) after all -f done, fix -f partial line
+ 10-03-05 mktemp.c: add --regress=seed for testing
+ 10-03-05 vmstate.c: add
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
INIT.2010-03-01.tar.bz2
ast-ksh.2010-03-01.tar.bz2
ksh93-2010-03-01-memleak.dif
ksh93-debugleaks.dif
libast.cflags
New:
----
INIT.2010-03-09.tar.bz2
ast-ksh.2010-03-09.tar.bz2
sigexec.c
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ksh.spec ++++++
--- /var/tmp/diff_new_pack.zI6yQu/_old 2010-03-12 17:34:44.000000000 +0100
+++ /var/tmp/diff_new_pack.zI6yQu/_new 2010-03-12 17:34:44.000000000 +0100
@@ -35,18 +35,18 @@
%endif
AutoReqProv: on
Version: 93t
-Release: 20
+Release: 21
Summary: Korn Shell
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: INIT.2010-03-01.tar.bz2
-Source1: ast-ksh.2010-03-01.tar.bz2
+Source: INIT.2010-03-09.tar.bz2
+Source1: ast-ksh.2010-03-09.tar.bz2
Source2: ast-ksh-locale.2010-02-02.tar.bz2
Source10: leak1.sh
Source11: leak2.sh
Source20: Agreement
Source21: Warning
-Source22: libast.cflags
Source30: rpmlintrc
+Source42: sigexec.c
Patch: ksh93.dif
Patch1: workaround-stupid-build-system.diff
Patch2: ksh-qemu.patch
@@ -62,8 +62,6 @@
Patch12: ksh93-limits.dif
Patch14: ksh93-ia64.dif
Patch15: ksh93-s390.dif
-Patch41: ksh93-2010-03-01-memleak.dif
-Patch42: ksh93-debugleaks.dif
%global use_suid_exe 0
%global use_locale 1
%global debug_memleak 0
@@ -129,19 +127,45 @@
%patch14
%endif
%patch15
-%patch41
-%if %debug_memleak
-%patch42
-%endif
%build
typeset -i IGNORED=0x$(ps --no-headers -o ignored $$)
typeset -i SIGPIPE=0x1000
if ((IGNORED & SIGPIPE)) ; then
- # Warn ans show signal state of this working shell
+ # 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: try to solve this 1>&2
+ ${CC:-gcc} ${RPM_OPT_FLAGS} -o sigexec %{S:42}
+ for fd in /proc/$$/fd/*; do
+ test -s $fd -a ! -c $fd && break || true
+ done
+ set -- $(readlink $fd)
+ exec -a $SHELL ./sigexec $SHELL ${1+"$@"}
fi
+ nobuiltin=$(mktemp -u /tmp/nobuiltin.XXXXXX) || exit 1
+ set -C
+ sed -nr '\@^extern[[:blank:]].*[[:blank:]](str|mem|(get|put|set)env|(c|m|re|v)alloc).*\(@{
+ s@[[:blank:]]+_ARG_@@
+ s@[a-zA-Z_\*]+[[:blank:]]+@@g
+ s@([^\(\)]+)\(.*\);$@-fno-builtin-\1@; p}' \
+ src/lib/libast/include/*.h \
+ src/lib/libast/sfio/*.h | \
+ sort -u > $nobuiltin
+ set +C
+ (cat >> $nobuiltin)<<-"EOF"
+ -fno-builtin-setenv
+ -fno-builtin-strftime
+ -fno-builtin-strlcat
+ -fno-builtin-strlcpy
+ -fno-builtin-strptime
+ -fno-builtin-strtod
+ -fno-builtin-strtol
+ -fno-builtin-strtold
+ -fno-builtin-strtoll
+ -fno-builtin-strtoul
+ -fno-builtin-strtoull
+ EOF
# This package failed when testing with -Wl,-as-needed being default.
# So we disable it here, if you want to retest, just delete this
# comment and the line below.
@@ -227,7 +251,7 @@
LDSOFLG=""
cflags -std=gnu99 RPM_OPT_FLAGS
cflags -fPIC RPM_OPT_FLAGS
- cflags @%{S:22} RPM_OPT_FLAGS
+ cflags @$nobuiltin RPM_OPT_FLAGS
cflags -fno-strict-aliasing RPM_OPT_FLAGS
cflags -fno-zero-initialized-in-bss RPM_OPT_FLAGS
cflags -g RPM_OPT_FLAGS
@@ -290,7 +314,7 @@
grep -E 'T[[:blank:]](str|mem|(get|put|set)env|(c|m|re|v)alloc)' | \
awk '{print "-fno-builtin-"$3}' | \
sort -u | \
- diff -u %{S:22} - || true
+ diff -u $nobuiltin -
base=src/cmd/ksh93
test=${PWD}/${base}/tests
pushd ${root}/${base}
@@ -325,7 +349,6 @@
typeset -i failed=0
ln -sf ${root}/lib ${test}/../
${root}/bin/ksh.test shtests
- killall -q -s 9 ${root}/bin/ksh.test || true
${root}/bin/ksh.test %{S:10}
${root}/bin/ksh.test %{S:11}
if test $((IGNORED & SIGPIPE)) -eq 0 ; then
++++++ INIT.2010-03-01.tar.bz2 -> INIT.2010-03-09.tar.bz2 ++++++
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 2010-03-02 10:47:50.000000000 +0100
+++ new/lib/package/INIT.html 2010-03-09 07:22:33.000000000 +0100
@@ -910,7 +910,7 @@
<TR>
<TD align=left></TD>
<TD align=center></TD>
-<TD align=right>March 02, 2010</TD>
+<TD align=right>March 09, 2010</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 2010-03-02 10:47:50.000000000 +0100
+++ new/lib/package/INIT.ver 2010-03-09 07:22:33.000000000 +0100
@@ -1 +1 @@
-INIT 2010-03-01 2010-03-01 1
+INIT 2010-03-09 2010-03-09 1
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 2010-03-02 10:47:51.000000000 +0100
+++ new/src/cmd/INIT/Mamfile 2010-03-09 18:15:00.000000000 +0100
@@ -1,4 +1,4 @@
-info mam static 00000 1994-07-17 make (AT&T Research) 5.5 2010-02-24
+info mam static 00000 1994-07-17 make (AT&T Research) 5.5 2010-03-09
setv INSTALLROOT ../../..
setv PACKAGEROOT ../../../../..
setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS}
@@ -44,8 +44,8 @@
exec - case static,port:$OPTIND:$RANDOM in
exec - ?*:*:*|*::*|*:*:$RANDOM)
exec - ;;
-exec - *) if ENV= x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
-exec - then ENV= $SHELL -n hurl.sh
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
+exec - then ENV= LC_ALL=C $SHELL -n hurl.sh
exec - fi
exec - ;;
exec - esac
@@ -82,8 +82,8 @@
exec - case static,port:$OPTIND:$RANDOM in
exec - ?*:*:*|*::*|*:*:$RANDOM)
exec - ;;
-exec - *) if ENV= x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
-exec - then ENV= $SHELL -n iffe.sh
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
+exec - then ENV= LC_ALL=C $SHELL -n iffe.sh
exec - fi
exec - ;;
exec - esac
@@ -120,8 +120,8 @@
exec - case static,port:$OPTIND:$RANDOM in
exec - ?*:*:*|*::*|*:*:$RANDOM)
exec - ;;
-exec - *) if ENV= x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
-exec - then ENV= $SHELL -n mktest.sh
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
+exec - then ENV= LC_ALL=C $SHELL -n mktest.sh
exec - fi
exec - ;;
exec - esac
@@ -157,8 +157,8 @@
exec - case static,port:$OPTIND:$RANDOM in
exec - ?*:*:*|*::*|*:*:$RANDOM)
exec - ;;
-exec - *) if ENV= x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
-exec - then ENV= $SHELL -n package.sh
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
+exec - then ENV= LC_ALL=C $SHELL -n package.sh
exec - fi
exec - ;;
exec - esac
@@ -195,8 +195,8 @@
exec - case static,port:$OPTIND:$RANDOM in
exec - ?*:*:*|*::*|*:*:$RANDOM)
exec - ;;
-exec - *) if ENV= x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
-exec - then ENV= $SHELL -n regress.sh
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
+exec - then ENV= LC_ALL=C $SHELL -n regress.sh
exec - fi
exec - ;;
exec - esac
@@ -233,8 +233,8 @@
exec - case static,port:$OPTIND:$RANDOM in
exec - ?*:*:*|*::*|*:*:$RANDOM)
exec - ;;
-exec - *) if ENV= x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
-exec - then ENV= $SHELL -n rt.sh
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
+exec - then ENV= LC_ALL=C $SHELL -n rt.sh
exec - fi
exec - ;;
exec - esac
@@ -270,8 +270,8 @@
exec - case static,port:$OPTIND:$RANDOM in
exec - ?*:*:*|*::*|*:*:$RANDOM)
exec - ;;
-exec - *) if ENV= x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
-exec - then ENV= $SHELL -n crossexec.sh
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
+exec - then ENV= LC_ALL=C $SHELL -n crossexec.sh
exec - fi
exec - ;;
exec - esac
@@ -308,8 +308,8 @@
exec - case static,port:$OPTIND:$RANDOM in
exec - ?*:*:*|*::*|*:*:$RANDOM)
exec - ;;
-exec - *) if ENV= x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
-exec - then ENV= $SHELL -n ditto.sh
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
+exec - then ENV= LC_ALL=C $SHELL -n ditto.sh
exec - fi
exec - ;;
exec - esac
@@ -346,8 +346,8 @@
exec - case static,port:$OPTIND:$RANDOM in
exec - ?*:*:*|*::*|*:*:$RANDOM)
exec - ;;
-exec - *) if ENV= x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
-exec - then ENV= $SHELL -n execrate.sh
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
+exec - then ENV= LC_ALL=C $SHELL -n execrate.sh
exec - fi
exec - ;;
exec - esac
@@ -383,8 +383,8 @@
exec - case static,port:$OPTIND:$RANDOM in
exec - ?*:*:*|*::*|*:*:$RANDOM)
exec - ;;
-exec - *) if ENV= x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
-exec - then ENV= $SHELL -n filter.sh
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
+exec - then ENV= LC_ALL=C $SHELL -n filter.sh
exec - fi
exec - ;;
exec - esac
@@ -420,8 +420,8 @@
exec - case static,port:$OPTIND:$RANDOM in
exec - ?*:*:*|*::*|*:*:$RANDOM)
exec - ;;
-exec - *) if ENV= x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
-exec - then ENV= $SHELL -n ignore.sh
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
+exec - then ENV= LC_ALL=C $SHELL -n ignore.sh
exec - fi
exec - ;;
exec - esac
@@ -457,8 +457,8 @@
exec - case static,port:$OPTIND:$RANDOM in
exec - ?*:*:*|*::*|*:*:$RANDOM)
exec - ;;
-exec - *) if ENV= x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
-exec - then ENV= $SHELL -n silent.sh
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
+exec - then ENV= LC_ALL=C $SHELL -n silent.sh
exec - fi
exec - ;;
exec - esac
@@ -554,8 +554,8 @@
exec - case static,port:$OPTIND:$RANDOM in
exec - ?*:*:*|*::*|*:*:$RANDOM)
exec - ;;
-exec - *) if ENV= x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
-exec - then ENV= $SHELL -n mprobe.sh
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
+exec - then ENV= LC_ALL=C $SHELL -n mprobe.sh
exec - fi
exec - ;;
exec - esac
@@ -596,8 +596,8 @@
exec - case static,port:$OPTIND:$RANDOM in
exec - ?*:*:*|*::*|*:*:$RANDOM)
exec - ;;
-exec - *) if ENV= x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
-exec - then ENV= $SHELL -n probe.sh
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
+exec - then ENV= LC_ALL=C $SHELL -n probe.sh
exec - fi
exec - ;;
exec - esac
@@ -677,8 +677,8 @@
exec - case static,port:$OPTIND:$RANDOM in
exec - ?*:*:*|*::*|*:*:$RANDOM)
exec - ;;
-exec - *) if ENV= x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
-exec - then ENV= $SHELL -n mamprobe.sh
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
+exec - then ENV= LC_ALL=C $SHELL -n mamprobe.sh
exec - fi
exec - ;;
exec - esac
++++++ ast-ksh.2010-03-01.tar.bz2 -> ast-ksh.2010-03-09.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/package/ast-ksh.README new/lib/package/ast-ksh.README
--- old/lib/package/ast-ksh.README 2010-02-25 06:29:57.000000000 +0100
+++ new/lib/package/ast-ksh.README 2010-03-09 07:22:35.000000000 +0100
@@ -92,7 +92,10 @@
:::::::: ksh93 ::::::::
-10-02-14 --- Release ksh93t+ ---
+10-03-05 --- Release ksh93t+ ---
+10-03-05 A varibale unset memory leak has been fixed and tests/leaks.sh
+ has been added to verify the fix.
+10-03-04 Documentation, comment, and disgnostic spelling typos corrected.
10-02-14 Fix sh_getenv() initialization to cooperate with the 3d fs.
10-02-12 A bug in which the get discipline function was not invoked for
associative array subscripts for unset array elements has been fixed.
@@ -2296,6 +2299,14 @@
:::::::: libast ::::::::
+10-03-08 features/tvlib: fix utimensat probe to include all macros/structs
+10-03-07 features/lib: change stream_peek to test pipes only
+10-03-07 string/strelapsed.c: fix next char return overrun
+10-03-06 tm/tvtouch.c: use runtime fallback if utimensat() fails with ENOSYS
+10-03-05 path/pathtemp.c: add pfx /seed for regression testing
+10-03-04 vmalloc/vmwalk.c: add user supplied handle arg
+10-03-04 path/pathtemp.c: properly handle mktemp()-style *+(X) templates
+10-03-03 include/ast_getopt.h: remove NULL guard - _AST_GETOPT_H now handles it
10-02-24 comp/getopt.h: fix ast_std.h interactions
10-02-24 vmalloc/malloc.c: empty { VMALLOC_OPTION VMDEBUG ... } => no debug!
10-02-02 string/base64.c: fix corner case output buffer overflow
@@ -3911,6 +3922,9 @@
:::::::: libcmd ::::::::
+10-03-07 tail.c: sfsync(sfstdout) after all -f done, fix -f partial line
+10-03-05 mktemp.c: add --regress=seed for testing
+10-03-05 vmstate.c: add
10-01-26 tail.c: -f sleep(1) only if no progress from last round of checks
10-01-20 fts_fix.[ch]: use instead of (see fts_fix.c)
10-01-20 cp.c: free(state) if called from old shell
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/package/ast-ksh.html new/lib/package/ast-ksh.html
--- old/lib/package/ast-ksh.html 2010-03-02 10:47:52.000000000 +0100
+++ new/lib/package/ast-ksh.html 2010-03-09 07:22:35.000000000 +0100
@@ -192,7 +192,10 @@
<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="ksh93 changes">ksh93 changes</A></H3></FONT></FONT></CENTER>
<PRE>
-10-02-14 --- Release ksh93t+ ---
+10-03-05 --- Release ksh93t+ ---
+10-03-05 A varibale unset memory leak has been fixed and tests/leaks.sh
+ has been added to verify the fix.
+10-03-04 Documentation, comment, and disgnostic spelling typos corrected.
10-02-14 Fix sh_getenv() initialization to cooperate with the 3d fs.
10-02-12 A bug in which the get discipline function was not invoked for
associative array subscripts for unset array elements has been fixed.
@@ -2399,6 +2402,14 @@
<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="libast changes">libast changes</A></H3></FONT></FONT></CENTER>
<PRE>
+10-03-08 features/tvlib: fix utimensat probe to include all macros/structs
+10-03-07 features/lib: change stream_peek to test pipes only
+10-03-07 string/strelapsed.c: fix next char return overrun
+10-03-06 tm/tvtouch.c: use runtime fallback if utimensat() fails with ENOSYS
+10-03-05 path/pathtemp.c: add pfx /seed for regression testing
+10-03-04 vmalloc/vmwalk.c: add user supplied handle arg
+10-03-04 path/pathtemp.c: properly handle mktemp()-style *+(X) templates
+10-03-03 include/ast_getopt.h: remove NULL guard - _AST_GETOPT_H now handles it
10-02-24 comp/getopt.h: fix ast_std.h interactions
10-02-24 vmalloc/malloc.c: empty { VMALLOC_OPTION VMDEBUG ... } => no debug!
10-02-02 string/base64.c: fix corner case output buffer overflow
@@ -4017,6 +4028,9 @@
<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="libcmd changes">libcmd changes</A></H3></FONT></FONT></CENTER>
<PRE>
+10-03-07 tail.c: sfsync(sfstdout) after all -f done, fix -f partial line
+10-03-05 mktemp.c: add --regress=seed for testing
+10-03-05 vmstate.c: add
10-01-26 tail.c: -f sleep(1) only if no progress from last round of checks
10-01-20 fts_fix.[ch]: use <fts_fix.h> instead of <fts.h> (see fts_fix.c)
10-01-20 cp.c: free(state) if called from old shell
@@ -4389,7 +4403,7 @@
<TR>
<TD align=left></TD>
<TD align=center></TD>
-<TD align=right>March 02, 2010</TD>
+<TD align=right>March 09, 2010</TD>
</TR>
</TABLE>
<P>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/package/ast-ksh.ver new/lib/package/ast-ksh.ver
--- old/lib/package/ast-ksh.ver 2010-03-02 10:47:52.000000000 +0100
+++ new/lib/package/ast-ksh.ver 2010-03-09 07:22:34.000000000 +0100
@@ -1 +1 @@
-ast-ksh 2010-03-01 2010-03-01 1
+ast-ksh 2010-03-09 2010-03-09 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/package/ksh.ver new/lib/package/ksh.ver
--- old/lib/package/ksh.ver 2010-03-02 10:47:51.000000000 +0100
+++ new/lib/package/ksh.ver 2010-03-09 18:15:00.000000000 +0100
@@ -1 +1 @@
-ksh 2010-03-01 2010-03-01 1
+ksh 2010-03-09 2010-03-09 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/ksh93/Makefile new/src/cmd/ksh93/Makefile
--- old/src/cmd/ksh93/Makefile 2009-12-04 21:53:14.000000000 +0100
+++ new/src/cmd/ksh93/Makefile 2010-03-05 00:00:48.000000000 +0100
@@ -201,11 +201,12 @@
attributes.sh basic.sh bracket.sh builtins.sh case.sh \
comvar.sh coprocess.sh cubetype.sh enum.sh exit.sh \
expand.sh functions.sh glob.sh grep.sh heredoc.sh io.sh \
- locale.sh nameref.sh options.sh path.sh pointtype.sh \
- quoting.sh quoting2.sh recttype.sh restricted.sh return.sh \
- select.sh shtests sigchld.sh signal.sh statics.sh \
- subshell.sh substring.sh tilde.sh timetype.sh treemove.sh \
- types.sh variables.sh vartree1.sh vartree2.sh
+ leaks.sh locale.sh nameref.sh options.sh path.sh \
+ pointtype.sh quoting.sh quoting2.sh recttype.sh \
+ restricted.sh return.sh select.sh shtests sigchld.sh \
+ signal.sh statics.sh subshell.sh substring.sh tilde.sh \
+ timetype.sh treemove.sh types.sh variables.sh \
+ vartree1.sh vartree2.sh
:: ksh-regress.rt ksh-regress.tst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/ksh93/Mamfile new/src/cmd/ksh93/Mamfile
--- old/src/cmd/ksh93/Mamfile 2010-03-02 10:47:53.000000000 +0100
+++ new/src/cmd/ksh93/Mamfile 2010-03-09 18:15:02.000000000 +0100
@@ -1,4 +1,4 @@
-info mam static 00000 1994-07-17 make (AT&T Research) 5.5 2010-02-24
+info mam static 00000 1994-07-17 make (AT&T Research) 5.5 2010-03-09
setv INSTALLROOT ../../..
setv PACKAGE_ast_INCLUDE ${INSTALLROOT}/include/ast
setv PACKAGE_ast_LIB ${INSTALLROOT}/lib
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/ksh93/RELEASE new/src/cmd/ksh93/RELEASE
--- old/src/cmd/ksh93/RELEASE 2010-02-15 20:38:21.000000000 +0100
+++ new/src/cmd/ksh93/RELEASE 2010-03-05 06:34:53.000000000 +0100
@@ -1,4 +1,7 @@
-10-02-14 --- Release ksh93t+ ---
+10-03-05 --- Release ksh93t+ ---
+10-03-05 A varibale unset memory leak has been fixed and tests/leaks.sh
+ has been added to verify the fix.
+10-03-04 Documentation, comment, and disgnostic spelling typos corrected.
10-02-14 Fix sh_getenv() initialization to cooperate with the 3d fs.
10-02-12 A bug in which the get discipline function was not invoked for
associative array subscripts for unset array elements has been fixed.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/ksh93/bltins/enum.c new/src/cmd/ksh93/bltins/enum.c
--- old/src/cmd/ksh93/bltins/enum.c 2008-10-24 17:01:14.000000000 +0200
+++ new/src/cmd/ksh93/bltins/enum.c 2010-03-04 22:23:43.000000000 +0100
@@ -27,7 +27,7 @@
"[+DESCRIPTION?\benum\b is a declaration command that creates an enumeration "
"type \atypename\a that can only store any one of the values in the indexed "
"array variable \atypename\a.]"
-"[+?If the list of \avalue\as is ommitted, then \atypename\a must name an "
+"[+?If the list of \avalue\as is omitted, then \atypename\a must name an "
"indexed array variable with at least two elements.]"
"[i:ignorecase?The values are case insensitive.]"
"\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/ksh93/data/lexstates.c new/src/cmd/ksh93/data/lexstates.c
--- old/src/cmd/ksh93/data/lexstates.c 2009-08-25 07:05:02.000000000 +0200
+++ new/src/cmd/ksh93/data/lexstates.c 2010-03-04 22:23:05.000000000 +0100
@@ -387,7 +387,7 @@
const char e_lexversion[] = "%d: invalid binary script version";
const char e_lexspace[] = "line %d: use space or tab to separate operators %c and %c";
-const char e_lexslash[] = "line %d: $ not preceeded by \\";
+const char e_lexslash[] = "line %d: $ not preceded by \\";
const char e_lexsyntax1[] = "syntax error at line %d: `%s' %s";
const char e_lexsyntax2[] = "syntax error: `%s' %s";
const char e_lexsyntax3[] = "syntax error at line %d: duplicate label %s";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/ksh93/include/version.h new/src/cmd/ksh93/include/version.h
--- old/src/cmd/ksh93/include/version.h 2010-02-12 18:46:56.000000000 +0100
+++ new/src/cmd/ksh93/include/version.h 2010-03-05 06:33:58.000000000 +0100
@@ -17,4 +17,4 @@
* David Korn *
* *
***********************************************************************/
-#define SH_RELEASE "93t+ 2010-02-14"
+#define SH_RELEASE "93t+ 2010-03-05"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/ksh93/sh/name.c new/src/cmd/ksh93/sh/name.c
--- old/src/cmd/ksh93/sh/name.c 2010-02-25 13:04:06.000000000 +0100
+++ new/src/cmd/ksh93/sh/name.c 2010-03-04 17:30:08.000000000 +0100
@@ -1635,7 +1635,7 @@
}
if(nv_isattr(np,NV_BINARY) && !(flags&NV_RAW))
tofree = 0;
- if(nv_isattr(np,NV_LJUST|NV_RJUST)!=(NV_LJUST|NV_RJUST))
+ if(nv_isattr(np,NV_LJUST|NV_RJUST) && nv_isattr(np,NV_LJUST|NV_RJUST)!=(NV_LJUST|NV_RJUST))
tofree = 0;
if (sp)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/ksh93/sh/shcomp.c new/src/cmd/ksh93/sh/shcomp.c
--- old/src/cmd/ksh93/sh/shcomp.c 2008-08-08 21:35:28.000000000 +0200
+++ new/src/cmd/ksh93/sh/shcomp.c 2010-03-04 22:23:21.000000000 +0100
@@ -36,7 +36,7 @@
"script.]"
"[+?Since aliases are processed as the script is read, alias definitions "
"whose value requires variable expansion will not work correctly.]"
-"[+?If \b-D\b is specifed, all double quoted strings that are preceded by "
+"[+?If \b-D\b is specified, all double quoted strings that are preceded by "
"\b$\b are output. These are the messages that need to be "
"translated to locale specific versions for internationalization.]"
"[+?If \aoutfile\a is omitted, then the results will be written to "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/ksh93/sh.1 new/src/cmd/ksh93/sh.1
--- old/src/cmd/ksh93/sh.1 2010-02-03 06:36:29.000000000 +0100
+++ new/src/cmd/ksh93/sh.1 2010-03-04 22:22:39.000000000 +0100
@@ -1023,7 +1023,7 @@
range of
0 through 4,194,303.
A negative subscript is treated as an offset from the maximum
-current index +1 so that -1 refers to the last element.
+current index +1 so that \-1 refers to the last element.
Indexed arrays can be declared with the
.B \-a
option to
@@ -5684,7 +5684,7 @@
.TP
\(dg\(dg \f3enum\fP \*(OK \f3\-i\fP \*(CK \f2type\^\fP\*(OK=(\f2value\^\fP .\|.\|.) \*(CK
Creates a declaration command named \f2type\^\fP that is an
-integer type that allows one of the specifed \f2value\fPs as
+integer type that allows one of the specified \f2value\fPs as
enumeration names. If \f3=(\fP\f2value\^\ .\|.\|.\|\fP\f3)\fP is
omitted, then \f2type\^\fP must be an indexed array variable with at
least two elements and the values are taken from this array variable.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/ksh93/tests/arrays.sh new/src/cmd/ksh93/tests/arrays.sh
--- old/src/cmd/ksh93/tests/arrays.sh 2010-02-12 19:47:05.000000000 +0100
+++ new/src/cmd/ksh93/tests/arrays.sh 2010-03-05 18:18:42.000000000 +0100
@@ -336,18 +336,20 @@
print 'print ${var[0]} ${var[1]}' > $tmp/script
chmod +x $tmp/script
[[ $($SHELL -c "var=(foo bar);export var;$tmp/script") == foo ]] || err_exit 'export array not exporting just first element'
+
unset foo
-set -o allexport
+set --allexport
foo=one
foo[1]=two
foo[0]=three
-[[ $foo == three ]] || err_exit 'export all not working with arrays'
+[[ $foo == three ]] || err_exit '--allexport not working with arrays'
+set --noallexport
+unset foo
+
cat > $tmp/script <<- \!
typeset -A foo
print foo${foo[abc]}
!
-# 04-05-24 bug fix
-unset foo
[[ $($SHELL -c "typeset -A foo;$tmp/script") == foo ]] 2> /dev/null || err_exit 'empty associative arrays not being cleared correctly before scripts'
[[ $($SHELL -c "typeset -A foo;foo[abc]=abc;$tmp/script") == foo ]] 2> /dev/null || err_exit 'associative arrays not being cleared correctly before scripts'
unset foo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/cmd/ksh93/tests/leaks.sh new/src/cmd/ksh93/tests/leaks.sh
--- old/src/cmd/ksh93/tests/leaks.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/src/cmd/ksh93/tests/leaks.sh 2010-03-08 07:25:08.000000000 +0100
@@ -0,0 +1,54 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# and is licensed under the #
+# Common Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.opensource.org/licenses/cpl1.0.txt #
+# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# David Korn #
+# #
+########################################################################
+builtin vmstate 2>/dev/null || exit 0
+
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ let Errors+=1
+}
+alias err_exit='err_exit $LINENO'
+
+Command=${0##*/}
+integer Errors=0
+
+# test for variable reset leak #
+
+function test_reset
+{
+ integer i n=$1
+
+ for ((i = 0; i < n; i++))
+ do u=$i
+ done
+}
+
+n=1000
+test_reset $n
+a=0$(vmstate --format='+%(size)u')
+test_reset $n
+b=0$(vmstate --format='+%(size)u')
+
+if (( b > a ))
+then err_exit "variable value reset memory leak -- $((b-a)) bytes after $n iterations"
+fi
+
+exit $((Errors))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libast/Mamfile new/src/lib/libast/Mamfile
--- old/src/lib/libast/Mamfile 2010-03-02 10:47:55.000000000 +0100
+++ new/src/lib/libast/Mamfile 2010-03-09 18:15:04.000000000 +0100
@@ -1,4 +1,4 @@
-info mam static 00000 1994-07-17 make (AT&T Research) 5.5 2010-02-24
+info mam static 00000 1994-07-17 make (AT&T Research) 5.5 2010-03-09
setv INSTALLROOT ../../..
setv PACKAGEROOT ../../../../..
setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS}
@@ -124,8 +124,8 @@
exec - case static,port:$OPTIND:$RANDOM in
exec - ?*:*:*|*::*|*:*:$RANDOM)
exec - ;;
-exec - *) if ENV= x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
-exec - then ENV= $SHELL -n comp/conf.sh
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc ': ${list[level]} !(pattern)' 2>/dev/null
+exec - then ENV= LC_ALL=C $SHELL -n comp/conf.sh
exec - fi
exec - ;;
exec - esac
@@ -1058,6 +1058,18 @@
prev include/times.h implicit
prev include/ast.h implicit
done include/tm.h
+make tv.h implicit
+make FEATURE/tv
+meta FEATURE/tv features/%>FEATURE/% features/tv tv
+make features/tv
+done features/tv
+prev ast.req
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/tv
+prev include/ast.h implicit
+done FEATURE/tv generated
+exec - cmp 2>/dev/null -s FEATURE/tv tv.h || { rm -f tv.h; silent test -d . || mkdir .; ${STDCP} FEATURE/tv tv.h; }
+prev include/ast.h implicit
+done tv.h generated
prev include/ls.h implicit
prev include/ast.h implicit
done path/pathtemp.c
@@ -1821,18 +1833,7 @@
done fmtscale.o generated
make fmttmx.o
make string/fmttmx.c
-make tv.h implicit
-make FEATURE/tv
-meta FEATURE/tv features/%>FEATURE/% features/tv tv
-make features/tv
-done features/tv
-prev ast.req
-exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/tv
-prev include/ast.h implicit
-done FEATURE/tv generated
-exec - cmp 2>/dev/null -s FEATURE/tv tv.h || { rm -f tv.h; silent test -d . || mkdir .; ${STDCP} FEATURE/tv tv.h; }
-prev include/ast.h implicit
-done tv.h generated
+prev tv.h implicit
make tmx.h implicit
make FEATURE/tmx
meta FEATURE/tmx features/%>FEATURE/% features/tmx tmx
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libast/RELEASE new/src/lib/libast/RELEASE
--- old/src/lib/libast/RELEASE 2010-02-24 20:16:58.000000000 +0100
+++ new/src/lib/libast/RELEASE 2010-03-08 16:57:41.000000000 +0100
@@ -1,3 +1,11 @@
+10-03-08 features/tvlib: fix utimensat probe to include all macros/structs
+10-03-07 features/lib: change stream_peek to test pipes only
+10-03-07 string/strelapsed.c: fix next char return overrun
+10-03-06 tm/tvtouch.c: use runtime fallback if utimensat() fails with ENOSYS
+10-03-05 path/pathtemp.c: add pfx /seed for regression testing
+10-03-04 vmalloc/vmwalk.c: add user supplied handle arg
+10-03-04 path/pathtemp.c: properly handle mktemp()-style *+(X) templates
+10-03-03 include/ast_getopt.h: remove NULL guard - _AST_GETOPT_H now handles it
10-02-24 comp/getopt.h: fix ast_std.h interactions
10-02-24 vmalloc/malloc.c: empty { VMALLOC_OPTION VMDEBUG ... } => no debug!
10-02-02 string/base64.c: fix corner case output buffer overflow
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libast/features/lib new/src/lib/libast/features/lib
--- old/src/lib/libast/features/lib 2009-12-10 18:30:52.000000000 +0100
+++ new/src/lib/libast/features/lib 2010-03-07 05:59:41.000000000 +0100
@@ -319,18 +319,23 @@
}
}end
-tst stream_peek note{ ioctl(I_PEEK) works }end link{
+tst stream_peek note{ ioctl(I_PEEK) works }end execute{
#include
+ #include
#include
int
main()
- { struct strpeek pbuf;
- pbuf.flags = 0;
- pbuf.ctlbuf.maxlen = pbuf.databuf.maxlen =
- pbuf.ctlbuf.len = pbuf.databuf.len = 0;
- pbuf.ctlbuf.buf = pbuf.databuf.buf = 0;
- ioctl(0,I_PEEK,&pbuf);
- return 0;
+ { struct strpeek peek;
+ int fds[2];
+ char ctlbuf[32];
+ char databuf[32];
+ peek.flags = 0;
+ peek.ctlbuf.maxlen = peek.ctlbuf.len = sizeof(ctlbuf);
+ peek.ctlbuf.buf = ctlbuf;
+ peek.databuf.maxlen = peek.databuf.len = sizeof(databuf);
+ peek.databuf.buf = databuf;
+ pipe(fds);
+ return ioctl(fds[0],I_PEEK,&peek) < 0;
}
}end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libast/features/tvlib new/src/lib/libast/features/tvlib
--- old/src/lib/libast/features/tvlib 2008-07-28 21:11:52.000000000 +0200
+++ new/src/lib/libast/features/tvlib 2010-03-08 17:19:36.000000000 +0100
@@ -1,7 +1,17 @@
hdr time
lib clock_settime,gettimeofday,settimeofday,stime,utimes
lib nanosleep,usleep
-lib utimensat -D_ATFILE_SOURCE sys/stat.h
+lib utimensat -D_ATFILE_SOURCE sys/stat.h note{ complete utimensat implementation }end link{
+ #include
+ static struct timespec ts[2];
+ int
+ main()
+ {
+ ts[0].tv_nsec = UTIME_NOW;
+ ts[1].tv_nsec = UTIME_OMIT;
+ return utimensat(AT_FDCWD, ".", ts, AT_SYMLINK_NOFOLLOW) != 0;
+ }
+}end
if ! mem timeval.tv_sec sys/time.h {
struct timeval
@@ -14,6 +24,7 @@
lib clock_gettime execute{
#include
+ int
main()
{
struct timespec tv;
@@ -25,6 +36,7 @@
#include
#include
static struct timespec tv;
+ int
main()
{
return utimets(".", &tv) != 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libast/include/ast_getopt.h new/src/lib/libast/include/ast_getopt.h
--- old/src/lib/libast/include/ast_getopt.h 2007-10-29 07:26:12.000000000 +0100
+++ new/src/lib/libast/include/ast_getopt.h 2010-03-03 20:18:34.000000000 +0100
@@ -36,11 +36,7 @@
extern int optopt;
extern char* optarg;
-#ifndef NULL /* in case or got here first */
-
extern int getopt(int, char* const*, const char*);
extern int getsubopt(char**, char* const*, char**);
#endif
-
-#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libast/include/regex.h new/src/lib/libast/include/regex.h
--- old/src/lib/libast/include/regex.h 2009-11-04 16:37:10.000000000 +0100
+++ new/src/lib/libast/include/regex.h 2010-03-04 22:27:36.000000000 +0100
@@ -117,7 +117,7 @@
#define REG_BADBR 10 /* invalid {...} digits */
#define REG_ERANGE 11 /* invalid [...] range endpoint */
#define REG_ESPACE 12 /* out of space */
-#define REG_BADRPT 13 /* unary op not preceeded by re */
+#define REG_BADRPT 13 /* unary op not preceded by re */
#define REG_ENULL 14 /* empty subexpr in pattern */
#define REG_ECOUNT 15 /* re component count overflow */
#define REG_BADESC 16 /* invalid \char escape */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libast/include/vmalloc.h new/src/lib/libast/include/vmalloc.h
--- old/src/lib/libast/include/vmalloc.h 2010-01-07 23:15:40.000000000 +0100
+++ new/src/lib/libast/include/vmalloc.h 2010-03-05 00:07:20.000000000 +0100
@@ -176,7 +176,8 @@
extern int vmstat _ARG_((Vmalloc_t*, Vmstat_t*));
extern int vmwalk _ARG_((Vmalloc_t*,
- int(*)(Vmalloc_t*,Void_t*,size_t,Vmdisc_t*)));
+ int(*)(Vmalloc_t*,Void_t*,size_t,Vmdisc_t*,Void_t*),
+ Void_t*));
extern char* vmstrdup _ARG_((Vmalloc_t*, const char*));
#if !defined(_BLD_vmalloc) && !defined(_AST_STD_H) && \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libast/ksh new/src/lib/libast/ksh
--- old/src/lib/libast/ksh 1970-01-01 01:00:00.000000000 +0100
+++ new/src/lib/libast/ksh 2010-03-04 17:54:16.000000000 +0100
@@ -0,0 +1,65 @@
+From olga.kryzhanovska@gmail.com Thu Mar 4 09:47:19 2010
+Return-Path:
+Received: from mail-brown.research.att.com (mail-brown.research.att.com [135.207.30.105]) by unixmail.research.att.com (8.13.7+Sun/8.13.7) with ESMTP id o24ElJ9a020652 for ; Thu, 4 Mar 2010 09:47:19 -0500 (EST)
+Received: by mail-brown.research.att.com (Postfix, from userid 612) id 735858E5D43; Thu, 4 Mar 2010 09:47:09 -0500 (EST)
+X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail-brown.research.att.com
+X-Spam-Level: *
+X-Spam-Status: No, score=1.4 required=4.5 tests=AWL,BAYES_00, CHARSET_FARAWAY_HEADER,SPF_NEUTRAL autolearn=no version=3.2.5
+Received: from mail-red.research.att.com (mail-red.research.att.com [192.20.225.110]) by mail-brown.research.att.com (Postfix) with ESMTP id B3F3D8E5D60 for ; Thu, 4 Mar 2010 09:47:08 -0500 (EST)
+Received: by mail-red.research.att.com (Postfix) id 59FA355424E; Thu, 4 Mar 2010 09:47:12 -0500 (EST)
+Delivered-To: gsf@research.att.com
+Received: from mail-fx0-f220.google.com (mail-fx0-f220.google.com [209.85.220.220]) by mail-red.research.att.com (Postfix) with ESMTP id 220F255424D for ; Thu, 4 Mar 2010 09:47:11 -0500 (EST)
+Received: by fxm20 with SMTP id 20so2725516fxm.12 for ; Thu, 04 Mar 2010 06:47:11 -0800 (PST)
+Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=6sAAEg0Ah3Brtr/2a27UUfOM+ZQ7s9Sj+6E4rpUdzh4=; b=H9Eluy97ea+2G6227C0OT0VbB69S2Iv5A4+pSb4zLH1+/KF08Zwd3w/GPUx6gbtkaC jmFuc/ei2oTzPHLaf0eSl6s5TWAxkCOiUhgZtXKXpdUaHlNpzXXORpood5Dy7z78kQyv 68HMFRWwO5+zLv0gF5hF0zKashiCVxFWdAjRM=
+Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=vm9JKkDendrYCODyQu31Ivv2RQ9TUqUp7PWlpHrUNXdAtBusyLmzxP6PQqPyXCL3Zt +XaVTQl1K64XX2pZCKU8HOg0NczhLZnYDo12xHRvVN9c3XT22ttQQzVqUJqs2URBfchW 2bQIcNjeQj69Mi3xbiC3m8PTvrYbzkjV2v3n0=
+Mime-Version: 1.0
+Received: by 10.223.5.92 with SMTP id 28mr10309254fau.26.1267714031177; Thu, 04 Mar 2010 06:47:11 -0800 (PST)
+In-Reply-To: <201003041407.o24E7WC2016902@dm-holland-01.uk.sun.com>
+References: <1649443.1267709581889.JavaMail.sbladm@swsblss3-new> <201003041407.o24E7WC2016902@dm-holland-01.uk.sun.com>
+Date: Thu, 4 Mar 2010 15:47:10 +0100
+Message-Id:
+Subject: Re: [ksh93-integration-discuss] [busybox-dev] CR 6861633 Updated, P3 shell/korn93 RFE: Update /usr/bin/mktemp to AT&T AST "mktemp"
+From: =?KOI8-R?B?z8zYx8Egy9LZ1sHOz9fTy8HR?=
+To: "Korn Shell 93 integration/migration project discussion" , Glenn Fowler
+Cc: Busybox development
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Length: 951
+Status: R
+
+On Thu, Mar 4, 2010 at 3:07 PM, wrote:
+>
+>>Can anyone from Sun please tell us why Bug 6932124 is locked? I cannot
+>>look it up via bugs.opensolaris.org
+>
+> I just filed it; I'm not sure why it would locked.
+>
+> This bug is this:
+>
+> $ mktemp log.2010-03-04.XXXXXX
+> log_2sie.t0f
+
+mktemp tries to fit its name into a 8.3 DOS naming.
+
+Glenn, is it feasible to call pathconf(NAME_MAX) and enable the 8.3
+naming only if the file system does not support long file names?
+
+> Which is not correct.
+>
+> The Solaris mktemp binary returns:
+>
+> log.2010-03-04.liaalG
+>
+> which is what I expected.
+
+OK.
+
+
+Olga
+--
+ , _ _ ,
+ { \/`o;====- Olga Kryzhanovska -====;o`\/ }
+.----'-/`-/ olga.kryzhanovska@gmail.com \-`\-'----.
+ `'-..-| / Solaris/BSD//C/C++ programmer \ |-..-'`
+ /\/\ /\/\
+ `--` `--`
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libast/man/sfdisc.3 new/src/lib/libast/man/sfdisc.3
--- old/src/lib/libast/man/sfdisc.3 2002-08-19 17:19:48.000000000 +0200
+++ new/src/lib/libast/man/sfdisc.3 2010-03-08 21:54:16.000000000 +0100
@@ -105,7 +105,7 @@
all input operations on \f5f\fP to come from the merged data stream.
\f5dcnewunion()\fP returns the discipline on success and \f5NULL\fP on failure.
-.SH ACKNOWLEDGEMENTS
+.SH ACKNOWLEDGMENTS
Dave Korn contributed the substream discipline.
Jim Arnold contributed the lzw discipline.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libast/man/stropt.3 new/src/lib/libast/man/stropt.3
--- old/src/lib/libast/man/stropt.3 2002-08-19 20:48:56.000000000 +0200
+++ new/src/lib/libast/man/stropt.3 2010-03-04 22:29:24.000000000 +0100
@@ -93,7 +93,7 @@
.I n
is 0 if
.B no
-preceeded the option
+preceded the option
.I name
and
.I v
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libast/man/vmalloc.3 new/src/lib/libast/man/vmalloc.3
--- old/src/lib/libast/man/vmalloc.3 2010-02-24 20:22:20.000000000 +0100
+++ new/src/lib/libast/man/vmalloc.3 2010-03-04 22:58:06.000000000 +0100
@@ -44,7 +44,7 @@
.nf
.MW "Vmalloc_t* vmregion(Void_t* addr);"
.MW "Void_t* vmsegment(Vmalloc_t* region, Void_t* addr);"
-.MW "int vmwalk(Vmalloc_t* region, int(*walkf)(Vmalloc_t*, Void_t*, size_t, Vmdisc_t*);"
+.MW "int vmwalk(Vmalloc_t* region, int(*walkf)(Vmalloc_t*, Void_t*, size_t, size_t, Vmdisc_t*, Void_t*), Void_t* handle);"
.MW "long vmaddr(Vmalloc_t* region, Void_t* addr);"
.MW "long vmsize(Vmalloc_t* region, Void_t* addr);"
.MW "int vmstat(Vmalloc_t* vm, Vmstat_t* statb);"
@@ -426,9 +426,10 @@
.I vmwalk
walks all segments in \fIregion\fP or if \fIregion\fP is \f5NULL\fP,
all segments in all regions.
-At each segment, \fI(*walkf)(vm,addr,size,disc)\fP
+At each segment, \fI(*walkf)(vm,addr,size,segno,disc,handle)\fP
is called where \fIvm\fP is the region, \fIaddr\fP is the segment,
-\fIsize\fP is the size of the segment, and \fIdisc\fP is the region's discipline.
+\fIsize\fP is the size of the segment, \fIsegno\fP is the segment ordinal counting from 0,
+\fIdisc\fP is the region's discipline, and \fIhandle\fP is the user supplied \fIvmwalk\fP handle.
If \fIwalkf\fP returns a negative value, the walk stops and returns the same value.
On success, \fIvmwalk\fP returns 0; otherwise, it returns \-1.
.PP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libast/path/pathtemp.c new/src/lib/libast/path/pathtemp.c
--- old/src/lib/libast/path/pathtemp.c 2004-07-23 08:14:10.000000000 +0200
+++ new/src/lib/libast/path/pathtemp.c 2010-03-08 07:17:41.000000000 +0100
@@ -39,11 +39,13 @@
* pathtemp(p,sizeof(p),0,"tn",0)
* tmpnam(p) pathtemp(p,L_tmpnam,0,"tn",0)
* tempnam(d,p) pathtemp(0,d,p,0)
+ * mktemp(p) pathtemp(0,0,p,0)
*
* if buf==0 then space is malloc'd
* buf size is size
* dir and pfx may be 0
- * only first 5 chars of pfx are used
+ * if pfx contains trailing X's then it is a mktemp(3) template
+ * otherwise only first 5 chars of pfx are used
* if fdp!=0 then the path is opened O_EXCL and *fdp is the open fd
* malloc'd space returned by successful pathtemp() calls
* must be freed by the caller
@@ -59,12 +61,17 @@
* manual cycled by application with dir=(nil)
* (nil) cycle TMPPATH
* /prefix dir specifies the default prefix (default ast)
+ * /private private file/dir modes
+ * /public public file/dir modes
+ * /seed dir specifies pseudo-random generator seed
+ * 0 or "0" to re-initialize
* /TMPPATH dir overrides the env value
* /TMPDIR dir overrides the env value
*/
#include
#include
+#include
#include
#define ATTEMPT 10
@@ -81,10 +88,11 @@
mode_t mode;
char** vec;
char** dir;
- unsigned long key;
- unsigned long rng;
+ uint32_t key;
+ uint32_t rng;
pid_t pid;
int manual;
+ int seed;
char* pfx;
char* tmpdir;
char* tmppath;
@@ -97,11 +105,15 @@
register char* b;
register char* s;
register char* x;
- char* fmt;
+ uint32_t key;
int m;
int n;
+ int l;
+ int r;
int z;
int attempt;
+ Tv_t tv;
+ char keybuf[16];
if (pfx && *pfx == '/')
{
@@ -126,9 +138,20 @@
return (char*)pfx;
}
else if (streq(pfx, "private"))
+ {
tmp.mode = S_IRUSR|S_IWUSR;
+ return (char*)pfx;
+ }
else if (streq(pfx, "public"))
+ {
tmp.mode = S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH;
+ return (char*)pfx;
+ }
+ else if (streq(pfx, "seed"))
+ {
+ tmp.key = (tmp.seed = (tmp.rng = dir ? (uint32_t)strtoul(dir, NiL, 0) : (uint32_t)1) != 0)? (uint32_t)0x63c63cd9L : 0;
+ return (char*)pfx;
+ }
else if (streq(pfx, TMP_ENV))
{
if (tmp.vec)
@@ -155,6 +178,10 @@
}
return 0;
}
+ if (tmp.seed)
+ tv.tv_nsec = 0;
+ else
+ tvgettime(&tv);
if (!(d = (char*)dir) || *d && eaccess(d, W_OK|X_OK))
{
if (!tmp.vec)
@@ -208,18 +235,37 @@
len--;
if (!(b = buf) && !(b = newof(0, char, len, 1)))
return 0;
- if (buf && dir && pfx && (buf == (char*)dir && (buf + strlen(buf) + 1) == (char*)pfx || buf == (char*)pfx && !*dir) && !strcmp((char*)pfx + strlen(pfx) + 1, "XXXXX"))
+ z = 0;
+ if (!pfx && !(pfx = tmp.pfx))
+ pfx = "ast";
+ m = strlen(pfx);
+ if (buf && dir && (buf == (char*)dir && (buf + strlen(buf) + 1) == (char*)pfx || buf == (char*)pfx && !*dir) && !strcmp((char*)pfx + m + 1, "XXXXX"))
{
- z = 0;
d = (char*)dir;
- len = m = strlen(d) + strlen(pfx) + 8;
- fmt = "%03.3.32lu%03.3.32lu";
+ len = m += strlen(d) + 8;
+ l = 3;
+ r = 3;
+ }
+ else if (*pfx && pfx[m - 1] == 'X')
+ {
+ for (l = m; l && pfx[l - 1] == 'X'; l--);
+ r = m - l;
+ m = l;
+ l = r / 2;
+ r -= l;
+ }
+ else if (strchr(pfx, '.'))
+ {
+ m = 5;
+ l = 3;
+ r = 3;
}
else
{
z = '.';
m = 5;
- fmt = "%02.2.32lu.%03.3.32lu";
+ l = 2;
+ r = 3;
}
x = b + len;
s = b;
@@ -230,8 +276,6 @@
if (s < x && s > b && *(s - 1) != '/')
*s++ = '/';
}
- if (!pfx && !(pfx = tmp.pfx))
- pfx = "ast";
if ((x - s) > m)
x = s + m;
while (s < x && (n = *pfx++))
@@ -244,7 +288,7 @@
len -= (s - b);
for (attempt = 0; attempt < ATTEMPT; attempt++)
{
- if (!tmp.rng || attempt || tmp.pid != getpid())
+ if (!tmp.rng || !tmp.seed && (attempt || tmp.pid != getpid()))
{
register int r;
@@ -253,7 +297,7 @@
*/
tmp.pid = getpid();
- tmp.rng = (unsigned long)tmp.pid * ((unsigned long)time(NiL) ^ (((unsigned long)(&attempt)) >> 3) ^ (((unsigned long)tmp.dir) >> 3));
+ tmp.rng = (uint32_t)tmp.pid * ((uint32_t)time(NiL) ^ (((uint32_t)(&attempt)) >> 3) ^ (((uint32_t)tmp.dir) >> 3));
if (!tmp.key)
tmp.key = (tmp.rng >> 16) | ((tmp.rng & 0xffff) << 16);
tmp.rng ^= tmp.key;
@@ -270,8 +314,12 @@
* generate a pseudo-random name
*/
- tmp.key = tmp.rng * tmp.key + 987654321L;
- sfsprintf(s, len, fmt, (tmp.key >> 15) & 0x7fff, tmp.key & 0x7fff);
+ key = tmp.rng * tmp.key + tv.tv_nsec;
+ if (!tmp.seed)
+ tvgettime(&tv);
+ tmp.key = tmp.rng * key + tv.tv_nsec;
+ sfsprintf(keybuf, sizeof(keybuf), "%07.7.32I*u%07.7.32I*u", sizeof(key), key, sizeof(tmp.key), tmp.key);
+ sfsprintf(s, len, "%-.*s%s%-.*s", l, keybuf, z ? "." : "", r, keybuf + sizeof(keybuf) / 2);
if (fdp)
{
if ((n = open(b, O_CREAT|O_RDWR|O_EXCL|O_TEMPORARY, tmp.mode)) >= 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libast/regex/regerror.c new/src/lib/libast/regex/regerror.c
--- old/src/lib/libast/regex/regerror.c 2009-12-12 08:34:26.000000000 +0100
+++ new/src/lib/libast/regex/regerror.c 2010-03-04 22:28:08.000000000 +0100
@@ -45,7 +45,7 @@
/* REG_BADBR */ "invalid {...} digits",
/* REG_ERANGE */ "invalid [...] range endpoint",
/* REG_ESPACE */ "out of space",
- /* REG_BADRPT */ "unary op not preceeded by re",
+ /* REG_BADRPT */ "unary op not preceded by re",
/* REG_ENULL */ "empty subexpr in pattern",
/* REG_ECOUNT */ "re component count overflow",
/* REG_BADESC */ "invalid \\char escape",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libast/string/strelapsed.c new/src/lib/libast/string/strelapsed.c
--- old/src/lib/libast/string/strelapsed.c 2007-12-10 18:51:21.000000000 +0100
+++ new/src/lib/libast/string/strelapsed.c 2010-03-07 09:36:52.000000000 +0100
@@ -128,11 +128,13 @@
v *= 20 * 12 * 4 * 7 * 24 * 60 * 60;
break;
}
- /*FALLTHROUGH*/
- case 0:
v += f;
f = 0;
break;
+ case 0:
+ s--;
+ v += f;
+ break;
default:
if (p)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libast/tm/tvtouch.c new/src/lib/libast/tm/tvtouch.c
--- old/src/lib/libast/tm/tvtouch.c 2008-08-04 08:05:11.000000000 +0200
+++ new/src/lib/libast/tm/tvtouch.c 2010-03-06 10:25:00.000000000 +0100
@@ -70,13 +70,20 @@
* Tv_t==0 uses current time
* Tv_t==TV_TOUCH_RETAIN retains path value if it exists, current time otherwise
* otherwise it is exact time
- * file created if it doesn't exist and (flags&1)
- * symlink not followed if (flags&2)
+ * file created if it doesn't exist and (flags&TV_TOUCH_CREATE)
+ * symlink not followed if (flags&TV_TOUCH_PHYSICAL)
* cv most likely ignored on most implementations
*
- * NOTE: when *at() calls are integrated we need macros for the flags!
+ * NOTE: when *at() calls are integrated TV_TOUCH_* should be advertized!
*/
+#define TV_TOUCH_CREATE 1
+#define TV_TOUCH_PHYSICAL 2
+
+#if !defined(UTIME_NOW) || !defined(UTIME_OMIT) || defined(__stub_utimensat)
+#undef _lib_utimensat
+#endif
+
int
tvtouch(const char* path, register const Tv_t* av, register const Tv_t* mv, const Tv_t* cv, int flags)
{
@@ -84,11 +91,22 @@
int mode;
int oerrno;
struct stat st;
-
-#if _lib_utimensat
+ Tv_t now;
+#if _lib_utimets || _lib_utimensat
struct timespec ts[2];
+#endif
+#if _lib_utimes
+ struct timeval am[2];
+#else
+#if _hdr_utime
+ struct utimbuf am;
+#else
+ time_t am[2];
+#endif
+#endif
- errno = oerrno;
+ oerrno = errno;
+#if _lib_utimensat
if (!av)
{
ts[0].tv_sec = 0;
@@ -121,36 +139,23 @@
}
if (!cv && av == TV_TOUCH_RETAIN && mv == TV_TOUCH_RETAIN && !stat(path, &st) && !chmod(path, st.st_mode & S_IPERM))
return 0;
- if (!utimensat(AT_FDCWD, path, ts[0].tv_nsec == UTIME_NOW && ts[1].tv_nsec == UTIME_NOW ? (struct timespec*)0 : ts, (flags & 2) ? AT_SYMLINK_NOFOLLOW : 0))
+ if (!utimensat(AT_FDCWD, path, ts[0].tv_nsec == UTIME_NOW && ts[1].tv_nsec == UTIME_NOW ? (struct timespec*)0 : ts, (flags & TV_TOUCH_PHYSICAL) ? AT_SYMLINK_NOFOLLOW : 0))
return 0;
- if (errno != ENOENT || !(flags & 1))
- return -1;
- umask(mode = umask(0));
- mode = (~mode) & (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
- if ((fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, mode)) < 0)
- return -1;
- close(fd);
- errno = oerrno;
- if ((ts[0].tv_nsec != UTIME_NOW || ts[1].tv_nsec != UTIME_NOW) && utimensat(AT_FDCWD, path, ts, (flags & 2) ? AT_SYMLINK_NOFOLLOW : 0))
- return -1;
- return 0;
-#else
- Tv_t now;
-#if _lib_utimets
- struct timespec am[2];
-#else
-#if _lib_utimes
- struct timeval am[2];
-#else
-#if _hdr_utime
- struct utimbuf am;
-#else
- time_t am[2];
-#endif
-#endif
+ if (errno != ENOSYS)
+ {
+ if (errno != ENOENT || !(flags & TV_TOUCH_CREATE))
+ return -1;
+ umask(mode = umask(0));
+ mode = (~mode) & (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+ if ((fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, mode)) < 0)
+ return -1;
+ close(fd);
+ errno = oerrno;
+ if ((ts[0].tv_nsec != UTIME_NOW || ts[1].tv_nsec != UTIME_NOW) && utimensat(AT_FDCWD, path, ts, (flags & TV_TOUCH_PHYSICAL) ? AT_SYMLINK_NOFOLLOW : 0))
+ return -1;
+ return 0;
+ }
#endif
-
- oerrno = errno;
if ((av == TV_TOUCH_RETAIN || mv == TV_TOUCH_RETAIN) && stat(path, &st))
{
errno = oerrno;
@@ -170,25 +175,25 @@
#if _lib_utimets
if (av == TV_TOUCH_RETAIN)
{
- am[0].tv_sec = st.st_atime;
- am[0].tv_nsec = ST_ATIME_NSEC_GET(&st);
+ ts[0].tv_sec = st.st_atime;
+ ts[0].tv_nsec = ST_ATIME_NSEC_GET(&st);
}
else
{
- am[0].tv_sec = av->tv_sec;
- am[0].tv_nsec = NS(av->tv_nsec);
+ ts[0].tv_sec = av->tv_sec;
+ ts[0].tv_nsec = NS(av->tv_nsec);
}
if (mv == TV_TOUCH_RETAIN)
{
- am[1].tv_sec = st.st_mtime;
- am[1].tv_nsec = ST_MTIME_NSEC_GET(&st);
+ ts[1].tv_sec = st.st_mtime;
+ ts[1].tv_nsec = ST_MTIME_NSEC_GET(&st);
}
else
{
- am[1].tv_sec = mv->tv_sec;
- am[1].tv_nsec = NS(mv->tv_nsec);
+ ts[1].tv_sec = mv->tv_sec;
+ ts[1].tv_nsec = NS(mv->tv_nsec);
}
- if (!utimets(path, am))
+ if (!utimets(path, ts))
return 0;
if (errno != ENOENT && av == (const Tv_t*)&now && mv == (const Tv_t*)&now && !utimets(path, NiL))
{
@@ -262,7 +267,7 @@
}
}
#endif
- if (errno != ENOENT || !(flags & 1))
+ if (errno != ENOENT || !(flags & TV_TOUCH_CREATE))
return -1;
umask(mode = umask(0));
mode = (~mode) & (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
@@ -286,6 +291,5 @@
#endif
#endif
#endif
-#endif
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libast/vmalloc/vmwalk.c new/src/lib/libast/vmalloc/vmwalk.c
--- old/src/lib/libast/vmalloc/vmwalk.c 2004-04-09 07:38:55.000000000 +0200
+++ new/src/lib/libast/vmalloc/vmwalk.c 2010-03-05 00:08:00.000000000 +0100
@@ -33,11 +33,12 @@
*/
#if __STD_C
-int vmwalk(Vmalloc_t* vm, int(*segf)(Vmalloc_t*, Void_t*, size_t, Vmdisc_t*) )
+int vmwalk(Vmalloc_t* vm, int(*segf)(Vmalloc_t*, Void_t*, size_t, Vmdisc_t*, Void_t*), Void_t* handle )
#else
-int vmwalk(vm, segf)
+int vmwalk(vm, segf, handle)
Vmalloc_t* vm;
int(* segf)(/* Vmalloc_t*, Void_t*, size_t, Vmdisc_t* */);
+Void_t* handle;
#endif
{
reg Seg_t* seg;
@@ -50,7 +51,7 @@
SETLOCK(vm->data,0);
for(seg = vm->data->seg; seg; seg = seg->next)
- { rv = (*segf)(vm, seg->addr, seg->extent, vm->disc);
+ { rv = (*segf)(vm, seg->addr, seg->extent, vm->disc, handle);
if(rv < 0)
return rv;
}
@@ -63,7 +64,7 @@
SETLOCK(vm->data,0);
for(seg = vm->data->seg; seg; seg = seg->next)
- { rv = (*segf)(vm, seg->addr, seg->extent, vm->disc);
+ { rv = (*segf)(vm, seg->addr, seg->extent, vm->disc, handle);
if(rv < 0)
return rv;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libcmd/Makefile new/src/lib/libcmd/Makefile
--- old/src/lib/libcmd/Makefile 2010-01-21 18:15:39.000000000 +0100
+++ new/src/lib/libcmd/Makefile 2010-03-04 23:30:51.000000000 +0100
@@ -24,7 +24,7 @@
getconf.c head.c id.c join.c ln.c logname.c md5sum.c mkdir.c \
mkfifo.c mktemp.c mv.c paste.c pathchk.c pids.c rev.c rm.c \
rmdir.c stty.c sum.c sync.c tail.c tee.c tty.c uname.c uniq.c \
- wc.c revlib.c wclib.c sumlib.o \
+ vmstate.c wc.c revlib.c wclib.c sumlib.o \
fts_fix.c \
-lfsg -lmd
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libcmd/Mamfile new/src/lib/libcmd/Mamfile
--- old/src/lib/libcmd/Mamfile 2010-03-02 10:47:55.000000000 +0100
+++ new/src/lib/libcmd/Mamfile 2010-03-09 18:15:04.000000000 +0100
@@ -1,4 +1,4 @@
-info mam static 00000 1994-07-17 make (AT&T Research) 5.5 2010-02-24
+info mam static 00000 1994-07-17 make (AT&T Research) 5.5 2010-03-09
setv INSTALLROOT ../../..
setv PACKAGE_ast_INCLUDE ${INSTALLROOT}/include/ast
setv PACKAGE_ast_LIB ${INSTALLROOT}/lib
@@ -420,6 +420,10 @@
make uniq.c
prev cmd.h implicit
done uniq.c
+make vmstate.c
+prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
+prev cmd.h implicit
+done vmstate.c
make wc.c
prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
make wc.h implicit
@@ -457,7 +461,7 @@
exec - -e 's/^b_//' \
exec - -e 's/(.*//' \
exec - -e 's/.*/extern int b_&(int, char**, void*);/' \
-exec - cmdinit.c basename.c cat.c chgrp.c chmod.c chown.c cksum.c cmp.c comm.c cp.c cut.c dirname.c date.c expr.c fds.c fmt.c fold.c getconf.c head.c id.c join.c ln.c logname.c md5sum.c mkdir.c mkfifo.c mktemp.c mv.c paste.c pathchk.c pids.c rev.c rm.c rmdir.c stty.c sum.c sync.c tail.c tee.c tty.c uname.c uniq.c wc.c revlib.c wclib.c fts_fix.c |
+exec - cmdinit.c basename.c cat.c chgrp.c chmod.c chown.c cksum.c cmp.c comm.c cp.c cut.c dirname.c date.c expr.c fds.c fmt.c fold.c getconf.c head.c id.c join.c ln.c logname.c md5sum.c mkdir.c mkfifo.c mktemp.c mv.c paste.c pathchk.c pids.c rev.c rm.c rmdir.c stty.c sum.c sync.c tail.c tee.c tty.c uname.c uniq.c vmstate.c wc.c revlib.c wclib.c fts_fix.c |
exec - sort -u
exec - } > 1.${COTEMP}.h
exec - if cmp 2>/dev/null -s 1.${COTEMP}.h cmdext.h
@@ -724,6 +728,12 @@
prev uniq.c
exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler ][-author?David Korn ][-copyright?Copyright (c) 1992-2010 AT&T Intellectual Property][-license?http://www.opensource.org/licenses/cpl1.0.txt][--catalog?libcmd]"\" -c uniq.c
done uniq.o generated
+make vmstate.o
+prev vmstate.c
+meta vmstate.o %.c>%.o vmstate.c vmstate
+prev vmstate.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_PACKAGE_ast -D_BLD_cmd -DUSAGE_LICENSE=\""[-author?Glenn Fowler ][-author?David Korn ][-copyright?Copyright (c) 1992-2010 AT&T Intellectual Property][-license?http://www.opensource.org/licenses/cpl1.0.txt][--catalog?libcmd]"\" -c vmstate.c
+done vmstate.o generated
make wc.o
prev wc.c
meta wc.o %.c>%.o wc.c wc
@@ -753,7 +763,7 @@
exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c fts_fix.c
done fts_fix.o generated
exec - ${AR} -cr libcmd.a cmdinit.o basename.o cat.o chgrp.o chmod.o chown.o cksum.o cmp.o comm.o cp.o cut.o dirname.o date.o expr.o fds.o fmt.o fold.o getconf.o head.o id.o join.o ln.o logname.o md5sum.o mkdir.o mkfifo.o mktemp.o mv.o paste.o pathchk.o
-exec - ${AR} -cr libcmd.a pids.o rev.o rm.o rmdir.o stty.o sum.o sync.o tail.o tee.o tty.o uname.o uniq.o wc.o revlib.o wclib.o sumlib.o fts_fix.o
+exec - ${AR} -cr libcmd.a pids.o rev.o rm.o rmdir.o stty.o sum.o sync.o tail.o tee.o tty.o uname.o uniq.o vmstate.o wc.o revlib.o wclib.o sumlib.o fts_fix.o
exec - (ranlib libcmd.a) >/dev/null 2>&1 || true
done libcmd.a generated
done cmd virtual
@@ -816,7 +826,7 @@
exec - -e 's/^b_//' \
exec - -e 's/(.*//' \
exec - -e 's/.*/CMDLIST(&)/' \
-exec - cmdinit.c basename.c cat.c chgrp.c chmod.c chown.c cksum.c cmp.c comm.c cp.c cut.c dirname.c date.c expr.c fds.c fmt.c fold.c getconf.c head.c id.c join.c ln.c logname.c md5sum.c mkdir.c mkfifo.c mktemp.c mv.c paste.c pathchk.c pids.c rev.c rm.c rmdir.c stty.c sum.c sync.c tail.c tee.c tty.c uname.c uniq.c wc.c revlib.c wclib.c fts_fix.c |
+exec - cmdinit.c basename.c cat.c chgrp.c chmod.c chown.c cksum.c cmp.c comm.c cp.c cut.c dirname.c date.c expr.c fds.c fmt.c fold.c getconf.c head.c id.c join.c ln.c logname.c md5sum.c mkdir.c mkfifo.c mktemp.c mv.c paste.c pathchk.c pids.c rev.c rm.c rmdir.c stty.c sum.c sync.c tail.c tee.c tty.c uname.c uniq.c vmstate.c wc.c revlib.c wclib.c fts_fix.c |
exec - sort -u
exec - } > 1.${COTEMP}.h
exec - if cmp 2>/dev/null -s 1.${COTEMP}.h cmdlist.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libcmd/RELEASE new/src/lib/libcmd/RELEASE
--- old/src/lib/libcmd/RELEASE 2010-01-26 23:05:46.000000000 +0100
+++ new/src/lib/libcmd/RELEASE 2010-03-07 17:46:13.000000000 +0100
@@ -1,3 +1,6 @@
+10-03-07 tail.c: sfsync(sfstdout) after all -f done, fix -f partial line
+10-03-05 mktemp.c: add --regress=seed for testing
+10-03-05 vmstate.c: add
10-01-26 tail.c: -f sleep(1) only if no progress from last round of checks
10-01-20 fts_fix.[ch]: use instead of (see fts_fix.c)
10-01-20 cp.c: free(state) if called from old shell
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libcmd/mktemp.c new/src/lib/libcmd/mktemp.c
--- old/src/lib/libcmd/mktemp.c 2009-06-19 16:35:51.000000000 +0200
+++ new/src/lib/libcmd/mktemp.c 2010-03-05 18:44:48.000000000 +0100
@@ -21,7 +21,7 @@
#pragma prototyped
static const char usage[] =
-"[-?\n@(#)$Id: mktemp (AT&T Research) 2009-06-19 $\n]"
+"[-?\n@(#)$Id: mktemp (AT&T Research) 2010-03-05 $\n]"
USAGE_LICENSE
"[+NAME?mktemp - make temporary file or directory]"
"[+DESCRIPTION?\bmktemp\b creates a temporary file with optional base "
@@ -34,12 +34,12 @@
"{"
"[+*?Lower case to avoid clashes on case ignorant filesystems.]"
"[+*?Pseudo-random part to deter denial of service attacks.]"
- "[+*?Pseudo-random part is \a3-chars\a.\a3-chars\a to accomodate "
- "8.3 filesystems.]"
+ "[+*?Default pseudo-random part (no specific \bX...\b template) "
+ "formatted to accomodate 8.3 filesystems.]"
"}"
-"[+?A consecutive sequence of \bX\b's in \aprefix\a is replaced by the "
- "pseudo-random part. If there are no \bX\b's then the pseudo-random part "
- "is appended to the prefix.]"
+"[+?A consecutive trailing sequence of \bX\b's in \aprefix\a is replaced "
+ "by the pseudo-random part. If there are no \bX\b's then the "
+ "pseudo-random part is appended to the prefix.]"
"[d:directory?Create a directory instead of a regular file.]"
"[m:mode]:[mode?Set the mode of the created temporary to \amode\a. "
"\amode\a is symbolic or octal mode as in \bchmod\b(1). Relative modes "
@@ -47,10 +47,13 @@
"[p:default?Use \adirectory\a if the \bTMPDIR\b environment variable is "
"not defined. Implies \b--tmp\b.]:[directory]"
"[q:quiet?Suppress file and directory error diagnostics.]"
+"[R:regress?The pseudo random generator is seeded with \aseed\a instead "
+ "of process/system specific transient data. Use for testing "
+ "only. A seed of \b0\b is silently changed to \b1\b.]#[seed]"
"[t:tmp|temporary-directory?Create a path rooted in a temporary "
"directory.]"
"[u:unsafe|dry-run?Check for file/directory existence but do not create. "
- "Who would want to do that.]"
+ "Use this for testing only.]"
"\n"
"\n[ prefix ]\n"
"\n"
@@ -106,6 +109,10 @@
unsafe = 1;
fdp = 0;
continue;
+ case 'R':
+ if (!pathtemp(NiL, 0, opt_info.arg, "/seed", NiL))
+ error(2, "%s: regression test initializtion failed", opt_info.arg);
+ continue;
case ':':
error(2, "%s", opt_info.arg);
continue;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libcmd/tail.c new/src/lib/libcmd/tail.c
--- old/src/lib/libcmd/tail.c 2010-01-26 23:10:19.000000000 +0100
+++ new/src/lib/libcmd/tail.c 2010-03-07 17:35:37.000000000 +0100
@@ -28,7 +28,7 @@
*/
static const char usage[] =
-"+[-?\n@(#)$Id: tail (AT&T Research) 2010-01-26 $\n]"
+"+[-?\n@(#)$Id: tail (AT&T Research) 2010-03-07 $\n]"
USAGE_LICENSE
"[+NAME?tail - output trailing portion of one or more files ]"
"[+DESCRIPTION?\btail\b copies one or more input files to standard output "
@@ -515,7 +515,7 @@
flags |= TIMEOUT;
timeout = strelapsed(opt_info.arg, &s, 1);
if (*s)
- error(ERROR_exit(1), "%s: invalid elapsed time", opt_info.arg);
+ error(ERROR_exit(1), "%s: invalid elapsed time [%s]", opt_info.arg, s);
continue;
case 'v':
flags |= VERBOSE;
@@ -636,8 +636,6 @@
n = 1;
while (fp = files)
{
- if (sfsync(sfstdout))
- error(ERROR_system(1), "write error");
if (n)
n = 0;
else
@@ -673,7 +671,7 @@
}
else
w = 0;
- sfread(fp->sp, s, z);
+ sfread(fp->sp, s, w);
}
goto next;
}
@@ -701,14 +699,16 @@
sfclose(fp->sp);
if (pp)
pp = pp->next = fp->next;
- else if (!(files = files->next))
- return error_info.errors != 0;
+ else
+ files = files->next;
fp = fp->next;
continue;
next:
pp = fp;
fp = fp->next;
}
+ if (sfsync(sfstdout))
+ error(ERROR_system(1), "write error");
}
}
else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libcmd/uname.c new/src/lib/libcmd/uname.c
--- old/src/lib/libcmd/uname.c 2009-01-29 20:02:34.000000000 +0100
+++ new/src/lib/libcmd/uname.c 2010-03-04 22:26:49.000000000 +0100
@@ -34,7 +34,7 @@
"[+DESCRIPTION?By default \buname\b writes the operating system name to"
" standard output. When options are specified, one or more"
" system characteristics are written to standard output, space"
-" separated, on a single line. When more than one option is specifed"
+" separated, on a single line. When more than one option is specified"
" the output is in the order specfied by the \b-A\b option below."
" Unsupported option values are listed as \a[option]]\a. If any unknown"
" options are specified then the local \b/usr/bin/uname\b is called.]"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libcmd/vmstate.c new/src/lib/libcmd/vmstate.c
--- old/src/lib/libcmd/vmstate.c 1970-01-01 01:00:00.000000000 +0100
+++ new/src/lib/libcmd/vmstate.c 2010-03-05 20:49:55.000000000 +0100
@@ -0,0 +1,163 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* and is licensed under the *
+* Common Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.opensource.org/licenses/cpl1.0.txt *
+* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler *
+* David Korn *
+* *
+***********************************************************************/
+#pragma prototyped
+
+#define FORMAT "region=%(region)p size=%(size)d segments=%(segments)d busy=(%(busy_size)d,%(busy_blocks)d,%(busy_max)d) free=(%(free_size)d,%(free_blocks)d,%(free_max)d)"
+
+static const char usage[] =
+"[-?\n@(#)$Id: vmstate (AT&T Research) 2010-03-05 $\n]"
+USAGE_LICENSE
+"[+NAME?vmstate - list the calling process vmalloc region state]"
+"[+DESCRIPTION?When invoked as a shell builtin, \bvmstate\b lists the "
+ "calling process \bvmalloc\b(3) state for all regions.]"
+"[f:format?List the ids specified by \aformat\a. \aformat\a follows "
+ "\bprintf\b(3) conventions, except that \bsfio\b(3) inline ids are used "
+ "instead of arguments: "
+ "%[-+]][\awidth\a[.\aprecis\a[.\abase\a]]]]]](\aid\a)\achar\a. The "
+ "supported \aid\as are:]:[format:=" FORMAT "]"
+ "{"
+ "[+size?The total region size.]"
+ "[+segments?The number of segments in the region.]"
+ "[+busy_size?The total busy block size.]"
+ "[+busy_blocks?The number of busy blocks.]"
+ "[+busy_max?The maximum busy block size.]"
+ "[+free_size?The total free block size.]"
+ "[+free_blocks?The number of free blocks.]"
+ "[+free_max?The maximum free block size.]"
+ "}"
+"[+SEE ALSO?\bvmalloc\b(3)]"
+;
+
+#include
+#include
+
+typedef struct State_s
+{
+ char* format;
+ Vmalloc_t* vm;
+ Vmstat_t vs;
+ unsigned int regions;
+ Vmalloc_t* region[256];
+} State_t;
+
+/*
+ * sfkeyprintf() lookup
+ * handle==0 for heading
+ */
+
+static int
+key(void* handle, Sffmt_t* fp, const char* arg, char** ps, Sflong_t* pn)
+{
+ register State_t* state = (State_t*)handle;
+ register char* s;
+
+ if (!(s = fp->t_str) || streq(s, "size"))
+ *pn = state->vs.extent;
+ else if (streq(s, "region"))
+ *pn = integralof(state->vm);
+ else if (streq(s, "segments"))
+ *pn = state->vs.n_seg;
+ else if (streq(s, "busy_size"))
+ *pn = state->vs.s_busy;
+ else if (streq(s, "busy_blocks"))
+ *pn = state->vs.n_busy;
+ else if (streq(s, "busy_max"))
+ *pn = state->vs.m_busy;
+ else if (streq(s, "free_size"))
+ *pn = state->vs.s_free;
+ else if (streq(s, "free_blocks"))
+ *pn = state->vs.n_free;
+ else if (streq(s, "free_max"))
+ *pn = state->vs.m_free;
+ else if (streq(s, "format"))
+ *ps = (char*)state->format;
+ else
+ {
+ error(2, "%s: unknown format identifier", s);
+ return 0;
+ }
+ return 1;
+}
+
+static int
+visit(Vmalloc_t* vm, void* addr, size_t size, Vmdisc_t* disc, void* handle)
+{
+ State_t* state = (State_t*)handle;
+ Vmstat_t vs;
+
+ if (vm != state->vm)
+ {
+ state->vm = vm;
+ if (state->regions < elementsof(state->region))
+ state->region[state->regions++] = vm;
+ }
+ return 0;
+}
+
+int
+b_vmstate(int argc, char** argv, void* context)
+{
+ register int i;
+ State_t state;
+
+ memset(&state, 0, sizeof(state));
+ cmdinit(argc, argv, context, ERROR_CATALOG, 0);
+ for (;;)
+ {
+ switch (optget(argv, usage))
+ {
+ case 'f':
+ state.format = opt_info.arg;
+ continue;
+ case '?':
+ error(ERROR_USAGE|4, "%s", opt_info.arg);
+ continue;
+ case ':':
+ error(2, "%s", opt_info.arg);
+ continue;
+ }
+ break;
+ }
+ argv += opt_info.index;
+ if (error_info.errors || *argv)
+ error(ERROR_USAGE|4, "%s", optusage(NiL));
+ if (!state.format)
+ state.format = FORMAT;
+
+ /*
+ * the walk must do no allocations because it locks the regions
+ */
+
+ vmwalk(NiL, visit, &state);
+
+ /*
+ * now we can compute and list the state of each region
+ */
+
+ for (i = 0; i < state.regions; i++)
+ {
+ state.vm = state.region[i];
+ vmstat(state.vm, &state.vs);
+ sfkeyprintf(sfstdout, &state, state.format, key, NiL);
+ sfprintf(sfstdout, "\n");
+ }
+ return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libdll/Mamfile new/src/lib/libdll/Mamfile
--- old/src/lib/libdll/Mamfile 2010-03-02 10:47:56.000000000 +0100
+++ new/src/lib/libdll/Mamfile 2010-03-09 18:15:05.000000000 +0100
@@ -1,4 +1,4 @@
-info mam static 00000 1994-07-17 make (AT&T Research) 5.5 2010-02-24
+info mam static 00000 1994-07-17 make (AT&T Research) 5.5 2010-03-09
setv INSTALLROOT ../../..
setv PACKAGE_ast_INCLUDE ${INSTALLROOT}/include/ast
setv PACKAGE_ast_LIB ${INSTALLROOT}/lib
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/libsum/Mamfile new/src/lib/libsum/Mamfile
--- old/src/lib/libsum/Mamfile 2010-03-02 10:47:56.000000000 +0100
+++ new/src/lib/libsum/Mamfile 2010-03-09 18:15:05.000000000 +0100
@@ -1,4 +1,4 @@
-info mam static 00000 1994-07-17 make (AT&T Research) 5.5 2010-02-24
+info mam static 00000 1994-07-17 make (AT&T Research) 5.5 2010-03-09
setv INSTALLROOT ../../..
setv PACKAGE_ast_INCLUDE ${INSTALLROOT}/include/ast
setv PACKAGE_ast_LIB ${INSTALLROOT}/lib
++++++ rpmlintrc ++++++
--- /var/tmp/diff_new_pack.zI6yQu/_old 2010-03-12 17:34:45.000000000 +0100
+++ /var/tmp/diff_new_pack.zI6yQu/_new 2010-03-12 17:34:45.000000000 +0100
@@ -2,5 +2,5 @@
addFilter(".*binary-or-shlib-defines-rpath.*/lib/ast/bin/shcomp.*")
addFilter(".*binary-or-shlib-defines-rpath.*/lib/ast/bin/ksh.*")
addFilter(".*devel-file-in-non-devel-package.*/lib/ast/.*\.so")
-addFilter(".*script-without-shebang.*//usr/share/ksh/fun/.*")
+addFilter(".*script-without-shebang.*/usr/share/ksh/fun/.*")
addFilter(".*no-rpm-opt-flags.*ldtest.c.*")
++++++ sigexec.c ++++++
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#include
#include
int main(int argc, char* argv[])
{
struct sigaction sa;
sa.sa_flags = SA_RESTART;
sa.sa_handler = SIG_DFL;
sigemptyset (&sa.sa_mask);
sigaction(SIGPIPE, &sa, (struct sigaction*)0);
sigaction(SIGQUIT, &sa, (struct sigaction*)0);
return execv(argv[0], &argv[1]);
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org