OBS User unknown 2007-01-12 16:45:13 +00:00 committed by Git OBS Bridge
commit db190d44ca
23 changed files with 1876 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

2
Agreement Normal file
View File

@ -0,0 +1,2 @@
User: `I accept www.opensource.org/licenses/cpl'
Password: `.'

3
INIT.2006-02-14.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e69bbadaceefe3db263fde8f3d8257879150e4ac361fbcebacb78b332ad827ff
size 232738

25
Warning Normal file
View File

@ -0,0 +1,25 @@
GPL 1.0/2.0 versus CPL1.0
=========================
According to http://www.gnu.org/licenses/license-list.html
the current CPL-1.0 is incompatible with the GPL.
Therefore no developer should use the libraries provided
by the ksh in any project under the GPL.
For compiling use
-I/usr/include/ast
on the gcc compiler command line. For linking please
add the line
-L/usr/lib/ast
or
-L/usr/lib64/ast
on 64bit architectures to the command line of the
linker or gcc.

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c07d963856119c9b53446106e6128a3c716511d0596f7adfb373f9d8b7260a23
size 1254637

94
ksh-qemu.patch Normal file
View File

@ -0,0 +1,94 @@
--- src/lib/libast/features/lib
+++ src/lib/libast/features/lib
@@ -86,27 +86,6 @@
}
}end
-tst lib_poll_fd_2 note{ fd is second arg to poll() }end execute{
- #include <poll.h>
- _BEGIN_EXTERNS_
- extern int pipe _ARG_((int*));
- _END_EXTERNS_
- int
- main()
- { int rw[2];
- struct pollfd fd;
- if (pipe(rw) < 0) return 1;
- fd.fd = rw[0];
- fd.events = POLLIN;
- fd.revents = 0;
- return poll(1, &fd, 0) < 0;
- if (poll(1, &fd, 0) < 0 || fd.revents != 0) return 1;
- if (write(rw[1], "x", 1) != 1) return 1;
- if (poll(1, &fd, 0) < 0 || fd.revents == 0) return 1;
- return 0;
- }
-}end
-
exp _lib_poll _lib_poll_fd_1||_lib_poll_fd_2
tst lib_poll_notimer note{ poll with no fds ignores timeout }end execute{
@@ -220,63 +199,6 @@
}
}end
-tst lib_posix_spawn unistd.h stdlib.h spawn.h note{ posix_spawn exists and it works and its worth using }end execute{
- #include <spawn.h>
- #include <signal.h>
- #include <stdio.h>
- /* if it uses fork() why bother? */
- int fork() { return -1; }
- int _fork() { return -1; }
- int __fork() { return -1; }
- int
- main(argc, argv)
- int argc;
- char** argv;
- {
- char* s;
- pid_t pid;
- posix_spawnattr_t attr;
- int n;
- int status;
- char* cmd[3];
- char tmp[1024];
- if (argv[1])
- _exit(signal(SIGHUP, SIG_DFL) != SIG_IGN);
- signal(SIGHUP, SIG_IGN);
- if (posix_spawnattr_init(&attr))
- _exit(1);
- if (posix_spawnattr_setpgroup(&attr, 0))
- _exit(1);
- /* first try an a.out and verify that SIGHUP is ignored */
- cmd[0] = argv[0];
- cmd[1] = "test";
- cmd[2] = 0;
- if (posix_spawn(&pid, cmd[0], 0, &attr, cmd, 0))
- _exit(1);
- status = 1;
- if (wait(&status) < 0 || status != 0)
- _exit(1);
- /* passing ENOEXEC to the shell is bogus */
- n = strlen(cmd[0]);
- if (n >= (sizeof(tmp) - 3))
- _exit(1);
- strcpy(tmp, cmd[0]);
- tmp[n] = '.';
- tmp[n+1] = 's';
- tmp[n+2] = 'h';
- tmp[n+3] = 0;
- if (close(creat(tmp, 0777)) < 0 || chmod(tmp, 0777) < 0)
- _exit(1);
- cmd[0] = tmp;
- if (!posix_spawn(&pid, cmd[0], 0, &attr, cmd, 0))
- {
- wait(&status);
- _exit(1);
- }
- _exit(0);
- }
-}end
-
tst lib_spawn_mode unistd.h stdlib.h note{ first spawn arg is mode and it works }end execute{
#include <signal.h>
#include <process.h>

186
ksh.changes Normal file
View File

@ -0,0 +1,186 @@
-------------------------------------------------------------------
Fri Jan 12 14:08:55 CET 2007 - werner@suse.de
- Do not use binary OR instead of a logic OR (#233299)
- Help the compile time and run time linker (#233299)
-------------------------------------------------------------------
Mon Nov 20 14:58:06 CET 2006 - werner@suse.de
- Avoid that a sub shell close required file descriptors (#222411)
-------------------------------------------------------------------
Fri Nov 10 17:00:07 CET 2006 - werner@suse.de
- On ia64 a cast of an integer to a character pointer and back to
an long integer may results into an unaligned access, fix this
in the SIGWINCH handler (bug #209643)
-------------------------------------------------------------------
Tue Nov 7 01:07:46 CET 2006 - ro@suse.de
- fix permissions for manpages
-------------------------------------------------------------------
Mon Jul 10 11:32:18 CEST 2006 - werner@suse.de
- Don't trim backslash part of a multibyte character away (#189239)
-------------------------------------------------------------------
Tue Jul 4 12:53:42 CEST 2006 - werner@suse.de
- Builtin cut: allow last line without newline (#189231)
- Utility shcomp: fix segfault and install it (#189778)
-------------------------------------------------------------------
Tue Jun 27 12:07:21 CEST 2006 - werner@suse.de
- No segmentation fault if ksh uses shared command libray (#188404)
-------------------------------------------------------------------
Tue Jun 20 16:23:49 CEST 2006 - werner@suse.de
- Make it build even on new beta with new glibc headers
-------------------------------------------------------------------
Wed May 31 17:18:43 CEST 2006 - werner@suse.de
- Fix segmentation fault in vi command line mode (bug #179917)
-------------------------------------------------------------------
Mon May 29 15:16:03 CEST 2006 - werner@suse.de
- Make -i and -p option of uname builtin work (bug #178962)
-------------------------------------------------------------------
Tue May 9 11:39:59 CEST 2006 - werner@suse.de
- Change PreRequire /bin/bash to /etc/bash.bashrc (bug #172633)
-------------------------------------------------------------------
Mon May 8 12:54:39 CEST 2006 - werner@suse.de
- Correct order of souring order of the users profile and the
system kshrc files (bug #172708)
-------------------------------------------------------------------
Wed Apr 19 19:24:50 CEST 2006 - werner@suse.de
- Do not source system rc files if ksh is not interactive
- Correct string from GMT to UTC for Universal Time Coordinates
-------------------------------------------------------------------
Wed Apr 19 12:32:27 CEST 2006 - werner@suse.de
- Fix the patch for the multi byte characters (bug #163665)
-------------------------------------------------------------------
Tue Apr 18 18:10:56 CEST 2006 - werner@suse.de
- Fix multi byte handling even for command line mode emacs/vi
-------------------------------------------------------------------
Thu Apr 6 16:42:10 CEST 2006 - werner@suse.de
- Handle multi byte characters within macro expansion (bug #163665)
-------------------------------------------------------------------
Mon Mar 27 16:23:05 CEST 2006 - werner@suse.de
- Update to ksh 93r
-------------------------------------------------------------------
Wed Jan 25 21:37:15 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Tue Dec 20 11:46:03 CET 2005 - werner@suse.de
- Move manual pages of libast to an own subsection 3ast (#140295)
-------------------------------------------------------------------
Fri Dec 16 18:31:22 CET 2005 - werner@suse.de
- Make it build even with bash 3.1 and gcc 4.1.0
-------------------------------------------------------------------
Thu Nov 17 13:01:47 CET 2005 - uli@suse.de
- disabled some tests on ARM (occasionally hang QEMU)
-------------------------------------------------------------------
Mon Oct 24 17:46:03 CEST 2005 - werner@suse.de
- PreReqire the bash to get the system wide bash.bashrc
-------------------------------------------------------------------
Mon Sep 19 17:26:30 CEST 2005 - werner@suse.de
- Make it compatible with parallel installed pdksh (bug #105126)
-------------------------------------------------------------------
Mon Sep 19 16:01:55 CEST 2005 - werner@suse.de
- Avoid useless gcc warning of autogenerated sources
-------------------------------------------------------------------
Tue Aug 16 15:57:40 CEST 2005 - werner@suse.de
- Move to group System/Shells (bug #104920)
-------------------------------------------------------------------
Wed Apr 13 18:10:15 CEST 2005 - werner@suse.de
- Make it compile with gcc4
-------------------------------------------------------------------
Thu Mar 24 16:48:37 CET 2005 - werner@suse.de
- Correct initialization for got_sigwinch variable
-------------------------------------------------------------------
Wed Mar 23 17:35:12 CET 2005 - werner@suse.de
- Update to release date 2005-02-02 (bug #18698, bug #74348)
-------------------------------------------------------------------
Wed Mar 9 11:24:08 CET 2005 - werner@suse.de
- Fix dead link in documentation (bug #71733)
-------------------------------------------------------------------
Fri Feb 4 15:46:53 CET 2005 - werner@suse.de
- More on winsize changes: now it works after a new prompt
just like in the pdksh.
-------------------------------------------------------------------
Fri Feb 4 00:30:21 CET 2005 - schwab@suse.de
- Workaround broken build system and enable building shared libraries on
x86-64.
-------------------------------------------------------------------
Thu Feb 3 18:28:51 CET 2005 - werner@suse.de
- Do not build shared version on x64_86 the ELF macro R_X64_86_32S
breaks that a local symbol
- Make it work on s390x
-------------------------------------------------------------------
Thu Feb 3 13:30:44 CET 2005 - werner@suse.de
- Make winsize changes work
- Enable /etc/ksh.kshrc support
- lchmod is not implemented under Linux
- error_exit does never return
- Enable shared libraries instead of the static ones
- Add a warning about CPL versus GPL
-------------------------------------------------------------------
Wed Feb 2 19:14:49 CET 2005 - werner@suse.de
- Initial version of the AT&T ksh now under CPL1.0 (bug #3698)
-------------------------------------------------------------------

341
ksh.spec Normal file
View File

@ -0,0 +1,341 @@
#
# spec file for package ksh (Version 93r)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: ksh
URL: http://www.research.att.com/~gsf/download/
License: Other License(s), see package
Group: System/Shells
PreReq: /bin/ln /etc/bash.bashrc
Autoreqprov: on
Version: 93r
Release: 46
Summary: Korn Shell
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: INIT.2006-02-14.tar.bz2
Source1: ast-ksh.2006-02-14.tar.bz2
Source2: Agreement
Source3: Warning
Patch: ksh93.dif
Patch1: workaround-stupid-build-system.diff
Patch2: ksh-qemu.patch
Patch3: ksh93-shift_ijs.dif
Patch4: ksh93-gmt2utc.dif
Patch5: ksh93-uname.dif
Patch6: ksh93-vi.dif
Patch7: ksh93-profile.dif
Patch8: ksh93-splice.dif
Patch9: ksh93-cut.dif
Patch10: ksh93-shcomp.dif
Patch11: ksh93-unaligned.dif
Patch12: ksh93-subshell_close_fd.patch
Patch13: ksh93-test.dif
%description
The original Korn Shell. The ksh is an sh-compatible command
interpreter that executes commands read from standard input or from a
file.
Authors:
--------
David Korn <dgk@research.att.com>
Glenn Fowler <gsf@research.att.com>
Phong Vo <kpv@research.att.com>
%package -n ksh-devel
Summary: Korn Shell development environment
Group: Development/Libraries/C and C++
Autoreqprov: on
%description -n ksh-devel
The package includes C header files and the static libraries together
with the shared libraries for linking with other projects. Please be
aware that the CPL licensed code can not be used within GPL licensed
project.
Authors:
--------
David Korn <dgk@research.att.com>
Glenn Fowler <gsf@research.att.com>
Phong Vo <kpv@research.att.com>
%prep
%setup -n ksh93 -c -a 0 -a 1
%patch
%patch1
%ifarch %arm
%patch2
%endif
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9
%patch10
%ifarch ia64
%patch11
%endif
%patch12
%patch13
%build
#
# If _you_ are knowing how to fix this in the autogenerated
# sources of ksh/ast without breaking them, then let me know.
#
IGNORE="-Wno-missing-braces -Wno-unknown-pragmas -Wno-parentheses"
IGNORE="$IGNORE -Wno-char-subscripts -Wno-uninitialized -Wno-implicit"
#
#
FEATURE="-DSHOPT_SYSRC=1 -DSHOPT_REMOTE=1 -DSHOPT_CMDLIB_BLTIN=1"
#
#
CCFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fno-strict-aliasing -g -pipe $IGNORE $FEATURE"
LDFLAGS="-lm"
HOSTTYPE=${RPM_ARCH%%*-linux*}
CC=gcc
mam_cc_L=use
export CCFLAGS LDFLAGS CC mam_cc_L
bin/package make
root=$(echo ${PWD}/arch/linux*)
test -d $root || exit 1
log=${root}/lib/package/gen/make.out
test -s $log || exit 1
for lib in libast libcmd libdll libshell ; do
obj=$(grep -E "ar *cr *${lib}.a" $log | sed "s@+ *ar *cr *${lib}.a@@")
test $? -eq 0 || exit 1
case "$lib" in
libshell)
base=src/cmd/ksh93
vers=$(grep ^VERSION ${base}/Makefile | sed "s@.*\([0-9]\+\.[0-9]\+\).*@\1@")
link="-L${root}/lib/ -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast -ldll -lcmd -last -lm -ldl"
;;
libdll)
base=src/lib/$lib
vers=$(grep :LIBRARY: ${base}/Makefile | sed "s@.*\([0-9]\+\.[0-9]\+\).*@\1@")
link="-L${root}/lib/ -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast -ldl -last"
;;
libcmd)
base=src/lib/$lib
vers=$(grep :LIBRARY: ${base}/Makefile | sed "s@.*\([0-9]\+\.[0-9]\+\).*@\1@")
link="-L${root}/lib/ -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast -last"
;;
libast)
base=src/lib/$lib
vers=$(grep :LIBRARY: ${base}/Makefile | sed "s@.*\([0-9]\+\.[0-9]\+\).*@\1@")
link="-L${root}/lib/ -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast"
;;
esac
soname="-Wl,-soname,${lib}.so.${vers%.*},-stats"
pushd ${root}/${base}
$CC -shared $soname -o ${root}/lib/${lib}.so.${vers} ${obj} $link
ln -sf ${lib}.so.${vers} ${root}/lib/${lib}.so.${vers%.*}
ln -sf ${lib}.so.${vers} ${root}/lib/${lib}.so
popd
done
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@+ cc@gcc@;s@-o ksh@-o ${root}/bin/ksh@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g")
shcomp=$(grep -e '-o shcomp' $log | tail -n 1 |\
sed "s@+ cc@gcc@;s@-o shcomp@-o ${root}/bin/shcomp@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g")
${ksh} -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast
${shcomp} -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast
pushd ${test}
sleep 5
LD_LIBRARY_PATH=${root}/lib SHELL=${root}/bin/ksh ${root}/bin/ksh shtests
popd
pushd ${root}/bin
set -- $(LD_LIBRARY_PATH=${root}/lib PATH=$PATH:. shcomp --version 2>&1)
eval version=\${$#}
LD_LIBRARY_PATH=${root}/lib PATH=$PATH:. shcomp --nroff 2>&1 | \
sed 's/\(\.TH .*\)/\1 "2003-03-02" "" "Korn shell utilities"/' > ../man/man1/shcomp.1
popd
popd
%install
root=$(echo ${PWD}/arch/linux*)
test -d $root || exit 1
pushd $root || exit 1
mkdir -p ${RPM_BUILD_ROOT}/bin
mkdir -p ${RPM_BUILD_ROOT}/usr/bin
mkdir -p ${RPM_BUILD_ROOT}/usr/include/ast
mkdir -p ${RPM_BUILD_ROOT}/%{_lib}/ast
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/ast
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}
mkdir ${RPM_BUILD_ROOT}%{_mandir}/man1
mkdir ${RPM_BUILD_ROOT}%{_mandir}/man3
install bin/ksh ${RPM_BUILD_ROOT}/%{_lib}/ast/
install bin/shcomp ${RPM_BUILD_ROOT}/%{_lib}/ast/
ln -sf /bin/true ${RPM_BUILD_ROOT}/bin/ksh
ln -sf /bin/true ${RPM_BUILD_ROOT}/usr/bin/ksh
ln -sf /%{_lib}/ast/ksh ${RPM_BUILD_ROOT}/usr/bin/rksh
ln -sf /%{_lib}/ast/shcomp ${RPM_BUILD_ROOT}/usr/bin/shcomp
cp -a lib/*.so.* ${RPM_BUILD_ROOT}/%{_lib}/ast/
for so in ${RPM_BUILD_ROOT}/%{_lib}/ast/*.so.*.* ; do
so=${so##*/}
ln -sf /%{_lib}/ast/$so ${RPM_BUILD_ROOT}%{_libdir}/ast/${so%%%%.*}.so
done
rm -f ${RPM_BUILD_ROOT}%{_libdir}/ast/*.so.*
install lib/*.a ${RPM_BUILD_ROOT}%{_libdir}/ast/
install -m644 man/man1/sh.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/ksh.1
install -m644 man/man1/shcomp.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/shcomp.1
for man in man/man3/*.3 ; do
man=${man##*/}
ast=${man}ast
install -m644 man/man3/${man} ${RPM_BUILD_ROOT}%{_mandir}/man3/${ast}
done
install include/ast/* ${RPM_BUILD_ROOT}/usr/include/ast/
popd
cp lib/package/LICENSES/ast LICENSE
mv src/cmd/ksh93/OBSOLETE src/cmd/ksh93/OBSOLETE.mm
cat src/cmd/ksh93/builtins.mm | sed 's/\\f5/\\fB/g;s/^\.H/\.P\n\.H/g' | troff -Tascii8 -t -mm | grotty -bou > Builtins
cat src/cmd/ksh93/PROMO.mm | sed 's/\\f5/\\fB/g;s/^\.H/\.P\n\.H/g' | troff -Tascii8 -t -mm | grotty -bou > PROMO
cat src/cmd/ksh93/OBSOLETE.mm | sed 's/\\f5/\\fB/g;s/^\.H/\.P\n\.H/g' | troff -Tascii8 -t -mm | grotty -bou > OBSOLETE
cat src/cmd/ksh93/sh.memo | sed 's/\\f5/\\fB/g;s/^\.H/\.P\n\.H/g' | troff -Tascii8 -t -mm | grotty -bou > MEMORANDUM
cp %{SOURCE3} .
%post
test -e etc/bash.bashrc && ln -sf bash.bashrc etc/ksh.kshrc || true
if test -x %{_lib}/ast/ksh ; then
rm -f bin/ksh
ln -sf /%{_lib}/ast/ksh bin/ksh
rm -f usr/bin/ksh
ln -sf /%{_lib}/ast/ksh usr/bin/ksh
fi
%postun
if test ! -x %{_lib}/ast/ksh ; then
if test ! -x bin/pdksh ; then
rm -f etc/ksh.kshrc
fi
if test ! -e bin/ksh ; then
rm -f bin/ksh usr/bin/ksh
fi
fi
%files
%defattr(-,root,root)
%doc LICENSE src/cmd/ksh93/COMPATIBILITY src/cmd/ksh93/RELEASE*
%doc Builtins PROMO OBSOLETE MEMORANDUM
%doc %{_mandir}/man1/*.1.gz
%ghost %verify(not link) /bin/ksh
%ghost %verify(not link) /usr/bin/ksh
/usr/bin/rksh
/usr/bin/shcomp
%dir /%{_lib}/ast/
/%{_lib}/ast/ksh
/%{_lib}/ast/shcomp
/%{_lib}/ast/*.so.*
%files -n ksh-devel
%defattr(-,root,root)
%doc LICENSE Warning
%dir %{_libdir}/ast/
%{_libdir}/ast/*.so
%{_libdir}/ast/*.a
%doc %{_mandir}/man3/*
/usr/include/ast/
%changelog -n ksh
* Fri Jan 12 2007 - werner@suse.de
- Do not use binary OR instead of a logic OR (#233299)
- Help the compile time and run time linker (#233299)
* Mon Nov 20 2006 - werner@suse.de
- Avoid that a sub shell close required file descriptors (#222411)
* Fri Nov 10 2006 - werner@suse.de
- On ia64 a cast of an integer to a character pointer and back to
an long integer may results into an unaligned access, fix this
in the SIGWINCH handler (bug #209643)
* Tue Nov 07 2006 - ro@suse.de
- fix permissions for manpages
* Mon Jul 10 2006 - werner@suse.de
- Don't trim backslash part of a multibyte character away (#189239)
* Tue Jul 04 2006 - werner@suse.de
- Builtin cut: allow last line without newline (#189231)
- Utility shcomp: fix segfault and install it (#189778)
* Tue Jun 27 2006 - werner@suse.de
- No segmentation fault if ksh uses shared command libray (#188404)
* Tue Jun 20 2006 - werner@suse.de
- Make it build even on new beta with new glibc headers
* Wed May 31 2006 - werner@suse.de
- Fix segmentation fault in vi command line mode (bug #179917)
* Mon May 29 2006 - werner@suse.de
- Make -i and -p option of uname builtin work (bug #178962)
* Tue May 09 2006 - werner@suse.de
- Change PreRequire /bin/bash to /etc/bash.bashrc (bug #172633)
* Mon May 08 2006 - werner@suse.de
- Correct order of souring order of the users profile and the
system kshrc files (bug #172708)
* Wed Apr 19 2006 - werner@suse.de
- Do not source system rc files if ksh is not interactive
- Correct string from GMT to UTC for Universal Time Coordinates
* Wed Apr 19 2006 - werner@suse.de
- Fix the patch for the multi byte characters (bug #163665)
* Tue Apr 18 2006 - werner@suse.de
- Fix multi byte handling even for command line mode emacs/vi
* Thu Apr 06 2006 - werner@suse.de
- Handle multi byte characters within macro expansion (bug #163665)
* Mon Mar 27 2006 - werner@suse.de
- Update to ksh 93r
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Dec 20 2005 - werner@suse.de
- Move manual pages of libast to an own subsection 3ast (#140295)
* Fri Dec 16 2005 - werner@suse.de
- Make it build even with bash 3.1 and gcc 4.1.0
* Thu Nov 17 2005 - uli@suse.de
- disabled some tests on ARM (occasionally hang QEMU)
* Mon Oct 24 2005 - werner@suse.de
- PreReqire the bash to get the system wide bash.bashrc
* Mon Sep 19 2005 - werner@suse.de
- Make it compatible with parallel installed pdksh (bug #105126)
* Mon Sep 19 2005 - werner@suse.de
- Avoid useless gcc warning of autogenerated sources
* Tue Aug 16 2005 - werner@suse.de
- Move to group System/Shells (bug #104920)
* Wed Apr 13 2005 - werner@suse.de
- Make it compile with gcc4
* Thu Mar 24 2005 - werner@suse.de
- Correct initialization for got_sigwinch variable
* Wed Mar 23 2005 - werner@suse.de
- Update to release date 2005-02-02 (bug #18698, bug #74348)
* Wed Mar 09 2005 - werner@suse.de
- Fix dead link in documentation (bug #71733)
* Fri Feb 04 2005 - werner@suse.de
- More on winsize changes: now it works after a new prompt
just like in the pdksh.
* Fri Feb 04 2005 - schwab@suse.de
- Workaround broken build system and enable building shared libraries on
x86-64.
* Thu Feb 03 2005 - werner@suse.de
- Do not build shared version on x64_86 the ELF macro R_X64_86_32S
breaks that a local symbol
- Make it work on s390x
* Thu Feb 03 2005 - werner@suse.de
- Make winsize changes work
- Enable /etc/ksh.kshrc support
- lchmod is not implemented under Linux
- error_exit does never return
- Enable shared libraries instead of the static ones
- Add a warning about CPL versus GPL
* Wed Feb 02 2005 - werner@suse.de
- Initial version of the AT&T ksh now under CPL1.0 (bug #3698)

18
ksh93-cut.dif Normal file
View File

@ -0,0 +1,18 @@
--- src/lib/libcmd/cut.c
+++ src/lib/libcmd/cut.c 2006-07-03 18:58:50.000000000 +0000
@@ -248,10 +248,13 @@
inp = sfreserve(fdin,cuthdr->reclen, -1);
else
inp = sfgetr(fdin, '\n', 0);
+ if(!(len=cuthdr->reclen)) {
+ len = sfvalue(fdin);
+ if (len && !inp) /* this lonely line does not end with newline */
+ inp = sfgetr(fdin, 0, SF_LASTR);
+ }
if(!inp)
break;
- if(!(len=cuthdr->reclen))
- len = sfvalue(fdin);
if((ncol = skip = *(lp = cuthdr->list)) == 0)
ncol = *++lp;
while(1)

70
ksh93-gmt2utc.dif Normal file
View File

@ -0,0 +1,70 @@
--- src/lib/libast/tm/tmdata.c
+++ src/lib/libast/tm/tmdata.c 2006-04-19 15:52:53.000000000 +0000
@@ -54,7 +54,7 @@
"AM", "PM",
- "GMT", "UTC", "UCT", "CUT",
+ "UTC", "GMT", "UCT", "CUT",
"DST", "", "", "",
@@ -225,8 +225,8 @@
static Tm_zone_t zone[] =
{
- 0, "GMT", 0, ( 0 * 60), 0, /* UTC */
0, "UCT", 0, ( 0 * 60), 0, /* UTC */
+ 0, "GMT", 0, ( 0 * 60), 0, /* UTC */
0, "UTC", 0, ( 0 * 60), 0, /* UTC */
0, "CUT", 0, ( 0 * 60), 0, /* UTC */
"USA", "HST", 0, (10 * 60), 0, /* Hawaii */
--- src/lib/libast/man/tm.3
+++ src/lib/libast/man/tm.3 2006-04-19 15:55:42.000000000 +0000
@@ -70,7 +70,7 @@
.PP
.L time_t
values are the number of seconds since the epoch,
-.BR "Jan 1 00:00:00 GMT 1970" ,
+.BR "Jan 1 00:00:00 UTC 1970" ,
with leap seconds omitted.
.PP
The global variable
@@ -433,7 +433,7 @@
.B z
Time zone
.I SHHMM
-west of GMT offset where
+west of UTC offset where
.I S
is
.B +
@@ -614,7 +614,7 @@
.TP
.B 43-46
.B UTC
-time zone names: GMT, UTC, UCT, CUT.
+time zone names: UTC, GMT, UCT, CUT.
.TP
.B 47-50
Daylight savings time suffix names: DST.
--- src/lib/libast/man/tmx.3
+++ src/lib/libast/man/tmx.3 2006-04-19 15:54:55.000000000 +0000
@@ -59,7 +59,7 @@
.PP
.L time_t
values are the number of seconds since the epoch,
-.BR "Jan 1 00:00:00 GMT 1970" ,
+.BR "Jan 1 00:00:00 UTC 1970" ,
with leap seconds omitted.
.PP
The global variable
@@ -492,7 +492,7 @@
.TP
.B 43-46
.B UTC
-time zone names: GMT, UTC, UCT, CUT.
+time zone names: UTC, GMT, UCT, CUT.
.TP
.B 47-50
Daylight savings time suffix names: DST.

58
ksh93-profile.dif Normal file
View File

@ -0,0 +1,58 @@
--- src/cmd/ksh93/sh/main.c
+++ src/cmd/ksh93/sh/main.c 2006-05-09 12:26:48.000000000 +0200
@@ -210,37 +210,42 @@
}
job_init(sh_isoption(SH_LOGIN_SHELL));
if(sh_isoption(SH_LOGIN_SHELL) && !sh_isoption(SH_NOPROFILE))
- {
/* system profile */
sh_source(shp, iop, e_sysprofile);
+ /* make sure PWD is set up correctly */
+ path_pwd(1);
+#if SHOPT_SYSRC
+ if(!sh_isoption(SH_NOEXEC))
+ {
+ if(!sh_isoption(SH_NOUSRPROFILE) && !sh_isoption(SH_PRIVILEGED) && sh_isoption(SH_RC))
+ {
+#if SHOPT_BASH
+ if(sh_isoption(SH_BASH) && !sh_isoption(SH_POSIX))
+ sh_source(shp, iop, e_bash_sysrc);
+ else
+#endif
+ sh_source(shp, iop, e_sysrc);
+ }
+ }
+#endif
+ if(sh_isoption(SH_LOGIN_SHELL) && !sh_isoption(SH_NOPROFILE))
+ {
if(!sh_isoption(SH_NOUSRPROFILE) && !sh_isoption(SH_PRIVILEGED))
{
char **files = shp->login_files;
while ((name = *files++) && !sh_source(shp, iop, sh_mactry(name)));
}
}
- /* make sure PWD is set up correctly */
- path_pwd(1);
if(!sh_isoption(SH_NOEXEC))
{
if(!sh_isoption(SH_NOUSRPROFILE) && !sh_isoption(SH_PRIVILEGED) && sh_isoption(SH_RC))
{
#if SHOPT_BASH
if(sh_isoption(SH_BASH) && !sh_isoption(SH_POSIX))
- {
-#if SHOPT_SYSRC
- sh_source(shp, iop, e_bash_sysrc);
-#endif
sh_source(shp, iop, shp->rcfile ? shp->rcfile : sh_mactry((char*)e_bash_rc));
- }
else
#endif
- {
-#if SHOPT_SYSRC
- sh_source(shp, iop, e_sysrc);
-#endif
sh_source(shp, iop, sh_mactry(nv_getval(ENVNOD)));
- }
}
else if(sh_isoption(SH_INTERACTIVE) && sh_isoption(SH_PRIVILEGED))
sh_source(shp, iop, e_suidprofile);

11
ksh93-shcomp.dif Normal file
View File

@ -0,0 +1,11 @@
--- src/cmd/ksh93/sh/tdump.c
+++ src/cmd/ksh93/sh/tdump.c 2006-07-04 14:12:33.000000000 +0000
@@ -205,6 +205,8 @@
else
sfputu(outfile,0);
iop = iop->ionxt;
+ if(!iop)
+ break;
if(iop->iovname)
p_string(iop->iovname);
}

397
ksh93-shift_ijs.dif Normal file
View File

@ -0,0 +1,397 @@
--- src/cmd/ksh93/edit/edit.c
+++ src/cmd/ksh93/edit/edit.c 2006-04-19 12:17:59.000000000 +0200
@@ -28,6 +28,7 @@
*/
#include <ast.h>
+#include <ast_wchar.h>
#include <errno.h>
#include <ccode.h>
#include <ctype.h>
@@ -53,7 +54,15 @@
#define CURSOR_UP "\E[A"
#if SHOPT_MULTIBYTE
-# define is_print(c) ((c&~STRIP) || isprint(c))
+# if _hdr_wctype
+# include <wctype.h>
+# define is_print(c) iswprint((c))
+# else
+# define is_print(c) (((c)&~STRIP) || isprint((c)))
+# endif
+# if !_lib_iswprint && !defined(iswprint)
+# define iswprint(c) (((c)&~STRIP) || isprint((c)))
+# endif
#else
# define is_print(c) isprint(c)
#endif
@@ -1166,7 +1175,6 @@
{
if(curp == sp)
r = dp - phys;
- d = (is_print(c)?1:-1);
#if SHOPT_MULTIBYTE
d = mbwidth((wchar_t)c);
if(d==1 && !is_print(c))
@@ -1183,7 +1191,9 @@
continue;
}
else
-#endif /* SHOPT_MULTIBYTE */
+#else /* not SHOPT_MULTIBYTE */
+ d = (is_print(c)?1:-1);
+#endif /* not SHOPT_MULTIBYTE */
if(d<0)
{
if(c=='\t')
--- src/cmd/ksh93/edit/vi.c
+++ src/cmd/ksh93/edit/vi.c 2006-04-19 12:17:59.000000000 +0200
@@ -28,6 +28,8 @@
* cbosgd!pds
-*/
+#include <ast.h>
+#include <ast_wchar.h>
#if KSHELL
# include "defs.h"
@@ -65,10 +67,16 @@
# define gencpy(a,b) ed_gencpy(a,b)
# define genncpy(a,b,n) ed_genncpy(a,b,n)
# define genlen(str) ed_genlen(str)
-# define digit(c) ((c&~STRIP)==0 && isdigit(c))
-# define is_print(c) ((c&~STRIP) || isprint(c))
+# if _hdr_wctype
+# include <wctype.h>
+# define digit(c) iswdigit((c))
+# define is_print(c) iswprint((c))
+# else
+# define digit(c) (((c)&~STRIP)==0 && isdigit((c)))
+# define is_print(c) (((c)&~STRIP) || isprint((c)))
+# endif
# if !_lib_iswprint && !defined(iswprint)
-# define iswprint(c) is_print((c))
+# define iswprint(c) (((c)&~STRIP) || isprint((c)))
# endif
static int _isalph(int);
static int _ismetach(int);
--- src/cmd/ksh93/include/national.h
+++ src/cmd/ksh93/include/national.h 2006-04-19 12:17:59.000000000 +0200
@@ -29,7 +29,7 @@
#if SHOPT_MULTIBYTE
# ifndef MARKER
-# define MARKER 0x7fff /* Must be invalid character */
+# define MARKER 0xdfff /* Must be invalid character */
# endif
extern int sh_strchr(const char*,const char*);
--- src/cmd/ksh93/sh/lex.c
+++ src/cmd/ksh93/sh/lex.c 2006-04-19 12:17:54.000000000 +0200
@@ -293,11 +293,12 @@
{
switch(*len = mbsize(_Fcin.fcptr))
{
- case -1: /* bogus multiByte char - parse as bytes? */
- case 0: /* NULL byte */
+ case -1: /* bogus multiByte char - parse as bytes? */
+ case 0: /* NULL byte */
+ *len = 1;
case 1:
- lexState = state[curChar=fcget()];
- break;
+ lexState = state[curChar=fcget()];
+ break;
default:
/*
* None of the state tables contain entries
@@ -1596,6 +1597,36 @@
{
if(n!=S_NL)
{
+#if SHOPT_MULTIBYTE
+ if(mbwide())
+ {
+ do
+ {
+ ssize_t len;
+ switch((len = mbsize(_Fcin.fcptr)))
+ {
+ case -1: /* bogus multiByte char - parse as bytes? */
+ case 0: /* NULL byte */
+ case 1:
+ n = state[fcget()];
+ break;
+ default:
+ /*
+ * None of the state tables contain
+ * entries for multibyte characters,
+ * however, they should be treated
+ * the same as any other alph
+ * character. Therefore, we'll use
+ * the state of the 'a' character.
+ */
+ mbchar(_Fcin.fcptr);
+ n = state['a'];
+ }
+ }
+ while(n == 0);
+ }
+ else
+#endif /* SHOPT_MULTIBYTE */
/* skip over regular characters */
while((n=state[fcget()])==0);
}
--- src/cmd/ksh93/sh/macro.c
+++ src/cmd/ksh93/sh/macro.c 2006-04-19 12:17:54.000000000 +0200
@@ -266,7 +266,38 @@
cp = fcseek(0);
while(1)
{
+#if SHOPT_MULTIBYTE
+ if(mbwide())
+ {
+ do
+ {
+ ssize_t len;
+ switch((len = mbsize(cp)))
+ {
+ case -1: /* bogus multiByte char - parse as bytes? */
+ case 0: /* NULL byte */
+ case 1:
+ n = state[*(unsigned char*)cp++];
+ break;
+ default:
+ /*
+ * None of the state tables contain
+ * entries for multibyte characters,
+ * however, they should be treated
+ * the same as any other alph
+ * character. Therefore, we'll use
+ * the state of the 'a' character.
+ */
+ cp += len;
+ n = state['a'];
+ }
+ }
+ while(n == 0);
+ }
+ else
+#endif /* SHOPT_MULTIBYTE */
while((n=state[*(unsigned char*)cp++])==0);
+
if(n==S_NL || n==S_QUOTE || n==S_RBRA)
continue;
if(c=(cp-1)-fcseek(0))
@@ -395,8 +426,42 @@
cp++;
while(1)
{
- while((n=state[*(unsigned char*)cp++])==0);
- c = (cp-1) - first;
+#if SHOPT_MULTIBYTE
+ if (mbwide())
+ {
+ ssize_t len;
+ do
+ {
+ switch((len = mbsize(cp)))
+ {
+ case -1: /* bogus multiByte char - parse as bytes? */
+ case 0: /* NULL byte */
+ len = 1;
+ case 1:
+ n = state[*(unsigned char*)cp++];
+ break;
+ default:
+ /*
+ * None of the state tables contain entries
+ * for multibyte characters. However, they
+ * should be treated the same as any other
+ * alpha character, so we'll use the state
+ * which would normally be assigned to the
+ * 'a' character.
+ */
+ cp += len;
+ n = state['a'];
+ }
+ }
+ while(n == 0);
+ c = (cp-len) - first;
+ }
+ else
+#endif /* SHOPT_MULTIBYTE */
+ {
+ while((n=state[*(unsigned char*)cp++])==0);
+ c = (cp-1) - first;
+ }
switch(n)
{
case S_ESC:
--- src/cmd/ksh93/sh/string.c
+++ src/cmd/ksh93/sh/string.c 2006-04-19 12:17:59.000000000 +0200
@@ -24,6 +24,7 @@
*/
#include <ast.h>
+#include <ast_wchar.h>
#include "defs.h"
#include <stak.h>
#include <ctype.h>
@@ -36,8 +37,12 @@
#define mbchar(p) (*(unsigned char*)p++)
#endif
+#if _hdr_wctype
+# include <wctype.h>
+#endif
+
#if !_lib_iswprint && !defined(iswprint)
-# define iswprint(c) ((c&~0377) || isprint(c))
+# define iswprint(c) (((c)&~0377) || isprint((c)))
#endif
@@ -245,8 +250,20 @@
if(sp)
{
dp = sp;
- while(c= *sp++)
+ while((c = *sp))
{
+#if SHOPT_MULTIBYTE
+ if (mbwide()) {
+ int len = mbsize(sp);
+ if (len > 1) {
+ dp += len;
+ sp += len;
+ continue;
+ }
+ }
+#endif /* SHOPT_MULTIBYTE */
+ sp++;
+
if(c == '\\')
c = *sp++;
if(c)
--- src/lib/libast/comp/setlocale.c
+++ src/lib/libast/comp/setlocale.c 2006-04-19 12:17:59.000000000 +0200
@@ -30,6 +30,8 @@
#include "lclib.h"
+#include <ast.h>
+#include <ast_wchar.h>
#include <ctype.h>
#include <mc.h>
#include <namval.h>
--- src/lib/libast/comp/wc.c
+++ src/lib/libast/comp/wc.c 2006-04-19 12:17:59.000000000 +0200
@@ -26,6 +26,7 @@
*/
#include <ast.h>
+#include <ast_wchar.h>
#include <wchar.h>
#if !_lib_mbtowc
--- src/lib/libast/features/wchar
+++ src/lib/libast/features/wchar 2006-04-19 12:25:08.000000000 +0200
@@ -1,5 +1,6 @@
set prototyped
-lib mbstowcs,wctomb,wcrtomb,wcslen,wcstombs,wcwidth stdlib.h stdio.h wchar.h
+lib mbstowcs,wctomb,wcrtomb,wcslen,wcstombs,wcscpy,wcwidth stdlib.h stdio.h wchar.h wctype.h
+lib iswprint,iswalnum stdlib.h stdio.h ctype.h wctype.h
lib towlower,towupper stdlib.h stdio.h wchar.h
typ mbstate_t stdlib.h stdio.h wchar.h
nxt wchar
@@ -30,6 +31,12 @@
#undef putwc
#undef putwchar
#undef ungetwc
+ #undef fwprintf
+ #undef swprintf
+ #undef vfwprintf
+ #undef vswprintf
+ #undef vwprintf
+ #undef wprintf
#define fgetwc _ast_fgetwc
#define fgetws _ast_fgetws
@@ -79,6 +86,12 @@
#if !_lib_wcstombs
extern size_t wcstombs(char*, const wchar_t*, size_t);
#endif
+ #if !_lib_wcscpy
+ extern wchar_t *wcscpy(wchar_t*t, const wchar_t*);
+ #endif
+ #if !_lib_wcwidth
+ extern int int wcwidth(wchar_t c);
+ #endif
extern int fwprintf(FILE*, const wchar_t*, ...);
extern int fwscanf(FILE*, const wchar_t*, ...);
--- src/lib/libast/regex/reglib.h
+++ src/lib/libast/regex/reglib.h 2006-04-19 12:17:59.000000000 +0200
@@ -57,6 +57,7 @@
char re_rhs[1]; /* substitution rhs */
#include <ast.h>
+#include <ast_wchar.h>
#include <cdt.h>
#include <stk.h>
--- src/lib/libcmd/Mamfile
+++ src/lib/libcmd/Mamfile 2006-04-19 12:17:54.000000000 +0200
@@ -444,7 +444,7 @@
prev cat.c
meta cat.o %.c>%.o cat.c cat
prev cat.c
-exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2006 AT&T Knowledge Ventures][-license?http://www.opensource.org/licenses/cpl1.0.txt][--catalog?libcmd]"\" -D_PACKAGE_ast -D_BLD_cmd -c cat.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2006 AT&T Knowledge Ventures][-license?http://www.opensource.org/licenses/cpl1.0.txt][--catalog?libcmd]"\" -D_PACKAGE_ast -D_BLD_cmd -DSHOPT_MULTIBYTE -c cat.c
done cat.o generated
make chgrp.o
prev chgrp.c
--- src/lib/libcmd/cat.c
+++ src/lib/libcmd/cat.c 2006-04-19 12:17:54.000000000 +0200
@@ -133,8 +133,39 @@
while (endbuff)
{
cpold = cp;
- /* skip over ASCII characters */
+ /* skip over ASCII and multi byte characters */
+#if SHOPT_MULTIBYTE
+ if(mbwide())
+ {
+ do
+ {
+ ssize_t len;
+ switch((len = mbsize(cp)))
+ {
+ case -1: /* bogus multiByte char - parse as bytes? */
+ case 0: /* NULL byte */
+ case 1:
+ n = states[*cp++];
+ break;
+ default:
+ /*
+ * None of the state tables contain
+ * entries for multibyte characters,
+ * however, they should be treated
+ * the same as any other alph
+ * character. Therefore, we'll use
+ * the state of the 'a' character.
+ */
+ cp += len;
+ n = states['a'];
+ }
+ }
+ while(n == 0);
+ }
+ else
+#endif /* SHOPT_MULTIBYTE */
while ((n = states[*cp++]) == 0);
+
if (n==T_ENDBUF)
{
if (cp>endbuff)

20
ksh93-splice.dif Normal file
View File

@ -0,0 +1,20 @@
--- src/lib/libast/string/tokline.c
+++ src/lib/libast/string/tokline.c 2006-06-20 15:59:44.000000000 +0200
@@ -55,7 +55,7 @@
*/
static int
-splice(Sfio_t* s, int op, void* val, Sfdisc_t* ad)
+ksh_splice(Sfio_t* s, int op, void* val, Sfdisc_t* ad)
{
Splice_t* d = (Splice_t*)ad;
register char* b;
@@ -185,7 +185,7 @@
flags = strtol(p + 5, &p, 10);
error(flags, "%s:%-.*s", arg, e - p - 4, p);
}
- d->disc.exceptf = splice;
+ d->disc.exceptf = ksh_splice;
d->sp = f;
*(d->line = line ? line : &hidden) = 0;
sfdisc(s, (Sfdisc_t*)d);

View File

@ -0,0 +1,17 @@
--- src/cmd/ksh93/sh/main.c
+++ src/cmd/ksh93/sh/main.c 2006-11-20 13:47:33.000000000 +0000
@@ -389,7 +389,13 @@ static void exfile(register Shell_t *shp
{
if(fno > 0)
{
- fno = sh_iomovefd(fno);
+ int r;
+ if(fno < 10 && ((r=sh_fcntl(fno,F_DUPFD,10))>=10))
+ {
+ shp->fdstatus[r] = shp->fdstatus[fno];
+ sh_close(fno);
+ fno = r;
+ }
fcntl(fno,F_SETFD,FD_CLOEXEC);
shp->fdstatus[fno] |= IOCLEX;
iop = sh_iostream(fno);

45
ksh93-test.dif Normal file
View File

@ -0,0 +1,45 @@
--- src/cmd/ksh93/bltins/test.c
+++ src/cmd/ksh93/bltins/test.c 2007-01-12 12:19:48.000000000 +0000
@@ -59,12 +59,12 @@ typedef unsigned long Time_t;
#ifdef S_ISSOCK
# if _pipe_socketpair
# if _socketpair_shutdown_mode
-# define isapipe(f,p) (test_stat(f,p)>=0&&S_ISFIFO((p)->st_mode)||S_ISSOCK((p)->st_mode)&&(p)->st_ino&&((p)->st_mode&(S_IRUSR|S_IWUSR))!=(S_IRUSR|S_IWUSR))
+# define isapipe(f,p) (test_stat(f,p)>=0&&(S_ISFIFO((p)->st_mode)||(S_ISSOCK((p)->st_mode)&&(p)->st_ino&&((p)->st_mode&(S_IRUSR|S_IWUSR))!=(S_IRUSR|S_IWUSR))))
# else
-# define isapipe(f,p) (test_stat(f,p)>=0&&S_ISFIFO((p)->st_mode)||S_ISSOCK((p)->st_mode)&&(p)->st_ino)
+# define isapipe(f,p) (test_stat(f,p)>=0&&(S_ISFIFO((p)->st_mode)||S_ISSOCK((p)->st_mode)&&(p)->st_ino))
# endif
# else
-# define isapipe(f,p) (test_stat(f,p)>=0&&S_ISFIFO((p)->st_mode)||S_ISSOCK((p)->st_mode)&&(p)->st_ino)
+# define isapipe(f,p) (test_stat(f,p)>=0&&(S_ISFIFO((p)->st_mode)||S_ISSOCK((p)->st_mode)&&(p)->st_ino))
# endif
# define isasock(f,p) (test_stat(f,p)>=0&&S_ISSOCK((p)->st_mode))
#else
@@ -99,7 +99,7 @@ static int test_strmatch(const char *str
int match[2*(MATCH_MAX+1)],n;
register int c, m=0;
register const char *cp=pat;
- while(c = *cp++)
+ while((c = *cp++))
{
if(c=='(')
m++;
@@ -305,7 +305,7 @@ skip:
cp = nxtarg(tp,0);
if(!op)
errormsg(SH_DICT,ERROR_exit(2),e_badop,binop);
- if(op==TEST_AND | op==TEST_OR)
+ if(op==TEST_AND || op==TEST_OR)
tp->ap--;
return(test_binop(op,arg,cp));
}
@@ -436,7 +436,7 @@ int test_unop(register int op,register c
int test_binop(register int op,const char *left,const char *right)
{
- register double lnum,rnum;
+ register double lnum = 0, rnum = 0;
if(op&TEST_ARITH)
{
while(*left=='0')

11
ksh93-unaligned.dif Normal file
View File

@ -0,0 +1,11 @@
--- src/cmd/ksh93/sh/fault.c
+++ src/cmd/ksh93/sh/fault.c 2006-11-10 15:54:18.692134343 +0000
@@ -70,7 +70,7 @@
#ifdef SIGWINCH
if(sig==SIGWINCH)
{
- int rows=0, cols=0;
+ long rows=0, cols=0;
astwinsize(2,&rows,&cols);
if(cols)
nv_putval(COLUMNS, (char*)&cols, NV_INTEGER);

113
ksh93-uname.dif Normal file
View File

@ -0,0 +1,113 @@
--- src/lib/libcmd/uname.c
+++ src/lib/libcmd/uname.c 2006-05-29 13:11:43.000000000 +0000
@@ -75,6 +75,7 @@
#include <cmdlib.h>
#include <ctype.h>
+#include <stdio.h>
#include <proc.h>
#include "FEATURE/utsname"
@@ -82,9 +83,11 @@
#define MAXHOSTNAME 64
#if _lib_uname && _sys_utsname
+# include <sys/utsname.h>
+#endif
-#include <sys/utsname.h>
-
+#ifdef __linux__
+# include <sys/sysctl.h>
#endif
#if defined(__STDPP__directive) && defined(__STDPP__hide)
@@ -186,7 +189,11 @@
#define OPT_version (1<<3)
#define OPT_machine (1<<4)
-#define OPT_ALL 5
+#ifdef __linux__
+# define OPT_ALL 6
+#else
+# define OPT_ALL 5
+#endif
#define OPT_processor (1<<5)
#define OPT_hostid (1<<6)
@@ -258,6 +265,9 @@
{
case 'a':
flags |= OPT_all|((1L<<OPT_ALL)-1);
+#ifdef __linux__
+ flags |= OPT_implementation;
+#endif
continue;
case 'b':
flags |= OPT_base;
@@ -311,7 +321,11 @@
sethost = opt_info.arg;
continue;
case ':':
+#ifdef __linux__
+ s = "/bin/uname";
+#else
s = "/usr/bin/uname";
+#endif
if (!streq(argv[0], s) && (!eaccess(s, X_OK) || !eaccess(s+=4, X_OK)))
{
argv[0] = s;
@@ -380,7 +394,35 @@
output(OPT_machine, ut.machine, "machine");
if (flags & OPT_processor)
{
- if (!*(s = astconf("ARCHITECTURE", NiL, NiL)))
+ s = NULL;
+#ifdef __linux__
+# ifdef UNAME_PROCESSOR
+ if (!s) {
+ size_t len = sizeof(buf) - 1;
+ int ctl[] = {CTL_HW, UNAME_PROCESSOR};
+ if (sysctl(ctl, 2, buf, &len, 0, 0) == 0)
+ s = buf;
+ }
+# endif
+ if (!s) {
+ strcpy((s = buf), ut.machine);
+ if (strcmp(s, "i686") == 0) {
+ char line[1024];
+ Sfio_t *io = sfopen((Sfio_t*)0, "/proc/cpuinfo", "r");
+ if (io) {
+ while (fgets(line, sizeof(line), io) > 0) {
+ if (strncmp(line, "vendor_id", 9) == 0) {
+ if (strstr(line, "AuthenticAMD"))
+ s = "athlon";
+ break;
+ }
+ }
+ sfclose(io);
+ }
+ }
+ }
+#endif
+ if (!s && !*(s = astconf("ARCHITECTURE", NiL, NiL)))
{
if (t = strchr(hosttype, '.'))
t++;
@@ -392,7 +434,15 @@
}
if (flags & OPT_implementation)
{
- if (!*(s = astconf("PLATFORM", NiL, NiL)))
+ s = NULL;
+#ifdef __linux__
+ if (!s) {
+ strcpy((s = buf), ut.machine);
+ if (s[0] == 'i' && s[2] == '8' && s[3] == '6' && s[4] == '\0')
+ s[1] = '3';
+ }
+#endif
+ if (!s && !*(s = astconf("PLATFORM", NiL, NiL)))
s = astconf("HW_NAME", NiL, NiL);
output(OPT_implementation, s, "implementation");
}

61
ksh93-vi.dif Normal file
View File

@ -0,0 +1,61 @@
--- src/cmd/ksh93/edit/vi.c
+++ src/cmd/ksh93/edit/vi.c 2006-05-31 15:09:12.000000000 +0000
@@ -389,6 +397,9 @@
if(!yankbuf)
{
yankbuf = (genchar*)malloc(MAXLINE*CHARSIZE);
+ }
+ if (!vp->lastline)
+ {
vp->lastline = (genchar*)malloc(MAXLINE*CHARSIZE);
}
if( vp->last_cmd == '\0' )
@@ -400,6 +411,8 @@
vp->lastmotion = '\0';
vp->lastrepeat = 1;
vp->repeat = 1;
+ if (!yankbuf)
+ return(-1);
*yankbuf = 0;
}
@@ -1065,7 +1078,7 @@
/*** save characters to be deleted ***/
- if( mode != 'c' )
+ if( mode != 'c' && yankbuf )
{
i = cp[nchars];
cp[nchars] = 0;
@@ -2027,6 +2040,9 @@
{
register int i;
+ if (vp->lastline == NULL)
+ return;
+
if( (i = cur_virt - first_virt + 1) > 0 )
{
/*** save last thing user typed ***/
@@ -2272,6 +2288,11 @@
p = yankbuf;
}
+ if (!p)
+ {
+ return(BAD);
+ }
+
addin:
switch( c )
{
@@ -2530,6 +2551,8 @@
vp->lastmotion = c;
if( c == 'y' )
{
+ if (!yankbuf)
+ return(BAD);
gencpy(yankbuf, virtual);
}
else if(!delmotion(vp, c, 'y'))

119
ksh93.dif Normal file
View File

@ -0,0 +1,119 @@
--- src/cmd/ksh93/sh/main.c
+++ src/cmd/ksh93/sh/main.c 2006-04-20 14:56:26.000000000 +0000
@@ -125,9 +125,9 @@
}
#ifdef S_ISSOCK
-#define REMOTE(m) (S_ISSOCK(m)||!(m))
+#define REMOTE(m) ((S_ISSOCK((m).st_mode)||!((m).st_mode))&&!((m).st_ino))
#else
-#define REMOTE(m) !(m)
+#define REMOTE(m) (!((m).st_mode)&&!((m).st_ino))
#endif
int sh_main(int ac, char *av[], void (*userinit)(int))
@@ -192,7 +192,7 @@
}
if(!sh_isoption(SH_RC) && (sh_isoption(SH_BASH) && !sh_isoption(SH_POSIX)
#if SHOPT_REMOTE
- || !fstat(0, &statb) && REMOTE(statb.st_mode)
+ || !fstat(0, &statb) && REMOTE(statb)
#endif
))
sh_onoption(SH_RC);
--- src/cmd/ksh93/sh/suid_exec.c
+++ src/cmd/ksh93/sh/suid_exec.c 2006-03-24 18:49:39.000000000 +0100
@@ -64,7 +64,11 @@
#define THISPROG "/etc/suid_exec"
#define DEFSHELL "/bin/sh"
+#if defined(linux)
+static void error_exit(const char*) __attribute__ ((noreturn));
+#else
static void error_exit(const char*);
+#endif
static int in_dir(const char*, const char*);
static int endsh(const char*);
#ifndef _lib_setregid
--- src/cmd/ksh93/tests/builtins.sh
+++ src/cmd/ksh93/tests/builtins.sh 2007-01-12 16:24:28.000000000 +0000
@@ -310,7 +310,7 @@
(( $? == 1 )) || err_exit "wait not saving exit value"
wait $pid2
(( $? == 127 )) || err_exit "subshell job known to parent"
-if [[ $(foo=bar;foo=$foo exec -c $SHELL -c 'print $foo') != bar ]]
+if [[ $(foo=bar;foo=$foo LD_LIBRARY_PATH=$LD_LIBRARY_PATH exec -c $SHELL -c 'print $foo') != bar ]]
then err_exit '"name=value exec -c ..." not working'
fi
$SHELL -c 'OPTIND=-1000000; getopts a opt -a' 2> /dev/null
--- src/lib/libast/features/align.c
+++ src/lib/libast/features/align.c 2006-03-24 18:50:43.000000000 +0100
@@ -32,6 +32,7 @@
#include "FEATURE/common"
#include <setjmp.h>
+#include <stdio.h>
union _u_
{
--- src/lib/libast/features/botch.c
+++ src/lib/libast/features/botch.c 2006-03-24 18:51:25.000000000 +0100
@@ -27,6 +27,7 @@
* generate ast traps for botched standard prototypes
*/
+#include <stdio.h>
#include <sys/types.h>
#include "FEATURE/lib"
--- src/lib/libast/misc/procopen.c
+++ src/lib/libast/misc/procopen.c 2006-03-24 18:49:39.000000000 +0100
@@ -523,7 +523,7 @@
if (!fork())
{
sfsprintf(path, sizeof(path), "%d", getppid());
- execlp("trace", "trace", "-p", path, NiL);
+ execlp("trace", "trace", "-p", path, NULL);
_exit(EXIT_NOTFOUND);
}
sleep(2);
--- src/lib/libast/sfio/sfstrtof.h
+++ src/lib/libast/sfio/sfstrtof.h 2006-03-24 18:49:39.000000000 +0100
@@ -53,7 +53,7 @@
#if !defined(S2F_function)
#define S2F_function _sfdscan
-#define S2F_static 1
+#define S2F_static -1
#define S2F_type 2
#define S2F_scan 1
#ifndef elementsof
--- src/lib/libcmd/chmod.c
+++ src/lib/libcmd/chmod.c 2006-03-24 18:49:39.000000000 +0100
@@ -164,7 +164,7 @@
int (*chmodf)(const char*, mode_t);
int notify = 0;
int ignore = 0;
-#if _lib_lchmod
+#if !defined(linux) && _lib_lchmod
int chlink = 0;
#endif
struct stat st;
@@ -194,7 +194,7 @@
force = 1;
continue;
case 'h':
-#if _lib_lchmod
+#if !defined(linux) && _lib_lchmod
chlink = 1;
#endif
continue;
@@ -248,7 +248,7 @@
}
}
chmodf =
-#if _lib_lchmod
+#if !defined(linux) && _lib_lchmod
chlink ? lchmod :
#endif
chmod;

0
ready Normal file
View File

View File

@ -0,0 +1,258 @@
--- src/cmd/INIT/Mamfile
+++ src/cmd/INIT/Mamfile 2006-03-24 16:37:10.000000000 +0100
@@ -5,7 +5,7 @@
setv ARFLAGS cr
setv AS as
setv ASFLAGS
-setv CC cc
+setv CC gcc
setv mam_cc_FLAGS
setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?}
setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??}
@@ -27,7 +27,7 @@
setv NMAKEFLAGS
setv PR pr
setv PRFLAGS
-setv SHELL /bin/sh
+setv SHELL /bin/bash
setv SILENT
setv TAR tar
setv YACC yacc
--- src/cmd/ksh93/Mamfile
+++ src/cmd/ksh93/Mamfile 2006-03-24 16:44:08.000000000 +0100
@@ -7,7 +7,7 @@
setv ARFLAGS cr
setv AS as
setv ASFLAGS
-setv CC cc
+setv CC gcc
setv mam_cc_FLAGS
setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?}
setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??}
@@ -29,7 +29,7 @@
setv NMAKEFLAGS
setv PR pr
setv PRFLAGS
-setv SHELL /bin/sh
+setv SHELL /bin/bash
setv SILENT
setv TAR tar
setv YACC yacc
@@ -690,7 +690,7 @@
done sh/main.c
meta main.o %.c>%.o sh/main.c main
prev sh/main.c
-exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_BRACEPAT -D_PACKAGE_ast -DSHOPT_ESH -DSHOPT_KIA -D_BLD_shell -DSHOPT_MULTIBYTE -DSHOPT_PFSH -DKSHELL -DSHOPT_SUID_EXEC -DSHOPT_HISTEXPAND -DSHOPT_DYNAMIC -DSHOPT_OO -c sh/main.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_BRACEPAT -D_PACKAGE_ast -DSHOPT_ESH -DSHOPT_KIA -D_BLD_shell -DSHOPT_MULTIBYTE -DSHOPT_PFSH -DKSHELL -DSHOPT_SUID_EXEC -DSHOPT_HISTEXPAND -DSHOPT_DYNAMIC -DSHOPT_OO -c sh/main.c
done main.o generated
make nvdisc.o
make sh/nvdisc.c
@@ -1109,7 +1109,7 @@
done sh/trestore.c
meta trestore.o %.c>%.o sh/trestore.c trestore
prev sh/trestore.c
-exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -DKSHELL -D_PACKAGE_ast -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -DSHOPT_MULTIBYTE -DSHOPT_PFSH -DSHOPT_KIA -DSHOPT_HISTEXPAND -DSHOPT_DYNAMIC -DSHOPT_OO -DSHOPT_ESH -c sh/trestore.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -DKSHELL -D_PACKAGE_ast -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -DSHOPT_MULTIBYTE -DSHOPT_PFSH -DSHOPT_KIA -DSHOPT_HISTEXPAND -DSHOPT_DYNAMIC -DSHOPT_OO -DSHOPT_ESH -c sh/trestore.c
done trestore.o generated
make waitevent.o
make sh/waitevent.c
@@ -1356,7 +1356,7 @@
prev ${mam_libsecdb}
prev +lintl
prev ${mam_libdl}
-exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o ksh pmain.o ${mam_libshell} ${mam_libast}
+exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o ksh pmain.o ${mam_libshell} ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libast}
done ksh generated
make shcomp
make shcomp.o
@@ -1380,7 +1380,7 @@
prev ${mam_libdl}
setv CC.DLL -UCC.DLL
setv SH_DICT -DSH_DICT="\"libshell\""
-exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o shcomp shcomp.o ${mam_libshell} ${mam_libast}
+exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o shcomp shcomp.o ${mam_libshell} ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libast}
done shcomp generated
make suid_exec
make suid_exec.o
--- src/lib/libast/Mamfile
+++ src/lib/libast/Mamfile 2006-03-24 16:48:51.000000000 +0100
@@ -5,7 +5,7 @@
setv ARFLAGS cr
setv AS as
setv ASFLAGS
-setv CC cc
+setv CC gcc
setv mam_cc_FLAGS ${mam_cc_DLL} -D_BLD_ast
setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?}
setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??}
@@ -27,7 +27,7 @@
setv NMAKEFLAGS
setv PR pr
setv PRFLAGS
-setv SHELL /bin/sh
+setv SHELL /bin/bash
setv SILENT
setv TAR tar
setv YACC yacc
@@ -531,7 +531,7 @@
done misc/fastfind.c
meta fastfind.o %.c>%.o misc/fastfind.c fastfind
prev misc/fastfind.c
-exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c misc/fastfind.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c misc/fastfind.c
done fastfind.o generated
make hashalloc.o
make hash/hashalloc.c
@@ -1504,7 +1504,7 @@
done port/mc.c
meta mc.o %.c>%.o port/mc.c mc
prev port/mc.c
-exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c port/mc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c port/mc.c
done mc.o generated
make liberror.o
make misc/liberror.c
@@ -2805,7 +2805,7 @@
done comp/spawnveg.c
meta spawnveg.o %.c>%.o comp/spawnveg.c spawnveg
prev comp/spawnveg.c
-exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/spawnveg.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/spawnveg.c
done spawnveg.o generated
make vfork.o
make comp/vfork.c
@@ -4155,7 +4155,7 @@
done sfio/sfrd.c
meta sfrd.o %.c>%.o sfio/sfrd.c sfrd
prev sfio/sfrd.c
-exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfrd.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfrd.c
done sfrd.o generated
make sfread.o
make sfio/sfread.c
@@ -4311,7 +4311,7 @@
done sfio/sfvprintf.c
meta sfvprintf.o %.c>%.o sfio/sfvprintf.c sfvprintf
prev sfio/sfvprintf.c
-exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfvprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfvprintf.c
done sfvprintf.o generated
make sfvscanf.o
make sfio/sfvscanf.c
@@ -6939,64 +6939,37 @@
make ${INSTALLROOT}/include/ast/fmtmsg.h
prev comp/fmtmsg.h
prev ast_lib.h
-exec - case ${mam_cc_HOSTTYPE} in
-exec - win32.*)proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/fmtmsg.h > 1.${COTEMP}.x
-exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/fmtmsg.h 1.${COTEMP}.x
-exec - then rm -f 1.${COTEMP}.x
-exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/fmtmsg.h
-exec - fi
-exec - ;;
-exec - *) silent grep -l 'define[ ][ ]*_[hl][di][rb]_fmtmsg' ast_lib.h > /dev/null || {
+exec - silent grep -l 'define[ ][ ]*_[hl][di][rb]_fmtmsg' ast_lib.h > /dev/null || {
exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/fmtmsg.h > 1.${COTEMP}.x
exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/fmtmsg.h 1.${COTEMP}.x
exec - then rm -f 1.${COTEMP}.x
exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/fmtmsg.h
exec - fi
exec - }
-exec - ;;
-exec - esac
prev ${INSTALLROOT}/include/prototyped.h implicit
done ${INSTALLROOT}/include/ast/fmtmsg.h generated
make ${INSTALLROOT}/include/ast/libgen.h
prev comp/libgen.h
prev ast_lib.h
-exec - case ${mam_cc_HOSTTYPE} in
-exec - win32.*)proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/libgen.h > 1.${COTEMP}.x
-exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/libgen.h 1.${COTEMP}.x
-exec - then rm -f 1.${COTEMP}.x
-exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/libgen.h
-exec - fi
-exec - ;;
-exec - *) silent grep -l 'define[ ][ ]*_[hl][di][rb]_libgen' ast_lib.h > /dev/null || {
+exec - silent grep -l 'define[ ][ ]*_[hl][di][rb]_libgen' ast_lib.h > /dev/null || {
exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/libgen.h > 1.${COTEMP}.x
exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/libgen.h 1.${COTEMP}.x
exec - then rm -f 1.${COTEMP}.x
exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/libgen.h
exec - fi
exec - }
-exec - ;;
-exec - esac
prev ${INSTALLROOT}/include/prototyped.h implicit
done ${INSTALLROOT}/include/ast/libgen.h generated
make ${INSTALLROOT}/include/ast/syslog.h
prev comp/syslog.h
prev ast_lib.h
-exec - case ${mam_cc_HOSTTYPE} in
-exec - win32.*)proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/syslog.h > 1.${COTEMP}.x
-exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/syslog.h 1.${COTEMP}.x
-exec - then rm -f 1.${COTEMP}.x
-exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/syslog.h
-exec - fi
-exec - ;;
-exec - *) silent grep -l 'define[ ][ ]*_[hl][di][rb]_syslog' ast_lib.h > /dev/null || {
+exec - silent grep -l 'define[ ][ ]*_[hl][di][rb]_syslog' ast_lib.h > /dev/null || {
exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/syslog.h > 1.${COTEMP}.x
exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/syslog.h 1.${COTEMP}.x
exec - then rm -f 1.${COTEMP}.x
exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/syslog.h
exec - fi
exec - }
-exec - ;;
-exec - esac
prev include/namval.h implicit
prev ${INSTALLROOT}/include/prototyped.h implicit
done ${INSTALLROOT}/include/ast/syslog.h generated
--- src/lib/libcmd/Mamfile
+++ src/lib/libcmd/Mamfile 2006-03-24 16:49:45.000000000 +0100
@@ -7,7 +7,7 @@
setv ARFLAGS cr
setv AS as
setv ASFLAGS
-setv CC cc
+setv CC gcc
setv mam_cc_FLAGS ${mam_cc_DLL}
setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?}
setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??}
@@ -29,7 +29,7 @@
setv NMAKEFLAGS
setv PR pr
setv PRFLAGS
-setv SHELL /bin/sh
+setv SHELL /bin/bash
setv SILENT
setv TAR tar
setv YACC yacc
@@ -540,7 +540,7 @@
prev id.c
meta id.o %.c>%.o id.c id
prev id.c
-exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_PACKAGE_ast -D_BLD_cmd -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2006 AT&T Knowledge Ventures][-license?http://www.opensource.org/licenses/cpl1.0.txt][--catalog?libcmd]"\" -c id.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 <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2006 AT&T Knowledge Ventures][-license?http://www.opensource.org/licenses/cpl1.0.txt][--catalog?libcmd]"\" -c id.c
done id.o generated
make join.o
prev join.c
--- src/lib/libdll/Mamfile
+++ src/lib/libdll/Mamfile 2006-03-24 16:50:04.000000000 +0100
@@ -7,7 +7,7 @@
setv ARFLAGS cr
setv AS as
setv ASFLAGS
-setv CC cc
+setv CC gcc
setv mam_cc_FLAGS ${mam_cc_DLL}
setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?}
setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??}
@@ -29,7 +29,7 @@
setv NMAKEFLAGS
setv PR pr
setv PRFLAGS
-setv SHELL /bin/sh
+setv SHELL /bin/bash
setv SILENT
setv TAR tar
setv YACC yacc