home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-01-21 | 106.9 KB | 3,894 lines |
- diff -rc --new-file pdksh-4.9/Makefile /gnu/src/amiga/pdksh-4.9/Makefile
- *** pdksh-4.9/Makefile Wed May 4 14:46:25 1994
- --- /gnu/src/amiga/pdksh-4.9/Makefile Thu Jan 1 00:00:00 1970
- ***************
- *** 1,43 ****
- - # PD Bourne/Korn Shell
- - # $Id: Makefile,v 1.5 93/05/08 15:59:28 sjg Exp $
- -
- - SHELL = /bin/sh
- - MAKE = make
- - CC=gcc -pipe -g -O
- - LN=ln -s
- - #LN=ln
- - #CONFIG= -D_SYSV
- - #CONFIG= -D_BSD
- - #CONFIG= -D_BSD -DHAVE_SYS_STDTYPES
- - #CONFIG= -D_V7
- - #CONFIG= -D_ST # Atari ST
- - #CONFIG= -D_BSDI -D_POSIX_TERM # BSD/386
- - CONFIG= -D_BSD -D_POSIX_TERM # 386bsd
- - MANPAGES = ksh.1
- - #MANDIR=/usr/catman/u_man/man1
- - #MANDIR=/usr/man/man1
- -
- - #INSTALL=bsdinstall
- - INSTALL=install
- -
- - all: ksh
- -
- - ksh: libs
- - ( cd sh ; $(MAKE) 'CC=$(CC)' 'CONFIG=$(CONFIG)' $@ )
- -
- - libs:
- - ( cd std ; $(MAKE) 'CC=$(CC)' 'CONFIG=$(CONFIG)' 'LN=$(LN)' libs )
- -
- - install: sh/ksh
- - ( cd sh ; $(INSTALL) -s ksh $(DESTDIR)/bin )
- -
- - sh/ksh: ksh
- -
- - inst-man: $(MANPAGES)
- - $(INSTALL) -c -m 444 $(MANPAGES) $(MANDESTDIR)/man1
- -
- - clean clobber:
- - ( cd std ; $(MAKE) $@ )
- - ( cd sh ; $(MAKE) $@ )
- - -rm -f *.out
- -
- --- 0 ----
- diff -rc --new-file pdksh-4.9/Makefile.in /gnu/src/amiga/pdksh-4.9/Makefile.in
- *** pdksh-4.9/Makefile.in Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/Makefile.in Sun Jul 10 10:31:14 1994
- ***************
- *** 0 ****
- --- 1,54 ----
- + # PD Bourne/Korn Shell
- + # $Id: Makefile,v 1.5 93/05/08 15:59:28 sjg Exp $
- +
- + #### Start of system configuration section. ####
- +
- + srcdir = @srcdir@
- + VPATH = @srcdir@
- +
- + # Common prefix for machine-independent installed files.
- + prefix = /gnu
- + # Common prefix for machine-dependent installed files.
- + exec_prefix = $(prefix)
- +
- + # Directory to install executables in.
- + bindir = $(exec_prefix)/bin
- + # Directory to install libraries in.
- + libdir = $(exec_prefix)/lib
- + # Directory to install the Info files in.
- + infodir = $(prefix)/info
- + # Directory to install the man page in.
- + mandir = $(prefix)/man/man$(manext)
- + # Number to put on the man page filename.
- + manext = 1
- +
- + # Program to install executables.
- + INSTALL_PROGRAM = @INSTALL_PROGRAM@
- + # Program to install data like man pages.
- + INSTALL_DATA = @INSTALL_DATA@
- + # Generic install program.
- + INSTALL = @INSTALL@
- +
- + #### End of system configuration section. ####
- +
- + SHELL = /bin/sh
- + MAKE = make
- +
- + MANPAGES = ksh.1
- +
- + all: ksh
- +
- + ksh: libs
- + @( cd sh ; $(MAKE) $@ )
- +
- + libs:
- + # @( cd std ; $(MAKE) $@ )
- +
- + install:
- + $(INSTALL_DATA) -c $(srcdir)/ksh.1 $(mandir)/ksh.1
- + @( cd sh ; $(MAKE) $@ )
- +
- + clean clobber:
- + # @( cd std ; $(MAKE) $@ )
- + @( cd sh ; $(MAKE) $@ )
- + -rm -f *.out
- diff -rc --new-file pdksh-4.9/Product-Info /gnu/src/amiga/pdksh-4.9/Product-Info
- *** pdksh-4.9/Product-Info Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/Product-Info Fri Nov 18 12:52:14 1994
- ***************
- *** 0 ****
- --- 1,31 ----
- + .name
- + pdksh
- + .fullname
- + Ksh compatible shell
- + .type
- + Shell
- + .short
- + A UNIX ksh compatible shell for AmigaDOS
- + .description
- + A KSH-like shell that is compatible enough with the real UNIX ksh to
- + be used with most scripts that the UNIX ksh can run.
- + .version
- + 4.9
- + .date
- + .author
- + Eric Gisin
- + Charles Forsyth
- + John R MacMillan
- + Simon J. Gerraty
- + Markus Wild
- + .distribution
- + Public Domain
- + .requirements
- + Amiga binary requires ixemul.library.
- + .docs
- + !README.AMIGA!
- + README
- + .described-by
- + Fred Fish (fnf@amigalib.com)
- + .submittal
- + Downloaded via ftp from wuarchive.wustl.edu.
- diff -rc --new-file pdksh-4.9/README.AMIGA /gnu/src/amiga/pdksh-4.9/README.AMIGA
- *** pdksh-4.9/README.AMIGA Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/README.AMIGA Tue Jun 14 08:46:22 1994
- ***************
- *** 0 ****
- --- 1,75 ----
- + This is the first release of the AmigaDOS port of pdksh, based on
- + the official 4.5 release of pdksh.
- +
- + Don't currently expect too much support for this, it's mainly for people
- + who want a true /bin/sh compatible shell, and don't primarily want a
- + replacement for the CLI SYSTEM SHELL.
- +
- +
- + Notes to the sources
- + ====================
- + If you cross-check with MANIFEST you see that I didn't include the std/
- + directory. This is simply because it's not needed with ixemul.library, and
- + I didn't want to include something useless for AmigaDOS. If you plan to
- + compile pdksh under an environment that would need std/, best thing is you
- + get the original distribution from a site archiving comp.sources.misc.
- +
- + DON'T FORGET TO SET THE PURE BIT ON KSH, archiving might have deleted it.
- +
- +
- + Known problems
- + ==============
- + o This really is a problem of ixemul.library v39.41: vfork() crashes when
- + under kickstart 1.3. I don't know exactly what happend that made vfork()
- + crash under 1.3, it once worked. However, I don't feel like investigating
- + this to extremes, I don't use 1.3 any longer. If someone really wants
- + it fixed, contact me, and we'll find a way.
- +
- + o don't stress ksh with ^C when in the commandline editor. Breaking usually
- + works to abort commands, don't use it when you already have the prompt.
- + This is probably a bug somewhere in select(), will need investigation.
- +
- +
- + Debugging help
- + ==============
- + If you set the TRACE_LEVEL environment variable, ksh tells you the address
- + of its main() function. This is extremely useful to interprete enforcer-
- + output, since in vfork()d processes, hunk-o-matic won't work and enforcer
- + doesn't output any hunk-offsets, just PC values. If you subtract the
- + address of main() from that PC, you get a relative value, instead of an
- + absolute, process dependant PC, which you can then use to look at the
- + code in your favorite disassembler.
- +
- +
- + libs/ixemul.library
- + ===================
- + This is the current version of the library, and it replaces the one
- + distributed with gcc21-920420.lha. Don't use any old libraries, they are
- + very buggy in those areas explored by ksh;-))
- +
- +
- + ixpipe-handler/*
- + ================
- + This is the first version of a bridge between ixemul.library and
- + programs reading/writing to DOS filehandles. I'd be happy for comments
- + on this! Be sure to mount the handler before trying to use I/O
- + redirection on non-ixemul programs in ksh! Don't try to use it IXPIPE:
- + like PIPE:, they're totally different! IXPIPE: is used automatically
- + if a non-ixemul program is execve()'d for each file descriptor 0, 1 or
- + 2 who's type is not that of a plain DOS file. A pipe would be an
- + example of a non-dos type.
- +
- +
- + Favorite usage
- + ==============
- + Setup a directory, assign BIN: to it, and copy ksh into BIN:sh. That way,
- + you can have the usual
- + SHELL=/bin/sh
- + in your Makefile ;-))
- +
- +
- + Happy testing!
- +
- + -Markus Wild
- +
- + <wild@nessie.cs.id.ethz.ch> and <wild@amiga.physik.unizh.ch>
- diff -rc --new-file pdksh-4.9/configure /gnu/src/amiga/pdksh-4.9/configure
- *** pdksh-4.9/configure Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/configure Tue Jun 14 10:10:02 1994
- ***************
- *** 0 ****
- --- 1,1117 ----
- + #!/bin/sh
- + # Guess values for system-dependent variables and create Makefiles.
- + # Generated automatically using autoconf version 1.11
- + # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
- +
- + # This configure script is free software; you can redistribute it and/or
- + # modify it under the terms of the GNU General Public License as published
- + # by the Free Software Foundation; either version 2, or (at your option)
- + # any later version.
- +
- + # This script is distributed in the hope that it will be useful, but
- + # WITHOUT ANY WARRANTY; without even the implied warranty of
- + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- + # Public License for more details.
- +
- + # You should have received a copy of the GNU General Public License
- + # along with this program; if not, write to the Free Software
- + # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- +
- + # Save the original args to write them into config.status later.
- + configure_args="$*"
- +
- + # Only options that might do something get documented.
- + ac_usage="Usage: configure [options] [host]
- + Options: [defaults in brackets after descriptions]
- + --build=BUILD configure for building on BUILD [BUILD=HOST]
- + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- + --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- + --exec-prefix=PREFIX install host dependent files in PREFIX [/usr/local]
- + --help print this message
- + --host=HOST configure for HOST [guessed]
- + --prefix=PREFIX install host independent files in PREFIX [/usr/local]
- + --quiet, --silent do not print \`checking for...' messages
- + --srcdir=DIR find the sources in DIR [configure dir or ..]
- + --target=TARGET configure for TARGET [TARGET=HOST]
- + --verbose print results of checks
- + --version print the version of autoconf that created configure
- + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- + --x-includes=DIR X include files are in DIR
- + --x-libraries=DIR X library files are in DIR"
- +
- + # Initialize some variables set by options.
- + # The variables have the same names as the options, with
- + # dashes changed to underlines.
- + build=NONE
- + exec_prefix=
- + host=NONE
- + no_create=
- + nonopt=NONE
- + norecursion=
- + prefix=
- + program_prefix=
- + program_suffix=
- + program_transform_name=
- + silent=
- + srcdir=
- + target=NONE
- + verbose=
- + x_includes=
- + x_libraries=
- +
- + ac_prev=
- + for ac_option
- + do
- +
- + # If the previous option needs an argument, assign it.
- + if test -n "$ac_prev"; then
- + eval "$ac_prev=\$ac_option"
- + ac_prev=
- + continue
- + fi
- +
- + # Accept (but ignore some of) the important Cygnus configure
- + # options, so we can diagnose typos.
- +
- + case "$ac_option" in
- + -*=*) ac_optarg=`/bin/echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- + *) ac_optarg= ;;
- + esac
- +
- + case "$ac_option" in
- +
- + -build | --build | --buil | --bui | --bu | --b)
- + ac_prev=build ;;
- + -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
- + build="$ac_optarg" ;;
- +
- + -disable-* | --disable-*)
- + ac_feature=`/bin/echo $ac_option|sed -e 's/-*disable-//'`
- + # Reject names that aren't valid shell variable names.
- + if test -n "`/bin/echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- + /bin/echo "configure: $ac_feature: invalid feature name" >&2; exit 1
- + fi
- + ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
- + eval "enable_${ac_feature}=no" ;;
- +
- + -enable-* | --enable-*)
- + ac_feature=`/bin/echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- + # Reject names that aren't valid shell variable names.
- + if test -n "`/bin/echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- + /bin/echo "configure: $ac_feature: invalid feature name" >&2; exit 1
- + fi
- + ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
- + case "$ac_option" in
- + *=*) ;;
- + *) ac_optarg=yes ;;
- + esac
- + eval "enable_${ac_feature}='$ac_optarg'" ;;
- +
- + # For backward compatibility, recognize -exec-prefix and --exec_prefix.
- + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- + | --exec | --exe | --ex)
- + ac_prev=exec_prefix ;;
- + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- + | --exec=* | --exe=* | --ex=*)
- + exec_prefix="$ac_optarg" ;;
- +
- + -gas | --gas | --ga | --g)
- + with_gas=yes ;; # Obsolete; use --with-gas.
- +
- + -help | --help | --hel | --he)
- + cat << EOF
- + $ac_usage
- + EOF
- + exit 0 ;;
- +
- + -host | --host | --hos | --ho)
- + ac_prev=host ;;
- + -host=* | --host=* | --hos=* | --ho=*)
- + host="$ac_optarg" ;;
- +
- + -nfp | --nfp | --nf)
- + with_fp=no ;; # Obsolete; use --without-fp.
- +
- + -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- + | --no-cr | --no-c)
- + no_create=yes ;;
- +
- + -norecursion | --norecursion | --norecursio | --norecursi \
- + | --norecurs | --norecur | --norecu | --norec | --nore | --nor)
- + norecursion=yes ;;
- +
- + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- + ac_prev=prefix ;;
- + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- + prefix="$ac_optarg" ;;
- +
- + -program-prefix | --program-prefix | --program-prefi | --program-pref \
- + | --program-pre | --program-pr | --program-p)
- + ac_prev=program_prefix ;;
- + -program-prefix=* | --program-prefix=* | --program-prefi=* \
- + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- + program_prefix="$ac_optarg" ;;
- +
- + -program-suffix | --program-suffix | --program-suffi | --program-suff \
- + | --program-suf | --program-su | --program-s)
- + ac_prev=program_suffix ;;
- + -program-suffix=* | --program-suffix=* | --program-suffi=* \
- + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- + program_suffix="$ac_optarg" ;;
- +
- + -program-transform-name | --program-transform-name \
- + | --program-transform-nam | --program-transform-na \
- + | --program-transform-n | --program-transform- \
- + | --program-transform | --program-transfor \
- + | --program-transfo | --program-transf \
- + | --program-trans | --program-tran \
- + | --progr-tra | --program-tr | --program-t)
- + ac_prev=program_transform_name ;;
- + -program-transform-name=* | --program-transform-name=* \
- + | --program-transform-nam=* | --program-transform-na=* \
- + | --program-transform-n=* | --program-transform-=* \
- + | --program-transform=* | --program-transfor=* \
- + | --program-transfo=* | --program-transf=* \
- + | --program-trans=* | --program-tran=* \
- + | --progr-tra=* | --program-tr=* | --program-t=*)
- + program_transform_name="$ac_optarg" ;;
- +
- + -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- + | -silent | --silent | --silen | --sile | --sil)
- + silent=yes ;;
- +
- + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- + ac_prev=srcdir ;;
- + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- + srcdir="$ac_optarg" ;;
- +
- + -target | --target | --targe | --targ | --tar | --ta | --t)
- + ac_prev=target ;;
- + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- + target="$ac_optarg" ;;
- +
- + -v | -verbose | --verbose | --verbos | --verbo | --verb)
- + verbose=yes ;;
- +
- + -version | --version | --versio | --versi | --vers)
- + /bin/echo "configure generated by autoconf version 1.11"
- + exit 0 ;;
- +
- + -with-* | --with-*)
- + ac_package=`/bin/echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- + # Reject names that aren't valid shell variable names.
- + if test -n "`/bin/echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- + /bin/echo "configure: $ac_package: invalid package name" >&2; exit 1
- + fi
- + ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
- + case "$ac_option" in
- + *=*) ;;
- + *) ac_optarg=yes ;;
- + esac
- + eval "with_${ac_package}='$ac_optarg'" ;;
- +
- + -without-* | --without-*)
- + ac_package=`/bin/echo $ac_option|sed -e 's/-*without-//'`
- + # Reject names that aren't valid shell variable names.
- + if test -n "`/bin/echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- + /bin/echo "configure: $ac_package: invalid package name" >&2; exit 1
- + fi
- + ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
- + eval "with_${ac_package}=no" ;;
- +
- + --x) with_x=yes ;; # Obsolete; use --with-x.
- +
- + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- + | --x-incl | --x-inc | --x-in | --x-i)
- + ac_prev=x_includes ;;
- + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- + x_includes="$ac_optarg" ;;
- +
- + -x-libraries | --x-libraries | --x-librarie | --x-librari \
- + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- + ac_prev=x_libraries ;;
- + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- + x_libraries="$ac_optarg" ;;
- +
- + -*) /bin/echo "configure: $ac_option: invalid option; use --help to show usage" >&2; exit 1
- + ;;
- +
- + *)
- + if test -n "`/bin/echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- + /bin/echo "configure: warning: $ac_option: invalid host type" >&2
- + fi
- + if test "x$nonopt" != xNONE; then
- + /bin/echo "configure: can only configure for one host and one target at a time" >&2; exit 1
- + fi
- + nonopt="$ac_option"
- + ;;
- +
- + esac
- + done
- +
- + if test -n "$ac_prev"; then
- + /bin/echo "configure: missing argument to --`/bin/echo $ac_prev | sed 's/_/-/g'`" >&2; exit 1
- + fi
- +
- + trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
- + trap 'rm -fr confdefs* $ac_clean_files' 0
- +
- + # Save the original args if we used an alternate arg parser.
- + ac_configure_temp="${configure_args-$*}"
- + # Strip out --no-create and --norecursion so they don't pile up.
- + configure_args=
- + for ac_arg in $ac_configure_temp; do
- + case "$ac_arg" in
- + -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- + | --no-cr | --no-c) ;;
- + -norecursion | --norecursion | --norecursio | --norecursi \
- + | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
- + *) configure_args="$configure_args $ac_arg" ;;
- + esac
- + done
- +
- + # NLS nuisances.
- + # These must not be set unconditionally because not all systems understand
- + # e.g. LANG=C (notably SCO).
- + if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
- + if test "${LANG+set}" = 'set'; then LANG=C; export LANG; fi
- +
- + # confdefs.h avoids OS command line length limits that DEFS can exceed.
- + rm -rf conftest* confdefs.h
- + # AIX cpp loses on an empty file, so make sure it contains at least a newline.
- + /bin/echo > confdefs.h
- +
- + # A filename unique to this package, relative to the directory that
- + # configure is in, which we can look for to find out if srcdir is correct.
- + ac_unique_file=sh/sh.h
- +
- + # Find the source files, if location was not specified.
- + if test -z "$srcdir"; then
- + ac_srcdir_defaulted=yes
- + # Try the directory containing this script, then `..'.
- + ac_prog=$0
- + ac_confdir=`/bin/echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- + srcdir=$ac_confdir
- + if test ! -r $srcdir/$ac_unique_file; then
- + srcdir=..
- + fi
- + fi
- + if test ! -r $srcdir/$ac_unique_file; then
- + if test x$ac_srcdir_defaulted = xyes; then
- + /bin/echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
- + else
- + /bin/echo "configure: can not find sources in ${srcdir}" >&2; exit 1
- + fi
- + fi
- + ac_ext=c
- + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- + ac_cpp='${CPP}'
- + ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
- +
- +
- +
- +
- + # We want these before the checks, so the checks can modify their values.
- + test -z "$CFLAGS" && CFLAGS= auto_cflags=1
- + test -z "$LDFLAGS" && LDFLAGS=
- +
- + if test -z "$CC"; then
- + # Extract the first word of `gcc', so it can be a program name with args.
- + set ac_dummy gcc; ac_word=$2
- + test -n "$silent" || /bin/echo "checking for $ac_word"
- + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- + for ac_dir in $PATH; do
- + test -z "$ac_dir" && ac_dir=.
- + if test -f $ac_dir/$ac_word; then
- + CC="gcc"
- + break
- + fi
- + done
- + IFS="$ac_save_ifs"
- + fi
- + test -z "$CC" && CC="cc"
- + test -n "$CC" && test -n "$verbose" && /bin/echo " setting CC to $CC"
- +
- + # Find out if we are using GNU C, under whatever name.
- + cat > conftest.c <<EOF
- + #ifdef __GNUC__
- + yes
- + #endif
- + EOF
- + ${CC-cc} -E conftest.c > conftest.out 2>&1
- + if egrep yes conftest.out >/dev/null 2>&1; then
- + GCC=1 # For later tests.
- + fi
- + rm -f conftest*
- +
- +
- + # If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
- + test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
- +
- +
- + test -n "$silent" || /bin/echo "checking how to run the C preprocessor"
- + if test -z "$CPP"; then
- + # This must be in double quotes, not single quotes, because CPP may get
- + # substituted into the Makefile and ``${CC-cc}'' will simply confuse
- + # make. It must be expanded now.
- + CPP="${CC-cc} -E"
- + cat > conftest.${ac_ext} <<EOF
- + #include "confdefs.h"
- + #include <stdio.h>
- + Syntax Error
- + EOF
- + # Some shells (Coherent) do redirections in the wrong order, so need
- + # the parens.
- + ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
- + if test -z "$ac_err"; then
- + :
- + else
- + rm -rf conftest*
- + CPP="${CC-cc} -E -traditional-cpp"
- + cat > conftest.${ac_ext} <<EOF
- + #include "confdefs.h"
- + #include <stdio.h>
- + Syntax Error
- + EOF
- + # Some shells (Coherent) do redirections in the wrong order, so need
- + # the parens.
- + ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
- + if test -z "$ac_err"; then
- + :
- + else
- + rm -rf conftest*
- + CPP=/lib/cpp
- + fi
- + rm -f conftest*
- + fi
- + rm -f conftest*
- + fi
- + test -n "$verbose" && /bin/echo " setting CPP to $CPP"
- +
- + if test -n "$GCC"; then
- + test -n "$silent" || /bin/echo "checking whether -traditional is needed"
- + ac_pattern="Autoconf.*'x'"
- + ac_prog='#include <sgtty.h>
- + Autoconf TIOCGETP'
- + cat > conftest.${ac_ext} <<EOF
- + #include "confdefs.h"
- + $ac_prog
- + EOF
- + eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
- + if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
- + rm -rf conftest*
- + ac_need_trad=1
- +
- + fi
- + rm -f conftest*
- +
- +
- + if test -z "$ac_need_trad"; then
- + ac_prog='#include <termio.h>
- + Autoconf TCGETA'
- + cat > conftest.${ac_ext} <<EOF
- + #include "confdefs.h"
- + $ac_prog
- + EOF
- + eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
- + if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
- + rm -rf conftest*
- + ac_need_trad=1
- +
- + fi
- + rm -f conftest*
- +
- + fi
- + test -n "$ac_need_trad" && CC="$CC -traditional"
- + fi
- +
- + # Make sure to not get the incompatible SysV /etc/install and
- + # /usr/sbin/install, which might be in PATH before a BSD-like install,
- + # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
- + # or the AFS install, which mishandles nonexistent args, or
- + # /usr/ucb/install on SVR4, which tries to use the nonexistent group
- + # `staff', or /sbin/install on IRIX which has incompatible command-line
- + # syntax. Sigh.
- + #
- + # On most BSDish systems install is in /usr/bin, not /usr/ucb
- + # anyway.
- + # This turns out not to be true, so the mere pathname isn't an indication
- + # of whether the program works. What we really need is a set of tests for
- + # the install program to see if it actually works in all the required ways.
- + #
- + # Avoid using ./install, which might have been erroneously created
- + # by make from ./install.sh.
- + if test -z "${INSTALL}"; then
- + test -n "$silent" || /bin/echo "checking for a BSD compatible install"
- + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- + for ac_dir in $PATH; do
- + case "$ac_dir" in
- + ''|.|/gnu/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
- + *)
- + # OSF1 and SCO ODT 3.0 have their own names for install.
- + for ac_prog in installbsd scoinst install; do
- + if test -f $ac_dir/$ac_prog; then
- + if test $ac_prog = install &&
- + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- + # AIX install. It has an incompatible calling convention.
- + # OSF/1 installbsd also uses dspmsg, but is usable.
- + :
- + else
- + INSTALL="$ac_dir/$ac_prog -c"
- + break 2
- + fi
- + fi
- + done
- + ;;
- + esac
- + done
- + IFS="$ac_save_ifs"
- + fi
- +
- + if test -z "$INSTALL"; then
- + # As a last resort, use the slow shell script.
- + for ac_dir in ${srcdir} ${srcdir}/.. ${srcdir}/../..; do
- + if test -f $ac_dir/install.sh; then
- + INSTALL="$ac_dir/install.sh -c"; break
- + fi
- + done
- + fi
- + if test -z "$INSTALL"; then
- + /bin/echo "configure: can not find install.sh in ${srcdir} or ${srcdir}/.. or ${srcdir}/../.." >&2; exit 1
- + fi
- + test -n "$verbose" && /bin/echo " setting INSTALL to $INSTALL"
- +
- + # Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}.
- + # It thinks the first close brace ends the variable substitution.
- + test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
- + test -n "$verbose" && /bin/echo " setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
- +
- + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
- + test -n "$verbose" && /bin/echo " setting INSTALL_DATA to $INSTALL_DATA"
- +
- + if test -z "$RANLIB"; then
- + # Extract the first word of `ranlib', so it can be a program name with args.
- + set ac_dummy ranlib; ac_word=$2
- + test -n "$silent" || /bin/echo "checking for $ac_word"
- + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- + for ac_dir in $PATH; do
- + test -z "$ac_dir" && ac_dir=.
- + if test -f $ac_dir/$ac_word; then
- + RANLIB="ranlib"
- + break
- + fi
- + done
- + IFS="$ac_save_ifs"
- + fi
- + test -z "$RANLIB" && RANLIB=":"
- + test -n "$RANLIB" && test -n "$verbose" && /bin/echo " setting RANLIB to $RANLIB"
- +
- + test -n "$silent" || /bin/echo "checking for ANSI C header files"
- + cat > conftest.${ac_ext} <<EOF
- + #include "confdefs.h"
- + #include <stdlib.h>
- + #include <stdarg.h>
- + #include <string.h>
- + #include <float.h>
- + EOF
- + # Some shells (Coherent) do redirections in the wrong order, so need
- + # the parens.
- + ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
- + if test -z "$ac_err"; then
- + rm -rf conftest*
- + # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- + /bin/echo '#include "confdefs.h"
- + #include <string.h>' > conftest.${ac_ext}
- + eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
- + if egrep "memchr" conftest.out >/dev/null 2>&1; then
- + rm -rf conftest*
- + # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- + cat > conftest.${ac_ext} <<EOF
- + #include "confdefs.h"
- + #include <ctype.h>
- + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
- + #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
- + #define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
- + int main () { int i; for (i = 0; i < 256; i++)
- + if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
- + exit (0); }
- +
- + EOF
- + eval $ac_compile
- + if test -s conftest && (./conftest; exit) 2>/dev/null; then
- + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- + /bin/echo '#include "confdefs.h"
- + #include <stdlib.h>' > conftest.${ac_ext}
- + eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
- + if egrep "free" conftest.out >/dev/null 2>&1; then
- + rm -rf conftest*
- +
- + {
- + test -n "$verbose" && \
- + /bin/echo " defining STDC_HEADERS"
- + /bin/echo "#define" STDC_HEADERS "1" >> confdefs.h
- + DEFS="$DEFS -DSTDC_HEADERS=1"
- + ac_sed_defs="${ac_sed_defs}\${ac_dA}STDC_HEADERS\${ac_dB}STDC_HEADERS\${ac_dC}1\${ac_dD}
- + \${ac_uA}STDC_HEADERS\${ac_uB}STDC_HEADERS\${ac_uC}1\${ac_uD}
- + \${ac_eA}STDC_HEADERS\${ac_eB}STDC_HEADERS\${ac_eC}1\${ac_eD}
- + "
- + }
- +
- +
- + fi
- + rm -f conftest*
- +
- +
- + fi
- + rm -fr conftest*
- +
- + fi
- + rm -f conftest*
- +
- +
- + fi
- + rm -f conftest*
- +
- + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
- + # for constant arguments. Useless!
- + test -n "$silent" || /bin/echo "checking for working alloca.h"
- + cat > conftest.${ac_ext} <<EOF
- + #include "confdefs.h"
- + #include <alloca.h>
- + int main() { return 0; }
- + int t() { char *p = alloca(2 * sizeof(int));; return 0; }
- + EOF
- + if eval $ac_compile; then
- + rm -rf conftest*
- +
- + {
- + test -n "$verbose" && \
- + /bin/echo " defining HAVE_ALLOCA_H"
- + /bin/echo "#define" HAVE_ALLOCA_H "1" >> confdefs.h
- + DEFS="$DEFS -DHAVE_ALLOCA_H=1"
- + ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA_H\${ac_dB}HAVE_ALLOCA_H\${ac_dC}1\${ac_dD}
- + \${ac_uA}HAVE_ALLOCA_H\${ac_uB}HAVE_ALLOCA_H\${ac_uC}1\${ac_uD}
- + \${ac_eA}HAVE_ALLOCA_H\${ac_eB}HAVE_ALLOCA_H\${ac_eC}1\${ac_eD}
- + "
- + }
- +
- +
- + fi
- + rm -f conftest*
- +
- + ac_decl="#ifdef __GNUC__
- + #define alloca __builtin_alloca
- + #else
- + #if HAVE_ALLOCA_H
- + #include <alloca.h>
- + #else
- + #ifdef _AIX
- + #pragma alloca
- + #else
- + char *alloca ();
- + #endif
- + #endif
- + #endif
- + "
- + test -n "$silent" || /bin/echo "checking for alloca"
- + cat > conftest.${ac_ext} <<EOF
- + #include "confdefs.h"
- + $ac_decl
- + int main() { return 0; }
- + int t() { char *p = (char *) alloca(1);; return 0; }
- + EOF
- + if eval $ac_compile; then
- + rm -rf conftest*
- +
- + {
- + test -n "$verbose" && \
- + /bin/echo " defining HAVE_ALLOCA"
- + /bin/echo "#define" HAVE_ALLOCA "1" >> confdefs.h
- + DEFS="$DEFS -DHAVE_ALLOCA=1"
- + ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA\${ac_dB}HAVE_ALLOCA\${ac_dC}1\${ac_dD}
- + \${ac_uA}HAVE_ALLOCA\${ac_uB}HAVE_ALLOCA\${ac_uC}1\${ac_uD}
- + \${ac_eA}HAVE_ALLOCA\${ac_eB}HAVE_ALLOCA\${ac_eC}1\${ac_eD}
- + "
- + }
- +
- +
- + else
- + rm -rf conftest*
- + ac_alloca_missing=1
- + cat > conftest.${ac_ext} <<EOF
- + #include "confdefs.h"
- +
- + #if defined(CRAY) && ! defined(CRAY2)
- + winnitude
- + #else
- + lossage
- + #endif
- +
- + EOF
- + eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
- + if egrep "winnitude" conftest.out >/dev/null 2>&1; then
- + rm -rf conftest*
- + test -n "$silent" || /bin/echo "checking for _getb67"
- + cat > conftest.${ac_ext} <<EOF
- + #include "confdefs.h"
- + #include <ctype.h>
- + int main() { return 0; }
- + int t() {
- + /* The GNU C library defines this for functions which it implements
- + to always fail with ENOSYS. Some functions are actually named
- + something starting with __ and the normal name is an alias. */
- + #if defined (__stub__getb67) || defined (__stub____getb67)
- + choke me
- + #else
- + /* Override any gcc2 internal prototype to avoid an error. */
- + extern char _getb67(); _getb67();
- + #endif
- + ; return 0; }
- + EOF
- + if eval $ac_compile; then
- + rm -rf conftest*
- + {
- + test -n "$verbose" && \
- + /bin/echo " defining" CRAY_STACKSEG_END to be "_getb67"
- + /bin/echo "#define" CRAY_STACKSEG_END "_getb67" >> confdefs.h
- + DEFS="$DEFS -DCRAY_STACKSEG_END=_getb67"
- + ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}_getb67\${ac_dD}
- + \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}_getb67\${ac_uD}
- + \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}_getb67\${ac_eD}
- + "
- + }
- +
- +
- + else
- + rm -rf conftest*
- + test -n "$silent" || /bin/echo "checking for GETB67"
- + cat > conftest.${ac_ext} <<EOF
- + #include "confdefs.h"
- + #include <ctype.h>
- + int main() { return 0; }
- + int t() {
- + /* The GNU C library defines this for functions which it implements
- + to always fail with ENOSYS. Some functions are actually named
- + something starting with __ and the normal name is an alias. */
- + #if defined (__stub_GETB67) || defined (__stub___GETB67)
- + choke me
- + #else
- + /* Override any gcc2 internal prototype to avoid an error. */
- + extern char GETB67(); GETB67();
- + #endif
- + ; return 0; }
- + EOF
- + if eval $ac_compile; then
- + rm -rf conftest*
- + {
- + test -n "$verbose" && \
- + /bin/echo " defining" CRAY_STACKSEG_END to be "GETB67"
- + /bin/echo "#define" CRAY_STACKSEG_END "GETB67" >> confdefs.h
- + DEFS="$DEFS -DCRAY_STACKSEG_END=GETB67"
- + ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}GETB67\${ac_dD}
- + \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}GETB67\${ac_uD}
- + \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}GETB67\${ac_eD}
- + "
- + }
- +
- +
- + else
- + rm -rf conftest*
- + test -n "$silent" || /bin/echo "checking for getb67"
- + cat > conftest.${ac_ext} <<EOF
- + #include "confdefs.h"
- + #include <ctype.h>
- + int main() { return 0; }
- + int t() {
- + /* The GNU C library defines this for functions which it implements
- + to always fail with ENOSYS. Some functions are actually named
- + something starting with __ and the normal name is an alias. */
- + #if defined (__stub_getb67) || defined (__stub___getb67)
- + choke me
- + #else
- + /* Override any gcc2 internal prototype to avoid an error. */
- + extern char getb67(); getb67();
- + #endif
- + ; return 0; }
- + EOF
- + if eval $ac_compile; then
- + rm -rf conftest*
- + {
- + test -n "$verbose" && \
- + /bin/echo " defining" CRAY_STACKSEG_END to be "getb67"
- + /bin/echo "#define" CRAY_STACKSEG_END "getb67" >> confdefs.h
- + DEFS="$DEFS -DCRAY_STACKSEG_END=getb67"
- + ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}getb67\${ac_dD}
- + \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}getb67\${ac_uD}
- + \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}getb67\${ac_eD}
- + "
- + }
- +
- +
- + fi
- + rm -f conftest*
- +
- + fi
- + rm -f conftest*
- +
- + fi
- + rm -f conftest*
- +
- +
- + fi
- + rm -f conftest*
- +
- +
- + fi
- + rm -f conftest*
- +
- + if test -n "$ac_alloca_missing"; then
- + # The SVR3 libPW and SVR4 libucb both contain incompatible functions
- + # that cause trouble. Some versions do not even contain alloca or
- + # contain a buggy version. If you still want to use their alloca,
- + # use ar to extract alloca.o from them instead of compiling alloca.c.
- + ALLOCA=alloca.o
- +
- + {
- + test -n "$verbose" && \
- + /bin/echo " defining C_ALLOCA"
- + /bin/echo "#define" C_ALLOCA "1" >> confdefs.h
- + DEFS="$DEFS -DC_ALLOCA=1"
- + ac_sed_defs="${ac_sed_defs}\${ac_dA}C_ALLOCA\${ac_dB}C_ALLOCA\${ac_dC}1\${ac_dD}
- + \${ac_uA}C_ALLOCA\${ac_uB}C_ALLOCA\${ac_uC}1\${ac_uD}
- + \${ac_eA}C_ALLOCA\${ac_eB}C_ALLOCA\${ac_eC}1\${ac_eD}
- + "
- + }
- +
- +
- + test -n "$silent" || /bin/echo "checking stack direction for C alloca"
- + test -n "$silent" || /bin/echo "checking whether cross-compiling"
- + # If we cannot run a trivial program, we must be cross compiling.
- + cat > conftest.${ac_ext} <<EOF
- + #include "confdefs.h"
- + main(){exit(0);}
- + EOF
- + eval $ac_compile
- + if test -s conftest && (./conftest; exit) 2>/dev/null; then
- + :
- + else
- + cross_compiling=1
- + fi
- + rm -fr conftest*
- +
- + if test -n "$cross_compiling"
- + then
- +
- + {
- + test -n "$verbose" && \
- + /bin/echo " defining" STACK_DIRECTION to be "0"
- + /bin/echo "#define" STACK_DIRECTION "0" >> confdefs.h
- + DEFS="$DEFS -DSTACK_DIRECTION=0"
- + ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}0\${ac_dD}
- + \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}0\${ac_uD}
- + \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}0\${ac_eD}
- + "
- + }
- +
- + else
- + cat > conftest.${ac_ext} <<EOF
- + #include "confdefs.h"
- + find_stack_direction ()
- + {
- + static char *addr = 0;
- + auto char dummy;
- + if (addr == 0)
- + {
- + addr = &dummy;
- + return find_stack_direction ();
- + }
- + else
- + return (&dummy > addr) ? 1 : -1;
- + }
- + main ()
- + {
- + exit (find_stack_direction() < 0);
- + }
- + EOF
- + eval $ac_compile
- + if test -s conftest && (./conftest; exit) 2>/dev/null; then
- +
- + {
- + test -n "$verbose" && \
- + /bin/echo " defining" STACK_DIRECTION to be "1"
- + /bin/echo "#define" STACK_DIRECTION "1" >> confdefs.h
- + DEFS="$DEFS -DSTACK_DIRECTION=1"
- + ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}1\${ac_dD}
- + \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}1\${ac_uD}
- + \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}1\${ac_eD}
- + "
- + }
- +
- +
- + else
- +
- + {
- + test -n "$verbose" && \
- + /bin/echo " defining" STACK_DIRECTION to be "-1"
- + /bin/echo "#define" STACK_DIRECTION "-1" >> confdefs.h
- + DEFS="$DEFS -DSTACK_DIRECTION=-1"
- + ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}-1\${ac_dD}
- + \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}-1\${ac_uD}
- + \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}-1\${ac_eD}
- + "
- + }
- +
- + fi
- + fi
- + rm -fr conftest*
- + fi
- +
- +
- + # The preferred way to propogate these variables is regular @ substitutions.
- + if test -n "$prefix"; then
- + ac_prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%"
- + else
- + prefix=/usr/local
- + fi
- + if test -n "$exec_prefix"; then
- + ac_prsub="$ac_prsub
- + s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
- + else
- + exec_prefix='${prefix}' # Let make expand it.
- + fi
- +
- + # Any assignment to VPATH causes Sun make to only execute
- + # the first set of double-colon rules, so remove it if not needed.
- + # If there is a colon in the path, we need to keep it.
- + if test "x$srcdir" = x.; then
- + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
- + fi
- +
- + # Quote sed substitution magic chars in DEFS.
- + cat >conftest.def <<EOF
- + $DEFS
- + EOF
- + ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
- + DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
- + rm -f conftest.def
- + # Substitute for predefined variables.
- +
- + trap 'rm -f config.status; exit 1' 1 2 15
- + /bin/echo creating config.status
- + # Some systems, like AmigaDOS, won't allow you to remove a script that is
- + # being executed, so just move it out of the way instead.
- + if test -f config.status; then mv config.status config.status.old; else true; fi
- + cat > config.status <<EOF
- + #!/bin/sh
- + # Generated automatically by configure.
- + # Run this file to recreate the current configuration.
- + # This directory was configured as follows,
- + # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
- + #
- + # $0 $configure_args
- +
- + ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
- + for ac_option
- + do
- + case "\$ac_option" in
- + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- + /bin/echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
- + exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
- + -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- + /bin/echo "config.status generated by autoconf version 1.11"
- + exit 0 ;;
- + -help | --help | --hel | --he | --h)
- + /bin/echo "\$ac_cs_usage"; exit 0 ;;
- + *) /bin/echo "\$ac_cs_usage"; exit 1 ;;
- + esac
- + done
- +
- + trap 'rm -fr Makefile sh/Makefile sh/config.h conftest*; exit 1' 1 2 15
- + CC='$CC'
- + CFLAGS='$CFLAGS'
- + LDFLAGS='$LDFLAGS'
- + CPP='$CPP'
- + INSTALL='$INSTALL'
- + INSTALL_PROGRAM='$INSTALL_PROGRAM'
- + INSTALL_DATA='$INSTALL_DATA'
- + RANLIB='$RANLIB'
- + ALLOCA='$ALLOCA'
- + LIBS='$LIBS'
- + srcdir='$srcdir'
- + top_srcdir='$top_srcdir'
- + prefix='$prefix'
- + exec_prefix='$exec_prefix'
- + ac_prsub='$ac_prsub'
- + ac_vpsub='$ac_vpsub'
- + extrasub='$extrasub'
- + EOF
- + cat >> config.status <<\EOF
- +
- + ac_given_srcdir=$srcdir
- +
- + CONFIG_FILES=${CONFIG_FILES-"Makefile sh/Makefile"}
- + for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
- + # Remove last slash and all that follows it. Not all systems have dirname.
- + ac_dir=`/bin/echo $ac_file|sed 's%/[^/][^/]*$%%'`
- + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- + # The file is in a subdirectory.
- + test ! -d "$ac_dir" && mkdir "$ac_dir"
- + ac_dir_suffix="/$ac_dir"
- + else
- + ac_dir_suffix=
- + fi
- +
- + # A "../" for each directory in $ac_dir_suffix.
- + ac_dots=`/bin/echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- + case "$ac_given_srcdir" in
- + .) srcdir=.
- + if test -z "$ac_dir_suffix"; then top_srcdir=.
- + else top_srcdir=`/bin/echo $ac_dots|sed 's%/$%%'`; fi ;;
- + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- + *) # Relative path.
- + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- + top_srcdir="$ac_dots$ac_given_srcdir" ;;
- + esac
- +
- + /bin/echo creating "$ac_file"
- + rm -f "$ac_file"
- + comment_str="Generated automatically from `/bin/echo $ac_file|sed 's|.*/||'`.in by configure."
- + case "$ac_file" in
- + *.c | *.h | *.C | *.cc | *.m ) /bin/echo "/* $comment_str */" > "$ac_file" ;;
- + * ) /bin/echo "# $comment_str" > "$ac_file" ;;
- + esac
- + sed -e "
- + $ac_prsub
- + $ac_vpsub
- + $extrasub
- + s%@CC@%$CC%g
- + s%@CFLAGS@%$CFLAGS%g
- + s%@LDFLAGS@%$LDFLAGS%g
- + s%@CPP@%$CPP%g
- + s%@INSTALL@%$INSTALL%g
- + s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
- + s%@INSTALL_DATA@%$INSTALL_DATA%g
- + s%@RANLIB@%$RANLIB%g
- + s%@ALLOCA@%$ALLOCA%g
- + s%@LIBS@%$LIBS%g
- + s%@srcdir@%$srcdir%g
- + s%@top_srcdir@%$top_srcdir%g
- + s%@prefix@%$prefix%g
- + s%@exec_prefix@%$exec_prefix%g
- + s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
- + fi; done
- +
- + # These sed commands are put into ac_sed_defs when defining a macro.
- + # They are broken into pieces to make the sed script easier to manage.
- + # They are passed to sed as "A NAME B NAME C VALUE D", where NAME
- + # is the cpp macro being defined and VALUE is the value it is being given.
- + # Each defining turns into a single global substitution command.
- + # Hopefully no one uses "!" as a variable value.
- + # Other candidates for the sed separators, like , and @, do get used.
- + #
- + # ac_d sets the value in "#define NAME VALUE" lines.
- + ac_dA='s!^\([ ]*\)#\([ ]*define[ ][ ]*\)'
- + ac_dB='\([ ][ ]*\)[^ ]*!\1#\2'
- + ac_dC='\3'
- + ac_dD='!g'
- + # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
- + ac_uA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
- + ac_uB='\([ ]\)!\1#\2define\3'
- + ac_uC=' '
- + ac_uD='\4!g'
- + # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
- + ac_eA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
- + ac_eB='$!\1#\2define\3'
- + ac_eC=' '
- + ac_eD='!g'
- + rm -f conftest.sed
- + EOF
- + # Turn off quoting long enough to insert the sed commands.
- + rm -f conftest.sh
- + cat > conftest.sh <<EOF
- + $ac_sed_defs
- + EOF
- +
- + # Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
- + # on the size of here documents.
- +
- + # Maximum number of lines to put in a single here document.
- + ac_max_sh_lines=9
- +
- + while :
- + do
- + # wc gives bogus results for an empty file on some AIX systems.
- + ac_lines=`grep -c . conftest.sh`
- + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- + rm -f conftest.s1 conftest.s2
- + sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -9.
- + sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +10.
- + # Write a limited-size here document to append to conftest.sed.
- + /bin/echo 'cat >> conftest.sed <<CONFEOF' >> config.status
- + cat conftest.s1 >> config.status
- + /bin/echo 'CONFEOF' >> config.status
- + rm -f conftest.s1 conftest.sh
- + mv conftest.s2 conftest.sh
- + done
- + rm -f conftest.sh
- +
- + # Now back to your regularly scheduled config.status.
- + cat >> config.status <<\EOF
- + # This sed command replaces #undef's with comments. This is necessary, for
- + # example, in the case of _POSIX_SOURCE, which is predefined and required
- + # on some systems where configure will not decide to define it in
- + # sh/config.h.
- + cat >> conftest.sed <<\CONFEOF
- + s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
- + CONFEOF
- + rm -f conftest.h
- + # Break up the sed commands because old seds have small limits.
- + ac_max_sed_lines=20
- +
- + CONFIG_HEADERS=${CONFIG_HEADERS-"sh/config.h"}
- + for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
- + /bin/echo creating $ac_file
- +
- + cp $ac_given_srcdir/$ac_file.in conftest.h1
- + cp conftest.sed conftest.stm
- + while :
- + do
- + ac_lines=`grep -c . conftest.stm`
- + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- + rm -f conftest.s1 conftest.s2 conftest.h2
- + sed ${ac_max_sed_lines}q conftest.stm > conftest.s1 # Like head -20.
- + sed 1,${ac_max_sed_lines}d conftest.stm > conftest.s2 # Like tail +21.
- + sed -f conftest.s1 < conftest.h1 > conftest.h2
- + rm -f conftest.s1 conftest.h1 conftest.stm
- + mv conftest.h2 conftest.h1
- + mv conftest.s2 conftest.stm
- + done
- + rm -f conftest.stm conftest.h
- + /bin/echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- + cat conftest.h1 >> conftest.h
- + rm -f conftest.h1
- + if cmp -s $ac_file conftest.h 2>/dev/null; then
- + # The file exists and we would not be changing it.
- + /bin/echo "$ac_file is unchanged"
- + rm -f conftest.h
- + else
- + rm -f $ac_file
- + mv conftest.h $ac_file
- + fi
- + fi; done
- + rm -f conftest.sed
- +
- +
- +
- + exit 0
- + EOF
- + chmod +x config.status
- + # Some shells look in PATH for config.status without the "./".
- + test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} ./config.status
- +
- diff -rc --new-file pdksh-4.9/configure.in /gnu/src/amiga/pdksh-4.9/configure.in
- *** pdksh-4.9/configure.in Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/configure.in Tue Jun 14 09:37:39 1994
- ***************
- *** 0 ****
- --- 1,23 ----
- + dnl Process this file with autoconf to produce a configure script.
- + AC_INIT(sh/sh.h)
- + AC_CONFIG_HEADER(sh/config.h)
- +
- + # We want these before the checks, so the checks can modify their values.
- + test -z "$CFLAGS" && CFLAGS= auto_cflags=1
- + test -z "$LDFLAGS" && LDFLAGS=
- +
- + AC_PROG_CC
- +
- + # If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
- + test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
- +
- + AC_SUBST(CFLAGS)dnl
- + AC_SUBST(LDFLAGS)dnl
- +
- + AC_PROG_CPP
- + AC_GCC_TRADITIONAL
- + AC_PROG_INSTALL
- + AC_PROG_RANLIB
- + AC_STDC_HEADERS
- + AC_ALLOCA
- + AC_OUTPUT(Makefile sh/Makefile)
- diff -rc --new-file pdksh-4.9/sh/Makefile /gnu/src/amiga/pdksh-4.9/sh/Makefile
- *** pdksh-4.9/sh/Makefile Wed May 4 14:46:32 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/Makefile Thu Jan 1 00:00:00 1970
- ***************
- *** 1,317 ****
- - # PD Bourne/Korn Shell
- - # $Id: Makefile,v 1.6 93/05/08 15:59:56 sjg Exp $
- -
- - # Makefile is setup for 386bsd
- -
- - SHELL = /bin/sh
- - MAKE = make
- -
- - LN = ln -s
- -
- - CHMOD=chmod
- -
- - prefix=/usr/local
- -
- - target=$(prefix)/bin/ksh
- -
- - # You _can_ build this shell without the ../std tree if your
- - # system provides a sufficiently POSIX environment, or if your
- - # BSD system is a Sun or close. If not try ../std.
- -
- - # gcc is good value on most mc68k's and sun386's if nothing else.
- - # if you don't have gcc cc should do
- - # CC=gcc -pipe
- - CC=gcc -pipe
- -
- - # The following are the defintions used (or thereabouts)
- - # to build ksh without ../std
- - #
- - # sun386 SunOS 4.0.2, sun3 SunOS 4.0.3
- - # SYSFLAGS=-D_BSD
- - # XOPTS=-DNOSTDHDRS
- - # copy these from ../std/stdc or ensure they are in libstdc.a
- - # XOBJS = memmove.o strstr.o
- - #
- - # sun3 SunOS 4.1.1
- - # SYSFLAGS=-D_BSD
- - # XOPTS=-DNOSTDHDRS
- - # copy these from ../std/stdc or ensure they are in libstdc.a
- - # XOBJS = memmove.o
- - #
- - # sun4c (sparc) SunOS 4.1.1
- - # CC=cc -pipe # don't use gcc
- - # SYSFLAGS=-D_BSD
- - # XOPTS=-DNOSTDHDRS
- - # copy these from ../std/stdc or ensure they are in libstdc.a
- - # XOBJS = memmove.o
- - #
- - # Bull DPX/2 B.O.S. 2.00.45
- - # CC=gcc -ansi
- - # SYSFLAGS=-D_POSIX_SOURCE
- - # XOPTS=
- - # XOBJS=
- - #
- - # Minix-386 1.5.10 with estdio
- - # SYSFLAGS= -D_BSD -D_MINIX -D_POSIX_SOURCE
- - # XOPTS=
- - # XOBJS=
- - #
- - # 386bsd-0.1 pk 0.2.3
- - # SYSFLAGS= -D_BSD -D_POSIX_TERM
- - # XOPTS=
- - # XOBJS=
- - #
- - # BSD/386
- - # SYSFLAGS= -D_BSDI -D_POSIX_TERM -D_POSIX_SOURCE
- - # XOPTS=
- - # XOBJS=
- -
- - #SYSFLAGS= -D_SYSV
- - #SYSFLAGS= -D_BSD -DHAVE_SYS_STDTYPES
- - #SYSFLAGS= -D_BSD
- -
- - SYSFLAGS= -D_BSD -D_POSIX_TERM
- -
- - CONFLAGS=-DCOMPLEX_HISTORY
- -
- - CONFIG=$(SYSFLAGS) $(CONFLAGS)
- -
- - STD=../std
- - INCL=$(STD)/h
- - #XINCL=-I$(INCL)
- - LDOPTS=-L$(STD)
- - XOBJS=
- -
- - # use -O if you trust it :-)
- - DBG=-g -O
- - CFLAGS = $(DBG) $(CONFIG) $(XINCL) $(XOPTS)
- -
- - LDFLAGS = $(DBG)
- -
- - COMPATLIBS = #$(LDOPTS) -lstdc -lposix
- - #XLIBS = -lc_s
- - #XLIBS = -ldirent
- - LDLIBS = $(COMPATLIBS) $(XLIBS)
- -
- - HDRS = sh.h table.h expand.h lex.h tree.h tty.h trace.h
- - SRCS1 = version.c main.c misc.c trap.c alloc.c io.c \
- - syn.c lex.c edit.c emacs.c vi.c history.c tree.c
- - SRCS2 = exec.c jobs.c \
- - c_sh.c c_ksh.c c_test.c getopts.c do_ulimit.c \
- - var.c table.c eval.c expr.c mail.c sigact.c trace.c
- - SRCS = Makefile $(HDRS) $(SRCS1) $(SRCS2)
- -
- - OBJS = version.o main.o misc.o \
- - syn.o lex.o edit.o emacs.o vi.o tree.o \
- - exec.o jobs.o trap.o \
- - c_sh.o c_ksh.o c_test.o \
- - do_ulimit.o getopts.o expr.o history.o \
- - var.o table.o alloc.o io.o eval.o mail.o sigact.o trace.o $(XOBJS)
- -
- - ksh: $(OBJS)
- - $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
- -
- - clean:
- - rm -f *.o *.out core
- -
- - clobber: clean
- - rm -f ksh
- -
- - link:
- - ($(SHELL) ../std/mklinks ../std/h stdh.h)
- -
- -
- - depend:
- - makedepend $(CFLAGS) $(SRCS1) $(SRCS2)
- -
- - install:
- - -if test -f $(target); then mv $(target) $(target).old; fi
- - cp ksh $(target)
- - $(CHMOD) 755 $(target)
- -
- - .c.s:
- - $(CC) $(CFLAGS) -S -o $@ $<
- -
- - asms: $(OBJS:.o=.s)
- -
- -
- - # DO NOT DELETE THIS LINE -- make depend depends on it.
- - # If this runs make out of memory, delete /usr/include lines.
- - alloc.o: alloc.c
- - alloc.o: config.h
- - alloc.o: sh.h
- - alloc.o: stdh.h
- - alloc.o: trace.h
- - c_ksh.o: c_ksh.c
- - c_ksh.o: config.h
- - c_ksh.o: sh.h
- - c_ksh.o: stdh.h
- - c_ksh.o: table.h
- - c_ksh.o: trace.h
- - c_sh.o: c_sh.c
- - c_sh.o: config.h
- - c_sh.o: lex.h
- - c_sh.o: sh.h
- - c_sh.o: stdh.h
- - c_sh.o: table.h
- - c_sh.o: trace.h
- - c_sh.o: tree.h
- - c_test.o: c_test.c
- - c_test.o: config.h
- - c_test.o: sh.h
- - c_test.o: stdh.h
- - c_test.o: trace.h
- - edit.o: config.h
- - edit.o: edit.c
- - edit.o: edit.h
- - edit.o: lex.h
- - edit.o: sh.h
- - edit.o: stdh.h
- - edit.o: trace.h
- - edit.o: tty.h
- - emacs.o: config.h
- - emacs.o: edit.h
- - emacs.o: emacs.c
- - emacs.o: expand.h
- - emacs.o: lex.h
- - emacs.o: sh.h
- - emacs.o: stdh.h
- - emacs.o: table.h
- - emacs.o: trace.h
- - emacs.o: tree.h
- - eval.o: config.h
- - eval.o: eval.c
- - eval.o: expand.h
- - eval.o: lex.h
- - eval.o: sh.h
- - eval.o: stdh.h
- - eval.o: table.h
- - eval.o: trace.h
- - eval.o: tree.h
- - exec.o: config.h
- - exec.o: exec.c
- - exec.o: lex.h
- - exec.o: sh.h
- - exec.o: stdh.h
- - exec.o: table.h
- - exec.o: trace.h
- - exec.o: tree.h
- - expr.o: config.h
- - expr.o: expr.c
- - expr.o: sh.h
- - expr.o: stdh.h
- - expr.o: table.h
- - expr.o: trace.h
- - getopts.o: config.h
- - getopts.o: getopts.c
- - getopts.o: sh.h
- - getopts.o: stdh.h
- - getopts.o: table.h
- - getopts.o: trace.h
- - history.o: config.h
- - history.o: history.c
- - history.o: lex.h
- - history.o: sh.h
- - history.o: stdh.h
- - history.o: trace.h
- - io.o: config.h
- - io.o: io.c
- - io.o: sh.h
- - io.o: stdh.h
- - io.o: trace.h
- - jobs.o: config.h
- - jobs.o: jobs.c
- - jobs.o: sh.h
- - jobs.o: stdh.h
- - jobs.o: trace.h
- - jobs.o: tree.h
- - lex.o: config.h
- - lex.o: expand.h
- - lex.o: lex.c
- - lex.o: lex.h
- - lex.o: sh.h
- - lex.o: stdh.h
- - lex.o: table.h
- - lex.o: trace.h
- - lex.o: tree.h
- - mail.o: config.h
- - mail.o: mail.c
- - mail.o: sh.h
- - mail.o: stdh.h
- - mail.o: table.h
- - mail.o: trace.h
- - main.o: config.h
- - main.o: lex.h
- - main.o: main.c
- - main.o: sh.h
- - main.o: stdh.h
- - main.o: table.h
- - main.o: trace.h
- - main.o: tree.h
- - memmove.o: memmove.c
- - memmove.o: stdh.h
- - misc.o: config.h
- - misc.o: expand.h
- - misc.o: misc.c
- - misc.o: sh.h
- - misc.o: stdh.h
- - misc.o: trace.h
- - strstr.o: stdh.h
- - strstr.o: strstr.c
- - syn.o: config.h
- - syn.o: expand.h
- - syn.o: lex.h
- - syn.o: sh.h
- - syn.o: stdh.h
- - syn.o: syn.c
- - syn.o: table.h
- - syn.o: trace.h
- - syn.o: tree.h
- - sigact.o: sigact.h sigact.c
- - table.o: config.h
- - table.o: sh.h
- - table.o: stdh.h
- - table.o: table.c
- - table.o: table.h
- - table.o: trace.h
- - times.o: times.c
- - trace.o: trace.c
- - trap.o: config.h
- - trap.o: sh.h
- - trap.o: stdh.h
- - trap.o: trace.h
- - trap.o: trap.c
- - tree.o: config.h
- - tree.o: sh.h
- - tree.o: stdh.h
- - tree.o: trace.h
- - tree.o: tree.c
- - tree.o: tree.h
- - do_ulimit.o: config.h
- - do_ulimit.o: sh.h
- - do_ulimit.o: stdh.h
- - do_ulimit.o: trace.h
- - do_ulimit.o: do_ulimit.c
- - var.o: config.h
- - var.o: expand.h
- - var.o: sh.h
- - var.o: stdh.h
- - var.o: table.h
- - var.o: trace.h
- - var.o: var.c
- - version.o: config.h
- - version.o: sh.h
- - version.o: stdh.h
- - version.o: trace.h
- - version.o: version.c
- - vi.o: config.h
- - vi.o: edit.h
- - vi.o: expand.h
- - vi.o: lex.h
- - vi.o: sh.h
- - vi.o: stdh.h
- - vi.o: table.h
- - vi.o: trace.h
- - vi.o: tree.h
- - vi.o: vi.c
- - # WARNING: Put nothing here or make depend will gobble it up!
- --- 0 ----
- diff -rc --new-file pdksh-4.9/sh/Makefile.in /gnu/src/amiga/pdksh-4.9/sh/Makefile.in
- *** pdksh-4.9/sh/Makefile.in Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/sh/Makefile.in Sat Jul 9 12:17:14 1994
- ***************
- *** 0 ****
- --- 1,283 ----
- + # PD Bourne/Korn Shell
- + # $Id: Makefile,v 1.6 93/05/08 15:59:56 sjg Exp $
- +
- + #### Start of system configuration section. ####
- +
- + VPATH = @srcdir@
- + srcdir = @srcdir@
- +
- + # Common prefix for machine-independent installed files.
- + prefix = /gnu
- + # Common prefix for machine-dependent installed files.
- + exec_prefix = $(prefix)
- +
- + # Directory to install executables in.
- + bindir = $(exec_prefix)/bin
- + # Directory to install libraries in.
- + libdir = $(exec_prefix)/lib
- + # Directory to install the Info files in.
- + infodir = $(prefix)/info
- + # Directory to install the man page in.
- + mandir = $(prefix)/man/man$(manext)
- + # Number to put on the man page filename.
- + manext = 1
- +
- + # Program to install executables.
- + INSTALL_PROGRAM = @INSTALL_PROGRAM@
- + # Program to install data like man pages.
- + INSTALL_DATA = @INSTALL_DATA@
- + # Generic install program.
- + INSTALL = @INSTALL@
- +
- + # For now we need to use an older gcc, so name it explicitly.
- + #CC = @CC@
- + CC=gcc-2.3.3
- +
- + DEFS = @DEFS@ -D_BSD -DUSE_TRACE -DDEBUG_AFREE
- + CFLAGS = @CFLAGS@ -resident
- +
- + LDFLAGS = @LDFLAGS@ -resident
- + LIBS = @LIBS@
- +
- + # AmigaDOS hack. Symbolic links are available, but the actual link
- + # name needs to be AmigaDOS format (device:path1/path2/...). When
- + # ixemul.library makes them in this format, this can be enabled.
- + #LN_S = @LN_S@
- + LN_S = cp
- +
- + #### End of system configuration section. ####
- +
- + # "-I." is needed to find config.h in the build directory.
- + .c.o:
- + $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $< $(OUTPUT_OPTION)
- +
- + SHELL = /bin/sh
- + MAKE = make
- + CHMOD = chmod
- +
- + XOBJS=amiga.o
- +
- + COMPATLIBS =
- + LDLIBS = $(COMPATLIBS) $(XLIBS)
- +
- + HDRS = sh.h table.h expand.h lex.h tree.h tty.h trace.h
- + SRCS1 = version.c main.c misc.c trap.c alloc.c io.c \
- + syn.c lex.c edit.c emacs.c vi.c history.c tree.c
- + SRCS2 = exec.c jobs.c \
- + c_sh.c c_ksh.c c_test.c getopts.c do_ulimit.c \
- + var.c table.c eval.c expr.c mail.c sigact.c trace.c
- + SRCS = Makefile $(HDRS) $(SRCS1) $(SRCS2)
- +
- + OBJS = version.o main.o misc.o \
- + syn.o lex.o edit.o emacs.o vi.o tree.o \
- + exec.o jobs.o trap.o \
- + c_sh.o c_ksh.o c_test.o \
- + do_ulimit.o getopts.o expr.o history.o \
- + var.o table.o alloc.o io.o eval.o mail.o sigact.o trace.o $(XOBJS)
- +
- + ksh: $(OBJS)
- + $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
- +
- + clean:
- + rm -f *.o *.out core
- +
- + clobber: clean
- + rm -f ksh
- +
- + link:
- + ($(SHELL) ../std/mklinks ../std/h stdh.h)
- +
- +
- + depend:
- + makedepend $(CFLAGS) $(SRCS1) $(SRCS2)
- +
- + install: ksh
- + $(INSTALL_PROGRAM) -c ksh $(bindir)/ksh
- + $(INSTALL_PROGRAM) -c ksh $(bindir)/sh
- +
- + .c.s:
- + $(CC) $(CFLAGS) -S -o $@ $<
- +
- + asms: $(OBJS:.o=.s)
- +
- +
- + # DO NOT DELETE THIS LINE -- make depend depends on it.
- + # If this runs make out of memory, delete /usr/include lines.
- + alloc.o: alloc.c
- + alloc.o: config.h
- + alloc.o: sh.h
- + alloc.o: stdh.h
- + alloc.o: trace.h
- + c_ksh.o: c_ksh.c
- + c_ksh.o: config.h
- + c_ksh.o: sh.h
- + c_ksh.o: stdh.h
- + c_ksh.o: table.h
- + c_ksh.o: trace.h
- + c_sh.o: c_sh.c
- + c_sh.o: config.h
- + c_sh.o: lex.h
- + c_sh.o: sh.h
- + c_sh.o: stdh.h
- + c_sh.o: table.h
- + c_sh.o: trace.h
- + c_sh.o: tree.h
- + c_test.o: c_test.c
- + c_test.o: config.h
- + c_test.o: sh.h
- + c_test.o: stdh.h
- + c_test.o: trace.h
- + edit.o: config.h
- + edit.o: edit.c
- + edit.o: edit.h
- + edit.o: lex.h
- + edit.o: sh.h
- + edit.o: stdh.h
- + edit.o: trace.h
- + edit.o: tty.h
- + emacs.o: config.h
- + emacs.o: edit.h
- + emacs.o: emacs.c
- + emacs.o: expand.h
- + emacs.o: lex.h
- + emacs.o: sh.h
- + emacs.o: stdh.h
- + emacs.o: table.h
- + emacs.o: trace.h
- + emacs.o: tree.h
- + eval.o: config.h
- + eval.o: eval.c
- + eval.o: expand.h
- + eval.o: lex.h
- + eval.o: sh.h
- + eval.o: stdh.h
- + eval.o: table.h
- + eval.o: trace.h
- + eval.o: tree.h
- + exec.o: config.h
- + exec.o: exec.c
- + exec.o: lex.h
- + exec.o: sh.h
- + exec.o: stdh.h
- + exec.o: table.h
- + exec.o: trace.h
- + exec.o: tree.h
- + expr.o: config.h
- + expr.o: expr.c
- + expr.o: sh.h
- + expr.o: stdh.h
- + expr.o: table.h
- + expr.o: trace.h
- + getopts.o: config.h
- + getopts.o: getopts.c
- + getopts.o: sh.h
- + getopts.o: stdh.h
- + getopts.o: table.h
- + getopts.o: trace.h
- + history.o: config.h
- + history.o: history.c
- + history.o: lex.h
- + history.o: sh.h
- + history.o: stdh.h
- + history.o: trace.h
- + io.o: config.h
- + io.o: io.c
- + io.o: sh.h
- + io.o: stdh.h
- + io.o: trace.h
- + jobs.o: config.h
- + jobs.o: jobs.c
- + jobs.o: sh.h
- + jobs.o: stdh.h
- + jobs.o: trace.h
- + jobs.o: tree.h
- + lex.o: config.h
- + lex.o: expand.h
- + lex.o: lex.c
- + lex.o: lex.h
- + lex.o: sh.h
- + lex.o: stdh.h
- + lex.o: table.h
- + lex.o: trace.h
- + lex.o: tree.h
- + mail.o: config.h
- + mail.o: mail.c
- + mail.o: sh.h
- + mail.o: stdh.h
- + mail.o: table.h
- + mail.o: trace.h
- + main.o: config.h
- + main.o: lex.h
- + main.o: main.c
- + main.o: sh.h
- + main.o: stdh.h
- + main.o: table.h
- + main.o: trace.h
- + main.o: tree.h
- + memmove.o: memmove.c
- + memmove.o: stdh.h
- + misc.o: config.h
- + misc.o: expand.h
- + misc.o: misc.c
- + misc.o: sh.h
- + misc.o: stdh.h
- + misc.o: trace.h
- + strstr.o: stdh.h
- + strstr.o: strstr.c
- + syn.o: config.h
- + syn.o: expand.h
- + syn.o: lex.h
- + syn.o: sh.h
- + syn.o: stdh.h
- + syn.o: syn.c
- + syn.o: table.h
- + syn.o: trace.h
- + syn.o: tree.h
- + sigact.o: sigact.h sigact.c
- + table.o: config.h
- + table.o: sh.h
- + table.o: stdh.h
- + table.o: table.c
- + table.o: table.h
- + table.o: trace.h
- + times.o: times.c
- + trace.o: trace.c
- + trap.o: config.h
- + trap.o: sh.h
- + trap.o: stdh.h
- + trap.o: trace.h
- + trap.o: trap.c
- + tree.o: config.h
- + tree.o: sh.h
- + tree.o: stdh.h
- + tree.o: trace.h
- + tree.o: tree.c
- + tree.o: tree.h
- + do_ulimit.o: config.h
- + do_ulimit.o: sh.h
- + do_ulimit.o: stdh.h
- + do_ulimit.o: trace.h
- + do_ulimit.o: do_ulimit.c
- + var.o: config.h
- + var.o: expand.h
- + var.o: sh.h
- + var.o: stdh.h
- + var.o: table.h
- + var.o: trace.h
- + var.o: var.c
- + version.o: config.h
- + version.o: sh.h
- + version.o: stdh.h
- + version.o: trace.h
- + version.o: version.c
- + vi.o: config.h
- + vi.o: edit.h
- + vi.o: expand.h
- + vi.o: lex.h
- + vi.o: sh.h
- + vi.o: stdh.h
- + vi.o: table.h
- + vi.o: trace.h
- + vi.o: tree.h
- + vi.o: vi.c
- + # WARNING: Put nothing here or make depend will gobble it up!
- diff -rc --new-file pdksh-4.9/sh/alloc.c /gnu/src/amiga/pdksh-4.9/sh/alloc.c
- *** pdksh-4.9/sh/alloc.c Wed May 4 14:46:32 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/alloc.c Wed May 4 22:24:28 1994
- ***************
- *** 95,100 ****
- --- 95,104 ----
- aerror(ap, "cannot allocate");
- return NULL;
- }
- + /* either this or find the bug where uninitialized
- + memory is referenced.. hint: must be somewhere
- + in path-parsing and -searching */
- + bzero (bp, offsetof(Block, cell[ICELLS + cells]));
- if (ap->free == &aempty)
- bp->next = bp;
- else {
- ***************
- *** 173,182 ****
- --- 177,194 ----
- return (void*) ptr;
- }
-
- + #ifdef DEBUG_AFREE
- + void
- + _afree(ptr, ap, file, line)
- + void *ptr;
- + register Area *ap;
- + char *file; int line;
- + #else
- void
- afree(ptr, ap)
- void *ptr;
- register Area *ap;
- + #endif
- {
- register Block *bp;
- register Cell *fp, *fpp;
- ***************
- *** 187,192 ****
- --- 199,215 ----
- if (bp->cell <= dp && dp < bp->last)
- break;
- if (bp->next == ap->free) {
- + #ifdef DEBUG_AFREE
- + fprintf (shlout, "%s:%d: ap=$%lx, APERM=$%lx\n", file, line, ap, APERM);
- + {
- + struct block *b;
- + fprintf (shlout, "%s:%d:ATEMPs: ", file, line);
- + for (b = e.loc; b; b=b->next)
- + fprintf (shlout, "$%lx ", &b->area);
- + fprintf (shlout, "\n");
- + }
- + fprintf (shlout, "%s:%d:", file, line);
- + #endif
- aerror(ap, "freeing with invalid area");
- return;
- }
- ***************
- *** 197,202 ****
- --- 220,228 ----
- ;
-
- if (fp == dp) {
- + #ifdef DEBUG_AFREE
- + fprintf (shlout, "%s:%d:", file, line);
- + #endif
- aerror(ap, "freeing free object");
- return;
- }
- ***************
- *** 223,229 ****
-
- Area a;
-
- ! main(int argc, char **argv) {
- int i;
- char *p [9];
-
- --- 249,255 ----
-
- Area a;
-
- ! main(int argc, char **argv, char **envp) {
- int i;
- char *p [9];
-
- diff -rc --new-file pdksh-4.9/sh/amiga.c /gnu/src/amiga/pdksh-4.9/sh/amiga.c
- *** pdksh-4.9/sh/amiga.c Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/sh/amiga.c Thu May 5 09:50:48 1994
- ***************
- *** 0 ****
- --- 1,30 ----
- + #include <errno.h>
- + #include <fcntl.h>
- +
- + int
- + fork()
- + {
- + /* we don't have fork(). If I missed some fork-call (or if there's one
- + in a later version of the shell), just return with out-of-processes. */
- + errno = EPROCLIM;
- +
- + return -1;
- + }
- +
- + int
- + tty_read (int fd, char *buf, int len)
- + {
- + int mask = 1<<fd;
- +
- + /* read by itself is not interruptible, select() is. Perhaps this will
- + change some time in the future.. */
- + while (select (fd+1, &mask, 0, 0, 0) <= 0) ;
- +
- + return read (fd, buf, len);
- + }
- +
- + /* should update the library.... the header prototypes are *pgid(), and
- + POSIX *pgrp(), but the library doesn't contain the Posix versions yet,
- + and uses oldstyle BSD *pgrp() functions... */
- + int setpgid (int p, int q) { return setpgrp (p, q); }
- + int getpgid (int p) { return getpgrp (p); }
- diff -rc --new-file pdksh-4.9/sh/c_ksh.c /gnu/src/amiga/pdksh-4.9/sh/c_ksh.c
- *** pdksh-4.9/sh/c_ksh.c Wed May 4 14:46:33 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/c_ksh.c Tue Jun 14 12:02:42 1994
- ***************
- *** 47,52 ****
- --- 47,53 ----
- register int done = 0;
- register int prt = 0;
- register struct tbl *v_pwd = NULL, *v_oldpwd = NULL;
- + extern char *getcwd ();
-
- if ((dir = wp[1]) == NULL && (dir = strval(global("HOME"))) == NULL)
- errorf("no home directory");
- ***************
- *** 146,152 ****
- register char **wp;
- {
- int nl = 1;
- ! int expand = 1;
- FILE *f = stdout;
-
- for (wp++; *wp != NULL && **wp == '-'; wp++) {
- --- 147,153 ----
- register char **wp;
- {
- int nl = 1;
- ! int expand = 0; /* don't expand by default, causes weird problems.. */
- FILE *f = stdout;
-
- for (wp++; *wp != NULL && **wp == '-'; wp++) {
- ***************
- *** 176,182 ****
- register char *s = *wp;
- register int c;
- while ((c = *s++) != '\0')
- ! if (expand && c == '\\') {
- switch ((c = *s++)) {
- case 'b': c = '\b'; break;
- case 'c': nl = 0; continue; /* AT&T brain damage */
- --- 177,183 ----
- register char *s = *wp;
- register int c;
- while ((c = *s++) != '\0')
- ! if (expand && c == '\\' && s[1]) {
- switch ((c = *s++)) {
- case 'b': c = '\b'; break;
- case 'c': nl = 0; continue; /* AT&T brain damage */
- diff -rc --new-file pdksh-4.9/sh/c_sh.c /gnu/src/amiga/pdksh-4.9/sh/c_sh.c
- *** pdksh-4.9/sh/c_sh.c Wed May 4 14:46:34 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/c_sh.c Fri Jul 29 10:15:33 1994
- ***************
- *** 10,17 ****
- #include <errno.h>
- #include <signal.h>
- #include <setjmp.h>
- - #include <unistd.h> /* getcwd */
- #include <sys/times.h>
- #include "sh.h"
-
- static char * clocktos ARGS((clock_t t));
- --- 10,18 ----
- #include <errno.h>
- #include <signal.h>
- #include <setjmp.h>
- #include <sys/times.h>
- + #include <unistd.h> /* getcwd */
- + #include <limits.h>
- #include "sh.h"
-
- static char * clocktos ARGS((clock_t t));
- ***************
- *** 74,80 ****
- return 0;
- file = search(cp, path, 0);
- if (file == NULL)
- ! errorf("%s: not found\n", cp);
- if (include(file))
- return exstat;
- return -1;
- --- 75,81 ----
- return 0;
- file = search(cp, path, 0);
- if (file == NULL)
- ! errorf("sh: %s: not found\n", cp);
- if (include(file))
- return exstat;
- return -1;
- ***************
- *** 306,312 ****
- if ((cp = *++wp) == NULL) {
- static char * const args [] = {"set", "-", NULL};
- extern int c_typeset ARGS((char **args));
- ! return c_typeset(args);
- }
-
- for (; (cp = *wp) != NULL && (*cp == '-' || *cp == '+');) {
- --- 307,313 ----
- if ((cp = *++wp) == NULL) {
- static char * const args [] = {"set", "-", NULL};
- extern int c_typeset ARGS((char **args));
- ! return c_typeset((char **)args);
- }
-
- for (; (cp = *wp) != NULL && (*cp == '-' || *cp == '+');) {
- ***************
- *** 443,452 ****
- register int i;
- register char *cp = temp + sizeof(temp);
-
- ! #if CLK_TCK != 100 /* convert to 1/100'ths */
- ! t = (t < 1000000000/CLK_TCK) ?
- ! (t * 100) / CLK_TCK : (t / CLK_TCK) * 100;
- ! #endif
-
- *--cp = '\0';
- *--cp = 's';
- --- 444,453 ----
- register int i;
- register char *cp = temp + sizeof(temp);
-
- ! /* CLK_TCK may actually be a _sysconf() function call */
- ! if (CLK_TCK != 100) /* convert to 1/100'ths */
- ! t = (t < 1000000000/CLK_TCK) ?
- ! (t * 100) / CLK_TCK : (t / CLK_TCK) * 100;
-
- *--cp = '\0';
- *--cp = 's';
- diff -rc --new-file pdksh-4.9/sh/config.h /gnu/src/amiga/pdksh-4.9/sh/config.h
- *** pdksh-4.9/sh/config.h Wed May 4 14:46:35 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/config.h Thu Jan 1 00:00:00 1970
- ***************
- *** 1,67 ****
- - /*
- - * Configuration file for the PD ksh
- - *
- - * RCSid: $Id: config.h,v 1.7 93/05/05 21:16:20 sjg Exp $
- - */
- -
- - #ifndef _CONFIG_H
- - #define _CONFIG_H
- -
- - /*
- - * Builtin edit modes
- - */
- -
- - #define EMACS /* EMACS-like mode */
- - #define VI /* vi-like mode */
- - #define JOBS /* job control */
- -
- - #ifndef SIGINT
- - #include <signal.h>
- - #endif
- -
- - /*
- - * leave USE_SIGACT defined.
- - * if you don't have sigaction(2) and the
- - * implementation in sigact.c doesn't work for your system,
- - * fix it.
- - *
- - * Of course if your system has a real sigaction()
- - * implementation that is faulty! undef JOBS and add USE_SIGNAL
- - * or whatever does work. You may find it necessary to undef
- - * USE_SIGACT, if so please report it.
- - */
- - #define USE_SIGACT /* POSIX signal handling */
- - /*
- - * These control how sigact.c implements sigaction()
- - * If you don't define any of them it will try and work it out
- - * for itself. The are listed in order of preference (usefulness).
- - */
- - /* #define USE_SIGMASK /* BSD4.2 ? signal handling */
- - /* #define USE_SIGSET /* BSD4.1 ? signal handling */
- - /* #define USE_SIGNAL /* plain old signal(2) */
- -
- - #if defined(JOBS) && (!defined(SIGCONT) || (defined(_SYSV) && defined(USE_SIGNAL)))
- - #undef JOBS
- - #endif
- -
- - /* #define FASCIST /* Fascist getopts */
- - #define SHARPBANG /* Hack to handle #! */
- - /* #define SILLY /* Game of life in EMACS mode */
- - /* #define SWTCH /* Handle SWTCH for shl(1) */
- -
- -
- - /*
- - * ALTERNATIONS is csh not ksh, but it is such a nice feature...
- - */
- - #define ALTERNATIONS /* csh {a,b,c} arg expansion */
- -
- - /* #define COMPLEX_HISTORY /* Peter Collinson's history */
- - /*
- - * if you don't have mmap() you can't use Peter Collinson's history
- - * mechanism. If that is the case, then define EASY_HISTORY
- - */
- - #if !defined(COMPLEX_HISTORY) || defined(NO_MMAP)
- - # define EASY_HISTORY /* sjg's trivial history file */
- - #endif
- -
- - #endif /* _CONFIG_H */
- --- 0 ----
- diff -rc --new-file pdksh-4.9/sh/config.h.in /gnu/src/amiga/pdksh-4.9/sh/config.h.in
- *** pdksh-4.9/sh/config.h.in Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/sh/config.h.in Wed May 4 22:24:30 1994
- ***************
- *** 0 ****
- --- 1,67 ----
- + /*
- + * Configuration file for the PD ksh
- + *
- + * RCSid: $Id: config.h,v 1.7 93/05/05 21:16:20 sjg Exp $
- + */
- +
- + #ifndef _CONFIG_H
- + #define _CONFIG_H
- +
- + /*
- + * Builtin edit modes
- + */
- +
- + #define EMACS /* EMACS-like mode */
- + #define VI /* vi-like mode */
- + #define JOBS /* job control */
- +
- + #ifndef SIGINT
- + #include <signal.h>
- + #endif
- +
- + /*
- + * leave USE_SIGACT defined.
- + * if you don't have sigaction(2) and the
- + * implementation in sigact.c doesn't work for your system,
- + * fix it.
- + *
- + * Of course if your system has a real sigaction()
- + * implementation that is faulty! undef JOBS and add USE_SIGNAL
- + * or whatever does work. You may find it necessary to undef
- + * USE_SIGACT, if so please report it.
- + */
- + #define USE_SIGACT /* POSIX signal handling */
- + /*
- + * These control how sigact.c implements sigaction()
- + * If you don't define any of them it will try and work it out
- + * for itself. The are listed in order of preference (usefulness).
- + */
- + /* #define USE_SIGMASK /* BSD4.2 ? signal handling */
- + /* #define USE_SIGSET /* BSD4.1 ? signal handling */
- + /* #define USE_SIGNAL /* plain old signal(2) */
- +
- + #if defined(JOBS) && (!defined(SIGCONT) || (defined(_SYSV) && defined(USE_SIGNAL)))
- + #undef JOBS
- + #endif
- +
- + /* #define FASCIST /* Fascist getopts */
- + /* #define SHARPBANG /* Hack to handle #! */
- + /* #define SILLY /* Game of life in EMACS mode */
- + /* #define SWTCH /* Handle SWTCH for shl(1) */
- +
- +
- + /*
- + * ALTERNATIONS is csh not ksh, but it is such a nice feature...
- + */
- + #define ALTERNATIONS /* csh {a,b,c} arg expansion */
- +
- + /* #define COMPLEX_HISTORY /* Peter Collinson's history */
- + /*
- + * if you don't have mmap() you can't use Peter Collinson's history
- + * mechanism. If that is the case, then define EASY_HISTORY
- + */
- + #if !defined(COMPLEX_HISTORY) || defined(NO_MMAP)
- + # define EASY_HISTORY /* sjg's trivial history file */
- + #endif
- +
- + #endif /* _CONFIG_H */
- diff -rc --new-file pdksh-4.9/sh/edit.c /gnu/src/amiga/pdksh-4.9/sh/edit.c
- *** pdksh-4.9/sh/edit.c Wed May 4 14:47:33 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/edit.c Wed May 4 22:24:31 1994
- ***************
- *** 59,65 ****
- --- 59,69 ----
- x_init();
-
- if (x_noecho)
- + #ifdef amigados
- + return(tty_read(ttyfd, buf, len));
- + #else
- return(read(ttyfd, buf, len));
- + #endif
-
- (void)x_mode(TRUE);
- if (rcp = strrchr(ps1, '\n'))
- ***************
- *** 99,105 ****
- --- 103,113 ----
- * either.
- */
- retry:
- + #ifdef amigados
- + if (tty_read(ttyfd, &c, 1) != 1)
- + #else
- if (read(ttyfd, &c, 1) != 1)
- + #endif
- {
- if (sigchld_caught) /* just a SIGCHLD ? */
- {
- diff -rc --new-file pdksh-4.9/sh/emacs.c /gnu/src/amiga/pdksh-4.9/sh/emacs.c
- *** pdksh-4.9/sh/emacs.c Wed May 4 14:46:38 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/emacs.c Tue Jun 14 11:47:21 1994
- ***************
- *** 1191,1197 ****
-
- ainit(AEDIT);
-
- ! x_tab = (struct x_ftab *(*)[X_TABSZ]) alloc(sizeofN(*x_tab, 3), AEDIT);
- for (j = 0; j < 128; j++)
- x_tab[0][j] = xft_insert;
- for (i = 1; i < 3; i++)
- --- 1191,1197 ----
-
- ainit(AEDIT);
-
- ! x_tab = (struct x_ftab const *(*)[X_TABSZ]) alloc(sizeofN(*x_tab, 3), AEDIT);
- for (j = 0; j < 128; j++)
- x_tab[0][j] = xft_insert;
- for (i = 1; i < 3; i++)
- diff -rc --new-file pdksh-4.9/sh/exec.c /gnu/src/amiga/pdksh-4.9/sh/exec.c
- *** pdksh-4.9/sh/exec.c Wed May 4 14:46:40 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/exec.c Fri Jul 29 10:15:05 1994
- ***************
- *** 396,407 ****
- *
- * So, we assume that if the file exists, it
- * doesn't have execute privs; else, it really
- ! * is not found.
- */
- if (access(cp, 0) < 0)
- ! shellf("%s: not found\n", cp);
- else
- ! shellf("%s: cannot execute\n", cp);
- rv = 1;
- break;
- }
- --- 396,409 ----
- *
- * So, we assume that if the file exists, it
- * doesn't have execute privs; else, it really
- ! * is not found. If it isn't found, identify
- ! * that it is the shell that is complaining about
- ! * it.
- */
- if (access(cp, 0) < 0)
- ! shellf("sh: %s: not found\n", cp);
- else
- ! shellf("sh: %s: cannot execute\n", cp);
- rv = 1;
- break;
- }
- diff -rc --new-file pdksh-4.9/sh/expr.c /gnu/src/amiga/pdksh-4.9/sh/expr.c
- *** pdksh-4.9/sh/expr.c Wed May 4 14:46:41 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/expr.c Tue Jun 14 12:04:06 1994
- ***************
- *** 206,212 ****
- ;
- c = *--cp;
- *cp = 0;
- ! val = global(tokp);
- *cp = c;
- tok = VAR;
- } else
- --- 206,212 ----
- ;
- c = *--cp;
- *cp = 0;
- ! val = global((char *)tokp);
- *cp = c;
- tok = VAR;
- } else
- ***************
- *** 216,222 ****
- c = *--cp;
- *cp = 0;
- val = tempvar();
- ! setstr(val, tokp);
- val->flag |= RDONLY;
- *cp = c;
- tok = LIT;
- --- 216,222 ----
- c = *--cp;
- *cp = 0;
- val = tempvar();
- ! setstr(val, (char *)tokp);
- val->flag |= RDONLY;
- *cp = c;
- tok = LIT;
- diff -rc --new-file pdksh-4.9/sh/getopts.c /gnu/src/amiga/pdksh-4.9/sh/getopts.c
- *** pdksh-4.9/sh/getopts.c Wed May 4 14:46:42 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/getopts.c Wed May 4 22:24:32 1994
- ***************
- *** 20,25 ****
- --- 20,30 ----
- # define getopt local_getopt
- #endif
-
- + #ifdef amigados
- + /* redefine it, or it collides with stdlib.h, it's static anyway */
- + #define getopt(argc,argv,opts) static_getopt(argc,argv,opts)
- + #endif
- +
- /*
- * The following is derived from getopt() source placed into the public
- * domain by AT&T (the only time they're known to have done that).
- diff -rc --new-file pdksh-4.9/sh/io.c /gnu/src/amiga/pdksh-4.9/sh/io.c
- *** pdksh-4.9/sh/io.c Wed May 4 14:46:44 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/io.c Wed May 4 22:30:18 1994
- ***************
- *** 98,103 ****
- --- 98,104 ----
- {
- if (shf[fd] != NULL)
- return;
- + #ifndef amigados
- if (fd <= 2)
- #if defined(__386BSD__) || defined(_BSDI)
- /* Chris Torek's stdio replacement */
- ***************
- *** 106,115 ****
- --- 107,152 ----
- #ifdef _MINIX
- /* ? */;
- #else
- + #ifdef __STDC__
- + __iob[fd]._flag = 0; /* re-use stdin, stdout, stderr */
- + #else
- _iob[fd]._flag = 0; /* re-use stdin, stdout, stderr */
- #endif
- #endif
- + #endif
- + #else
- + if (fd <= 2)
- + shf[fd] = (fd == 0) ? __sF[0] : (fd == 1 ? __sF[1] : __sF[2]);
- + else
- + #endif
- +
- + /* "r+" is too lazy.. modern stdio implementation don't allow you
- + to open a O_RDONLY file this way, nor a O_WRONLY one... */
- + #ifdef amigados
- + {
- + int mode = fcntl (fd, F_GETFL, 0);
- +
- + if (mode >= 0)
- + switch (mode & 3)
- + {
- + case 0:
- + shf[fd] = fdopen (fd, "r");
- + break;
- +
- + case 1:
- + shf[fd] = fdopen (fd, "w");
- + break;
- +
- + case 2:
- + shf[fd] = fdopen (fd, "r+");
- + break;
- + }
- + else
- + shf[fd] = 0;
- + }
- + #else
- shf[fd] = fdopen(fd, "r+");
- + #endif
- if (shf[fd] == NULL)
- return;
- setvbuf(shf[fd], (char*)NULL, _IOFBF, (size_t)BUFSIZ);
- ***************
- *** 122,128 ****
- int fd;
- {
- if (shf[fd] != NULL) {
- ! #if !defined(__386BSD__) && !defined(_BSDI)
- /* Chris Torek's stdio replacement */
- fseek(shf[fd], 0L, 1); /* V7 derived */
- #endif
- --- 159,165 ----
- int fd;
- {
- if (shf[fd] != NULL) {
- ! #if !defined(__386BSD__) && !defined(_BSDI) && !defined(__amigados__)
- /* Chris Torek's stdio replacement */
- fseek(shf[fd], 0L, 1); /* V7 derived */
- #endif
- diff -rc --new-file pdksh-4.9/sh/jobs.c /gnu/src/amiga/pdksh-4.9/sh/jobs.c
- *** pdksh-4.9/sh/jobs.c Wed May 4 14:46:45 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/jobs.c Fri Dec 23 13:04:28 1994
- ***************
- *** 84,89 ****
- --- 84,90 ----
-
- #ifdef JOBS
- #ifdef _BSD /* _BSD 4.* */
- + #ifndef __amigados__
- #define setpgid(p, pg) setpgrp(p, pg)
- #if defined(_POSIX_SOURCE) || defined(__386BSD__) || defined(_BSDI)
- #define getpgid(p) getpgrp()
- ***************
- *** 91,96 ****
- --- 92,98 ----
- #define getpgid(p) getpgrp(p)
- #define tcsetpgrp(fd,p) ioctl(fd, TIOCSPGRP, &(p))
- #endif
- + #endif
- #else /* POSIX-compatible */
- #define getpgid(p) getpgrp() /* 1003.1 stupidity */
- #define killpg(p, s) kill(-(p), s)
- ***************
- *** 159,165 ****
- static int j_newjob ARGS((void));
- static Proc * j_search ARGS((int job));
- static void j_sigchld ARGS((int sig));
- !
- /* initialize job control */
- void
- j_init()
- --- 161,188 ----
- static int j_newjob ARGS((void));
- static Proc * j_search ARGS((int job));
- static void j_sigchld ARGS((int sig));
- !
- ! #ifdef amigados
- ! /* those are needed for later relocation support after vfork() */
- !
- ! u_int inline static
- ! get_a4 ()
- ! {
- ! u_int res;
- ! asm ("movel a4,%0" : "=g" (res));
- ! return res;
- ! }
- ! static inline int dbsize()
- ! {
- ! int res;
- ! asm ("movel #___data_size,%0; addl #___bss_size,%0" : "=r" (res));
- ! return res;
- ! }
- ! extern int __datadata_relocs();
- ! #endif
- !
- !
- !
- /* initialize job control */
- void
- j_init()
- ***************
- *** 182,188 ****
- sm_sigchld = sigmask(SIGCHLD);
- _TRACE(5, ("j_init: sm_sigchld == 0x%x", sm_sigchld));
- # endif
- ! #endif
- #ifndef JOBS
- # ifdef USE_SIGACT
- sigaction(SIGCHLD, &Sigact_dfl, NULL);
- --- 205,211 ----
- sm_sigchld = sigmask(SIGCHLD);
- _TRACE(5, ("j_init: sm_sigchld == 0x%x", sm_sigchld));
- # endif
- ! #endif
- #ifndef JOBS
- # ifdef USE_SIGACT
- sigaction(SIGCHLD, &Sigact_dfl, NULL);
- ***************
- *** 289,305 ****
- }
- #endif
-
- /* execute tree in child subprocess */
- int
- ! exchild(t, flags)
- ! struct op *t;
- ! int flags;
- {
- register int i;
- register Proc *j;
- int rv = 0;
- int forksleep;
-
- flags &= ~XFORK;
- if ((flags&XEXEC))
- return execute(t, flags);
- --- 312,348 ----
- }
- #endif
-
- + #ifdef amigados
- + /* stack slots are volatile when vfork_resume is called.... the solution
- + is to buffer the parameters in global variables, that are relocated with
- + the ix_resident() call (so the solution is even reentrant ;-)) */
- + static struct op *t;
- + static int flags;
- +
- + static struct table *o_homedirs;
- + #endif
- +
- /* execute tree in child subprocess */
- int
- ! exchild(_t, _flags)
- ! struct op *_t;
- ! int _flags;
- {
- register int i;
- register Proc *j;
- + #ifndef amigados
- + register struct op *t;
- + register int flags;
- + #endif
- int rv = 0;
- int forksleep;
-
- + flags = _flags;
- + t = _t;
- + #ifdef amigados
- + o_homedirs = &homedirs;
- + #endif
- +
- flags &= ~XFORK;
- if ((flags&XEXEC))
- return execute(t, flags);
- ***************
- *** 314,320 ****
- procs = j;
- Found:
-
- ! j->prev = ((flags&XPIPEI)) ? j_lastj : NULL;
- j->proc = j->pgrp = 0;
- j->flags = flags;
- j->job = (flags&XPIPEI) ? j_lastjob : j_newjob();
- --- 357,367 ----
- procs = j;
- Found:
-
- ! j->notify = 0;
- ! bzero (&j->status, sizeof (j->status));
- ! bzero (&j->utime, sizeof (j->utime));
- ! bzero (&j->stime, sizeof (j->stime));
- ! j->prev = (flags&XPIPEI) ? j_lastj : NULL;
- j->proc = j->pgrp = 0;
- j->flags = flags;
- j->job = (flags&XPIPEI) ? j_lastjob : j_newjob();
- ***************
- *** 335,340 ****
- --- 382,391 ----
- sigsetmask(sm_sigchld);
- # endif
- #endif
- + #ifdef __amigados__
- + /* use vfork () instead of fork(), and later try to do fork() `by hand'... */
- + #define fork vfork
- + #endif
- /* create child process */
- forksleep = 0;
- while ((i = fork()) < 0 && errno == EAGAIN && forksleep < 32) {
- ***************
- *** 346,355 ****
- }
- if (i < 0) {
- j->state = JFREE;
- ! errorf("cannot fork - try again\n");
- }
- j->proc = (i != 0) ? i : getpid();
-
- #ifdef JOBS
- /* job control set up */
- if (flag[FMONITOR] && !(flags&XXCOM))
- --- 397,410 ----
- }
- if (i < 0) {
- j->state = JFREE;
- ! errorf("cannot fork - try again - errno %d\n", errno);
- }
- +
- j->proc = (i != 0) ? i : getpid();
-
- + #ifdef amigados
- + if (i)
- + #endif
- #ifdef JOBS
- /* job control set up */
- if (flag[FMONITOR] && !(flags&XXCOM))
- ***************
- *** 364,370 ****
- --- 419,496 ----
- j_lastj = j;
-
- if (i == 0) { /* child */
- + #ifdef amigados
- + /* you don't really *have* to understand all the magic that's
- + happening here ;-) In short, it duplicates the data/bss
- + segment (without malloc'd data!), re-relocates data-to-data
- + relocs, reinits stdio (into new malloc'd buffers), gets
- + a fresh copy of environ, and that's about it. */
- +
- + extern char **_ctype_, **environ;
- + extern int sys_nerr;
- + extern int SysBase, DOSBase;
- +
- + /* this re-relocates the data segment */
- + ix_resident (4, get_a4(), dbsize(), __datadata_relocs);
- +
- + ix_get_vars2 (7, &_ctype_, &sys_nerr, &SysBase, &DOSBase, &__sF, &environ, &environ);
- +
- + e.type = E_NONE;
- + ainit (APERM);
- + /* don't copy `commands', this is just a hash cache for
- + commands, and the child just searches its paths again
- + if it doesn't find a command there */
- + tinit (& commands, APERM);
- + /* don't do anything to `builtins'. This table represents
- + shell builtins and is as such static. Using vfork I
- + can't allow the parent shell to quit before the child,
- + so the child can reuse the shared table. But set the
- + area of the table to 0, that way we get an error (or
- + a crash if the child nevertheless tries to manipulate
- + the table */
- + builtins.areap = 0;
- +
- + /* same applies to lexicals, these are shell keywords */
- + lexicals.areap = 0;
- + /* although homedirs is hardly used, it's not static,
- + so copy it. */
- + tbl_copy (o_homedirs, &homedirs, APERM);
- +
- + ainit (ATEMP);
- + blk_copy (e.loc);
- + if (e.savefd)
- + {
- + short *old = e.savefd;
- + e.savefd = (short*) alloc(sizeofN(short, NUFILE), ATEMP);
- + bcopy (old, e.savefd, sizeofN(short, NUFILE));
- + }
- + /* cancel the previous stdio pointers, they're no longer
- + valid */
- + {
- + register int fd;
- + for (fd = 0; fd < NUFILE; fd++)
- + if (shf[fd])
- + {
- + shf[fd] = 0;
- + fopenshf (fd);
- + }
- + }
- +
- + /* copy the argument tree */
- + t = tcopy (t, ATEMP);
- + e.temps = 0;
- + /* dup any allocated trap command strings */
- + child_dup_traps ();
- + /* don't do this past vfork_resume(), as `e' is cached in a
- + register by the compiler.. */
- + e.oenv = NULL;
- +
- + /* tell the parent it's ok to continue, just as if the child
- + did an exec() or an _exit(). Switch to child's stack. */
- + vfork_resume ();
- + #else
- e.oenv = NULL;
- + #endif
- if (flag[FTALKING])
- restoresigs();
- if ((flags&XBGND) && !flag[FMONITOR])
- ***************
- *** 386,393 ****
- --- 512,524 ----
- close(i);
- }
- }
- + #ifdef amigados
- + /* don't need them, and don't own them, so toss them ;-)) */
- + procs = 0;
- + #else
- for (j = procs; j != NULL; j = j->next)
- j->state = JFREE;
- + #endif
- ttyfd = -1;
- #ifdef JOBS
- /* is this needed in the child? */
- ***************
- *** 616,622 ****
- --- 747,756 ----
- break;
- }
- if (pid <= 0) /* return if would block (0) ... */
- + {
- + _TRACE(5, ("j_reapchld: would block"));
- break; /* ... or no children or interrupted (-1) */
- + }
- (void) times(&t1);
-
- _TRACE(5, ("j_reapchld: looking for pid==%d", pid));
- diff -rc --new-file pdksh-4.9/sh/lex.c /gnu/src/amiga/pdksh-4.9/sh/lex.c
- *** pdksh-4.9/sh/lex.c Wed May 4 14:46:46 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/lex.c Wed May 4 22:24:36 1994
- ***************
- *** 123,128 ****
- --- 123,129 ----
- break;
- case '"': case '\\':
- case '$': case '`':
- + Xcheck(ws, wp);
- *wp++ = QCHAR, *wp++ = c;
- break;
- default:
- ***************
- *** 542,548 ****
- --- 543,553 ----
- else
- #endif
- #endif
- + #ifdef amigados
- + c = tty_read(ttyfd, line, LINE);
- + #else
- c = read(ttyfd, line, LINE);
- + #endif
- if (c < 0 && sigchld_caught)
- {
- goto retry;
- diff -rc --new-file pdksh-4.9/sh/main.c /gnu/src/amiga/pdksh-4.9/sh/main.c
- *** pdksh-4.9/sh/main.c Wed May 4 14:46:48 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/main.c Wed May 4 22:38:56 1994
- ***************
- *** 39,46 ****
- --- 39,50 ----
- #ifdef sun /* sun's don't have a real /bin */
- "${SHELL:=/bin/sh} ${PATH:=/usr/bin:/usr/ucb:.} ${HOME:=/} ${PS1:=$ } ${PS2:=> } ${PS3:=#? } ${MAILCHECK:=600}";
- #else
- + #ifdef __amigados__
- + "${SHELL:=/bin/sh} ${PATH:=.:/bin:/c} ${HOME:=/ram} ${PS1:=$ } ${PS2:=> } ${PS3:=#? } ${MAILCHECK:=600}";
- + #else
- "${SHELL:=/bin/sh} ${PATH:=/bin:/usr/bin:.} ${HOME:=/} ${PS1:=$ } ${PS2:=> } ${PS3:=#? } ${MAILCHECK:=600}";
- #endif
- + #endif
-
- static const char *initcoms [] = {
- "cd", ".", NULL, /* set up $PWD */
- ***************
- *** 140,145 ****
- --- 144,157 ----
-
- init_histvec();
-
- + #ifdef __amigados__
- + /* there's a bug here that doesn't set the special meaning of
- + PATH if it's not already in the environment. Since it's pretty
- + nasty to get this right (local stuff in var.c..), I'll `import'
- + the default before actually handling the environment */
- + import ("PATH=.:/bin:/c");
- + #endif
- +
- /* import enviroment */
- if (envp != NULL)
- for (wp = envp; *wp != NULL; wp++)
- ***************
- *** 158,165 ****
- --- 170,184 ----
- (void) signal(SIGUSR1, set_TraceLev);
- (void) signal(SIGUSR2, set_TraceLev);
- #endif
- + #ifdef amigados
- + /* I want trace support permanent in the shell, but I don't want
- + it to show up unless I want it to ;-) */
- + if (getenv ("TRACE_LEVEL"))
- + _TRACE(0, ("Traces enabled, main @$lx\n", main));
- + #else
- _TRACE(0, ("Traces enabled.")); /* allow _TRACE to setup */
- #endif
- + #endif /* USE_TRACE */
-
- /* define shell keywords */
- keywords();
- diff -rc --new-file pdksh-4.9/sh/misc.c /gnu/src/amiga/pdksh-4.9/sh/misc.c
- *** pdksh-4.9/sh/misc.c Wed May 4 14:46:49 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/misc.c Wed May 4 22:24:38 1994
- ***************
- *** 173,178 ****
- --- 173,181 ----
- return (*as == '-') ? -n : n;
- }
-
- + /* since I'm using a shared library, there's no reason NOT to use the
- + system strerror() function under amigados. */
- + #ifndef amigados
- /*
- * stripped down strerror for kill and exec
- */
- ***************
- *** 203,208 ****
- --- 206,212 ----
- return "Unknown system error";
- }
- }
- + #endif
-
- /* -------- gmatch.c -------- */
-
- diff -rc --new-file pdksh-4.9/sh/proto.h /gnu/src/amiga/pdksh-4.9/sh/proto.h
- *** pdksh-4.9/sh/proto.h Wed May 4 14:46:55 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/proto.h Wed May 4 22:24:39 1994
- ***************
- *** 16,22 ****
- --- 16,27 ----
- void afreeall ARGS((Area *ap));
- void * alloc ARGS((size_t size, Area *ap));
- void * aresize ARGS((void *ptr, size_t size, Area *ap));
- + #ifdef DEBUG_AFREE
- + #define afree(ptr,ap) _afree((ptr), (ap), __FILE__, __LINE__)
- + void _afree ARGS((void *ptr, Area *ap, char *, int));
- + #else
- void afree ARGS((void *ptr, Area *ap));
- + #endif
- /* c_ksh.c */
- int c_hash ARGS((char **wp));
- int c_cd ARGS((char **wp));
- ***************
- *** 197,202 ****
- --- 202,210 ----
- void twalk ARGS((struct table *tp));
- struct tbl * tnext ARGS((void));
- struct tbl ** tsort ARGS((struct table *tp));
- + #ifdef amigados
- + void tbl_copy ARGS((struct table *src, struct table *dst, Area *ap));
- + #endif
- /* trace.c */
- /* trap.c */
- Trap * gettrap ARGS((char *name));
- ***************
- *** 206,211 ****
- --- 214,222 ----
- int cleartraps ARGS((void));
- int ignoresig ARGS((int i));
- int restoresigs ARGS((void));
- + #ifdef amigados
- + void child_dup_traps ARGS((void));
- + #endif
- /* tree.c */
- void ptree ARGS((struct op *t, FILE *f));
- int pioact ARGS((FILE *f, struct ioword *iop));
- ***************
- *** 230,235 ****
- --- 241,249 ----
- void unset ARGS((struct tbl *vp));
- int isassign ARGS((char *s));
- char ** makenv ARGS((void));
- + #ifdef amigados
- + void blk_copy ARGS((struct block *src));
- + #endif
- /* version.c */
- /* vi.c */
- void vi_reset ARGS((char *buf, int len));
- diff -rc --new-file pdksh-4.9/sh/table.c /gnu/src/amiga/pdksh-4.9/sh/table.c
- *** pdksh-4.9/sh/table.c Wed May 4 14:46:59 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/table.c Wed May 4 22:24:40 1994
- ***************
- *** 199,201 ****
- --- 199,256 ----
- return p;
- }
-
- + #ifdef amigados
- + /* need to copy tables, since I only have vfork (), no real fork () */
- +
- + /* assume initialized source and destination tables */
- + void
- + tbl_copy (struct table *src, struct table *dst, Area *ap)
- + {
- + struct tbl *t, *tn;
- +
- + twalk (src);
- + tinit (dst, ap);
- + while (t = tnext ())
- + {
- + #ifdef DEBUG
- + fprintf (shlout, "%s: type %d, val $%lx, flag ",
- + t->name, t->type, t->val.i);
- + #define PRFLAG(fl) \
- + if (t->flag & fl) fprintf (shlout, #fl "|");
- + PRFLAG(ALLOC);
- + PRFLAG(DEFINED);
- + PRFLAG(ISSET);
- + PRFLAG(SPECIAL);
- + PRFLAG(INTEGER);
- + PRFLAG(RDONLY);
- + PRFLAG(EXPORT);
- + PRFLAG(LOCAL);
- + PRFLAG(TRACE);
- + PRFLAG(FUNCT);
- + PRFLAG(EXPALIAS);
- + fprintf (shlout, "\n");
- + #endif
- +
- + tn = tenter (dst, t->name, hash (t->name));
- + tn->flag = t->flag;
- + tn->type = t->type;
- + if (t->flag & INTEGER)
- + tn->val.i = t->val.i;
- + else if (t->flag & FUNCT)
- + if (t->type == CFUNC)
- + tn->val.t = t->val.t ? tcopy (t->val.t, ap) : 0;
- + else
- + tn->val.f = t->val.f;
- + else if (t->flag & EXPORT)
- + tn->val.s = strsave (t->val.s, ap);
- + else
- + {
- + tn->type = 0;
- + tn->val.s = (t->flag & ALLOC) ?
- + strsave (t->val.s + t->type, ap) : 0;
- + }
- + }
- + lastarea = ap;
- + }
- +
- + #endif
- diff -rc --new-file pdksh-4.9/sh/trace.c /gnu/src/amiga/pdksh-4.9/sh/trace.c
- *** pdksh-4.9/sh/trace.c Wed May 4 14:45:01 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/trace.c Wed May 4 22:24:41 1994
- ***************
- *** 145,152 ****
- fp = stderr;
- if (fp != (FILE *)NULL)
- {
- vfprintf(fp, fmt, arg_ptr);
- ! fputc('\n', fp);
- if (fp == stderr)
- fflush(fp);
- else
- --- 145,153 ----
- fp = stderr;
- if (fp != (FILE *)NULL)
- {
- + fprintf(fp, "$%lx:", getpid());
- vfprintf(fp, fmt, arg_ptr);
- ! fprintf(fp, "\r\n", fp);
- if (fp == stderr)
- fflush(fp);
- else
- diff -rc --new-file pdksh-4.9/sh/trap.c /gnu/src/amiga/pdksh-4.9/sh/trap.c
- *** pdksh-4.9/sh/trap.c Wed May 4 14:47:01 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/trap.c Wed May 4 22:24:42 1994
- ***************
- *** 111,116 ****
- --- 111,132 ----
- #endif
- }
-
- + #ifdef amigados
- + /* need to copy any allocated trap command strings in child, or we free
- + memory of the parent when afree() is invoked */
- + void
- + child_dup_traps ()
- + {
- + Trap *p;
- +
- + for (p = sigtraps; p < &sigtraps[sizeof (sigtraps) / sizeof (Trap)]; p++)
- + if (p->trap)
- + p->trap = strsave (p->trap, APERM);
- + }
- +
- + #endif /* amigados */
- +
- +
- /*
- * run any pending traps
- */
- diff -rc --new-file pdksh-4.9/sh/tty.h /gnu/src/amiga/pdksh-4.9/sh/tty.h
- *** pdksh-4.9/sh/tty.h Wed May 4 14:47:03 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/tty.h Wed May 4 22:40:59 1994
- ***************
- *** 29,34 ****
- --- 29,37 ----
- # define TIOCSETN TIOCSETP
- # else
- # include <sys/ioctl.h>
- + # ifdef __amigados__
- + # include <sys/ioctl_compat.h>
- + # endif
- # endif
- # else
- # include <termio.h>
- diff -rc --new-file pdksh-4.9/sh/var.c /gnu/src/amiga/pdksh-4.9/sh/var.c
- *** pdksh-4.9/sh/var.c Wed May 4 14:47:04 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/var.c Wed May 4 22:24:43 1994
- ***************
- *** 555,560 ****
- --- 555,617 ----
- }
- }
-
- + #ifdef amigados
- + /* have to copy stuff lacking real fork () (vfork is a bitch..) */
- +
- + /* assume e already set up for new block, so we use ATEMP for storage */
- + void
- + blk_copy (struct block *src)
- + {
- + struct block *l;
- + char **tw, **rw;
- + static char *empty[] = {""};
- +
- + /* this is the deepest nested block, also called `globals' */
- + if (! src->next)
- + {
- + /* note: taking &globals yields another address in the child
- + than src, since src points to the parents &globals. The
- + child has relocated global data, but not malloc space */
- +
- + l = &globals;
- + bzero (l, sizeof (*l));
- + e.loc = l;
- + }
- + else
- + {
- + blk_copy (src->next);
- + l = (struct block*) alloc(sizeof(struct block), ATEMP);
- + l->next = e.loc; e.loc = l;
- + }
- +
- + newblock();
- +
- + l->argc = src->argc;
- +
- + if (l->argc)
- + {
- + /* copy the argument vector */
- + for (tw = src->argv; *tw++ != NULL; ) ;
- + rw = l->argv = (char **) alloc((int)(tw - src->argv) * sizeof(*tw),
- + & l->area);
- + for (tw = src->argv; *tw != NULL; )
- + *rw++ = wdcopy(*tw++, & l->area);
- + *rw = NULL;
- + }
- + else
- + l->argv = empty;
- +
- + tbl_copy (& src->vars, & l->vars, & l->area);
- + tbl_copy (& src->funs, & l->funs, & l->area);
- +
- + /* they're not used anyway (ie. always 0), but something like this
- + will have to be done when they ARE used. Perhaps it will be ATEMP
- + instead of APERM? */
- + l->error = src->error ? strsave (src->error, APERM) : 0;
- + l->exit = src->exit ? strsave (src->exit, APERM) : 0;
- + }
- +
- + #endif
- static void
- setspec(vp)
- register struct tbl *vp;
- diff -rc --new-file pdksh-4.9/sh/vi.c /gnu/src/amiga/pdksh-4.9/sh/vi.c
- *** pdksh-4.9/sh/vi.c Wed May 4 14:47:05 1994
- --- /gnu/src/amiga/pdksh-4.9/sh/vi.c Wed May 4 22:24:44 1994
- ***************
- *** 1666,1672 ****
- --- 1666,1676 ----
- {
- char buf;
-
- + #ifdef amigados
- + if (tty_read(ttyfd, &buf, 1) != 1)
- + #else
- if (read(ttyfd, &buf, 1) != 1)
- + #endif
- return -1;
- if ((buf & 0x7f) == Ctrl('c')) {
- /*
- diff -rc --new-file pdksh-4.9/std/h/dirent.h /gnu/src/amiga/pdksh-4.9/std/h/dirent.h
- *** pdksh-4.9/std/h/dirent.h Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/std/h/dirent.h Wed May 4 15:03:28 1994
- ***************
- *** 0 ****
- --- 1,5 ----
- + /* <dirent.h> based on BSD <sys/dir.h> */
- +
- + #include <sys/dir.h>
- + #define dirent direct
- +
- diff -rc --new-file pdksh-4.9/std/h/fcntl.h /gnu/src/amiga/pdksh-4.9/std/h/fcntl.h
- *** pdksh-4.9/std/h/fcntl.h Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/std/h/fcntl.h Wed May 4 15:03:28 1994
- ***************
- *** 0 ****
- --- 1,26 ----
- + /* P1003.1 fcntl/open definitions */
- + /* Based on a version by Terrence W. Holm */
- + /* for fcntl(2) */
- + /* $Id: fcntl.h,v 1.3 93/05/05 21:17:47 sjg Exp $ */
- +
- + #define F_DUPFD 0
- + #define F_GETFD 1
- + #define F_SETFD 2
- + #define F_GETFL 3
- + #define F_SETFL 4
- +
- + #define FD_CLEXEC 1 /* fcntl F_SETFD close on exec mode */
- +
- + /* for open(2) */
- +
- + #define O_RDONLY 0
- + #define O_WRONLY 1
- + #define O_RDWR 2
- +
- + #if _BSD
- + #undef O_RDONLY
- + #undef O_WRONLY
- + #undef O_RDWR
- + #include "/./usr/include/fcntl.h"
- + #endif
- +
- diff -rc --new-file pdksh-4.9/std/h/io.h /gnu/src/amiga/pdksh-4.9/std/h/io.h
- *** pdksh-4.9/std/h/io.h Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/std/h/io.h Wed May 4 15:03:27 1994
- ***************
- *** 0 ****
- --- 1,59 ----
- + /* POSIX IO functions */
- + /* $Id: io.h,v 1.3 93/05/05 21:17:48 sjg Exp $ */
- +
- + /*
- + * the incomplete type "struct stat"
- + * will get warnings from GCC,
- + * errors from Turbo C. Too bad.
- + */
- +
- + /* include <unistd.h> to get this */
- +
- + #if ! _IO_H
- + #define _IO_H 1
- +
- + #include <unistd.h>
- +
- + #if _ST /* dLibs hack */
- + #define unlink remove
- + #endif
- +
- + struct stat; /* create global incompletely-typed structure */
- +
- + int chdir ARGS ((const char *path));
- + #ifndef sparc
- + int umask ARGS ((int mode));
- + #endif
- +
- + int open ARGS ((const char *path, int flags, ... /*mode*/));
- + int creat ARGS ((const char *path, int mode));
- + int pipe ARGS ((int pv[2]));
- + int close ARGS ((int fd));
- +
- + int fcntl ARGS ((int fd, int cmd, int arg));
- + int dup ARGS ((int fd));
- + int dup2 ARGS ((int ofd, int nfd));
- +
- + int link ARGS ((const char *opath, const char *npath));
- + int unlink ARGS ((const char *path));
- + int rename ARGS ((const char *opath, const char *npath));
- + int mkdir ARGS ((const char *path, int mode));
- +
- + long lseek ARGS ((int fd, long off, int how));
- + int read ARGS ((int fd, char *buf, unsigned len));
- + int write ARGS ((int fd, char *buf, unsigned len));
- +
- + int access ARGS ((const char *path, int mode));
- + int stat ARGS ((const char *path, struct stat *sp));
- + int fstat ARGS ((int fd, struct stat *sp));
- +
- + int chmod ARGS ((const char *path, int mode));
- + int chown ARGS ((const char *path, int uid));
- + int chgrp ARGS ((const char *path, int gid));
- + int utime ARGS ((const char *path, long tv[2]));
- +
- + #if _BSD || _V7
- + int ioctl ARGS ((int fd, int cmd, void *argp)); /* BSD is "uns long cmd" */
- + #endif
- +
- + #endif
- diff -rc --new-file pdksh-4.9/std/h/limits.h /gnu/src/amiga/pdksh-4.9/std/h/limits.h
- *** pdksh-4.9/std/h/limits.h Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/std/h/limits.h Wed May 4 15:03:29 1994
- ***************
- *** 0 ****
- --- 1,38 ----
- + /* Implementation-defined limits */
- +
- + #if __STDC__
- + #define Signed signed
- + #else
- + #define Signed
- + #endif
- +
- + #define CHAR_BIT 8
- +
- + #define _S_MIN(type) (-(Signed type)((unsigned type) ~0 >> 1) - 1)
- + #define _S_MAX(type) ((Signed type)((unsigned type) ~0 >> 1))
- +
- + #define UCHAR_MIN ((unsigned char) 0)
- + #define UCHAR_MAX ((unsigned char) ~0)
- + #define SCHAR_MIN _S_MIN(char)
- + #define SCHAR_MAX _S_MAX(char)
- +
- + /* some PCC compilers don't like the "elegant" definition of _UCHAR */
- + /* let the poor user provide -D_UCHAR=0 or 1 */
- + #ifndef _UCHAR
- + #define _UCHAR ((char) ~0 == (unsigned char) ~0)
- + #endif
- + #define CHAR_MIN (_UCHAR ? UCHAR_MIN : SCHAR_MIN)
- + #define CHAR_MAX (_UCHAR ? UCHAR_MAX : SCHAR_MAX)
- +
- + #define USHRT_MAX ((unsigned short) ~0)
- + #define SHRT_MIN _S_MIN(short)
- + #define SHRT_MAX _S_MAX(short)
- +
- + #define UINT_MAX ((unsigned int) ~0)
- + #define INT_MIN _S_MIN(int)
- + #define INT_MAX _S_MAX(int)
- +
- + #define ULONG_MAX ((unsigned long) ~0)
- + #define LONG_MIN _S_MIN(long)
- + #define LONG_MAX _S_MAX(long)
- +
- diff -rc --new-file pdksh-4.9/std/h/stddef.h /gnu/src/amiga/pdksh-4.9/std/h/stddef.h
- *** pdksh-4.9/std/h/stddef.h Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/std/h/stddef.h Wed May 4 15:03:29 1994
- ***************
- *** 0 ****
- --- 1,41 ----
- + /* ANSI common definitions */
- +
- + /* $Id: stddef.h,v 1.3 93/05/05 21:18:23 sjg Exp $ */
- +
- + #ifndef NULL
- + #if __STDC__
- + #define NULL (void*)0
- + #else
- + #define NULL 0
- + #endif
- + #endif
- +
- + #ifndef _STDDEF_H
- + #define _STDDEF_H
- +
- + /* doesn't really belong here, but the library function need it */
- + #ifndef ARGS
- + # ifdef __STDC__
- + # define ARGS(args) args
- + # else
- + # define ARGS(args) ()
- + # ifdef VOID
- + # define void VOID
- + # endif
- + # define const
- + # define volatile
- + # endif
- + #endif
- +
- + #ifdef HAVE_SYS_STDTYPES
- + # include <sys/stdtypes.h>
- + #else
- + typedef unsigned size_t; /* may need long */
- + typedef int ptrdiff_t;
- + #endif /* HAVE_SYS_STDTYPES */
- + #define offsetof(type,id) ((size_t)&((type*)NULL)->id)
- +
- + extern int errno; /* really belongs in <errno.h> */
- +
- + #endif
- +
- diff -rc --new-file pdksh-4.9/std/h/stdh.h /gnu/src/amiga/pdksh-4.9/std/h/stdh.h
- *** pdksh-4.9/std/h/stdh.h Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/std/h/stdh.h Wed May 4 15:03:27 1994
- ***************
- *** 0 ****
- --- 1,86 ----
- + /* NAME:
- + * stdh.h - standard headers
- + *
- + * SYNOPSIS:
- + * #include "stdh.h"
- + *
- + * DESCRIPTION:
- + * We use this header to encapsulate all the stddef et al
- + * inclusion so that most of the source can ignore the
- + * problems that their lack might cause.
- + *
- + * SEE ALSO:
- + *
- + *
- + * AMENDED:
- + * 91/11/25 13:33:12 (sjg)
- + *
- + * RELEASED:
- + * 91/11/25 13:33:17 v1.3
- + *
- + * SCCSID:
- + * @(#)stdh.h 1.3 91/11/25 13:33:12 (sjg)
- + *
- + */
- +
- + #ifndef ARGS
- + # ifdef __STDC__
- + # define ARGS(args) args
- + # else
- + # define ARGS(args) ()
- + # ifdef VOID
- + # define void VOID
- + # endif
- + # define const
- + # define volatile
- + # endif
- + #endif
- +
- + #include <stdio.h>
- + /* if we have std headers then include them here
- + * otherwise make allowances
- + */
- + #ifndef NOSTDHDRS
- + # include <stddef.h>
- + # include <stdlib.h>
- + # include <string.h>
- + # include <sys/types.h>
- + #else
- + # ifdef HAVE_SYS_STDTYPES
- + # include <sys/stdtypes.h>
- + # else
- + # include <sys/types.h>
- + /* just in case they have sys/stdtypes and don't know it
- + */
- + # ifndef __sys_stdtypes_h
- + #define _PID_T
- + #define _CLOCK_T
- + typedef int pid_t;
- + typedef long clock_t;
- + # endif
- + # endif
- + # ifdef _SYSV
- + # include <string.h>
- + # else
- + # include <strings.h>
- + # define strchr index
- + # define strrchr rindex
- + # endif
- + /* just a useful subset of what stdlib.h would have
- + */
- + extern char * getenv ARGS((const char *));
- + extern void * malloc ARGS((size_t));
- + extern int free ARGS((void *));
- + extern int exit ARGS((int));
- +
- + /* these _should_ match ANSI */
- + extern char * strstr ARGS((const char *, const char *));
- + extern void * memmove ARGS((void *, const void *, size_t));
- + extern void * memcpy ARGS((void *, const void *, size_t));
- + #endif /* NOSTDHDRS */
- +
- +
- + #ifndef offsetof
- + #define offsetof(type,id) ((size_t)&((type*)NULL)->id)
- + #endif
- +
- diff -rc --new-file pdksh-4.9/std/h/stdlib.h /gnu/src/amiga/pdksh-4.9/std/h/stdlib.h
- *** pdksh-4.9/std/h/stdlib.h Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/std/h/stdlib.h Wed May 4 15:03:29 1994
- ***************
- *** 0 ****
- --- 1,34 ----
- + /* ANSI utility functions */
- +
- + /* $Id: stdlib.h,v 1.3 93/05/05 21:18:29 sjg Exp $ */
- +
- + #if ! _STDLIB_H
- + #define _STDLIB_H 1
- +
- + #include <stddef.h>
- +
- + double atof ARGS((const char *s));
- + int atoi ARGS((const char *s));
- + long atol ARGS((const char *s));
- + double strtod ARGS((const char *s, char **));
- + long strtol ARGS((const char *s, char **, int base));
- + unsigned long strtoul ARGS((const char *s, char **, int base));
- + int rand ARGS((void));
- + void srand ARGS((unsigned int seed));
- + void *malloc ARGS((size_t size));
- + void *realloc ARGS((void *ptr, size_t size));
- + void *calloc ARGS((size_t n, size_t size));
- + void free ARGS((void *ptr));
- + void abort ARGS((void));
- + int atexit ARGS((void (*func)(void)));
- + void exit ARGS((int status));
- + char *getenv ARGS((const char *name));
- + int system ARGS((const char *cmd));
- + void *bsearch ARGS ((const void *key, const void *base, size_t n, size_t size,
- + int (*compar)(const void *, const void *)));
- + void *qsort ARGS ((const void *base, size_t n, size_t size,
- + int (*compar)(const void *, const void *)));
- + #define abs(a) ((a) < 0 : -(a) : (a))
- +
- + #endif
- +
- diff -rc --new-file pdksh-4.9/std/h/string.h /gnu/src/amiga/pdksh-4.9/std/h/string.h
- *** pdksh-4.9/std/h/string.h Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/std/h/string.h Wed May 4 15:03:29 1994
- ***************
- *** 0 ****
- --- 1,33 ----
- + /* ANSI string handling (missing wide char stuff) */
- + /* $Id: string.h,v 1.3 93/05/05 21:18:42 sjg Exp $ */
- +
- + #if ! _STRING_H
- + #define _STRING_H 1
- +
- + #include <stddef.h> /* define NULL and size_t */
- +
- + #ifndef __GNUC__
- + void *memcpy ARGS((void *s1, const void *s2, size_t));
- + int memcmp ARGS((const void *s1, const void *s2, size_t));
- + size_t strlen ARGS((const char *s));
- + #endif
- + void *memmove ARGS((void *s1, const void *s2, size_t));
- + void *memchr ARGS((const void *s, int c, size_t));
- + void *memset ARGS((void *s, int c, size_t));
- + char *strcpy ARGS((char *s1, const char *s2));
- + char *strncpy ARGS((char *s1, const char *s2, size_t));
- + char *strcat ARGS((char *s1, const char *s2));
- + char *strncat ARGS((char *s1, const char *s2, size_t));
- + int strcmp ARGS((const char *s1, const char *s2));
- + int strncmp ARGS((const char *s1, const char *s2, size_t));
- + char *strchr ARGS((const char *s1, int c));
- + char *strrchr ARGS((const char *s1, int c));
- + size_t strspn ARGS((const char *s1, const char *s2));
- + size_t strcspn ARGS((const char *s1, const char *s2));
- + char *strpbrk ARGS((const char *s1, const char *s2));
- + char *strstr ARGS((const char *s1, const char *s2));
- + char *strtok ARGS((char *s1, const char *s2));
- + char *strerror ARGS((int errno));
- +
- + #endif /* _STRING_H */
- +
- diff -rc --new-file pdksh-4.9/std/h/sys/time.h /gnu/src/amiga/pdksh-4.9/std/h/sys/time.h
- *** pdksh-4.9/std/h/sys/time.h Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/std/h/sys/time.h Wed May 4 15:03:28 1994
- ***************
- *** 0 ****
- --- 1,15 ----
- + /*
- + * Replacement for BSD <sys/time.h>
- + * because Ultrix screws it up.
- + */
- + /* $Id: time.h,v 1.3 93/05/05 21:17:50 sjg Exp $ */
- +
- + struct timeval {
- + long tv_sec; /* time_t */
- + long tv_usec; /* microsex */
- + };
- +
- + struct timezone {
- + int tz_minuteswest; /* of Greenwinch */
- + int tz_dsttime; /* type of dst correction to apply */
- + };
- diff -rc --new-file pdksh-4.9/std/h/sys/times.h /gnu/src/amiga/pdksh-4.9/std/h/sys/times.h
- *** pdksh-4.9/std/h/sys/times.h Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/std/h/sys/times.h Wed May 4 15:03:28 1994
- ***************
- *** 0 ****
- --- 1,29 ----
- + /*
- + * sys/times.h: POSIX times()
- + */
- + /* $Id: times.h,v 1.3 93/05/05 21:17:53 sjg Exp $ */
- +
- + #if ! _TIMES_H
- + #define _TIMES_H 1
- +
- + #include <time.h> /* defines CLK_TCK */
- +
- + #if __STDC__
- + #define ARGS(args) args
- + #else
- + #define ARGS(args) ()
- + #endif
- +
- + struct tms {
- + clock_t tms_utime, tms_stime;
- + clock_t tms_cutime, tms_cstime;
- + };
- +
- + #if _V7
- + #define times times_
- + #endif
- +
- + clock_t times ARGS((struct tms *tmsp));
- +
- + #endif
- +
- diff -rc --new-file pdksh-4.9/std/h/sys/types.h /gnu/src/amiga/pdksh-4.9/std/h/sys/types.h
- *** pdksh-4.9/std/h/sys/types.h Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/std/h/sys/types.h Wed May 4 15:03:30 1994
- ***************
- *** 0 ****
- --- 1,15 ----
- + /* work around multiple typedefs in stddef.h and sys/types.h */
- + /* $Id: types.h,v 1.3 93/05/05 21:19:01 sjg Exp $ */
- +
- + #include <stddef.h> /* defines size_t and ptrdiff_t */
- + #include <time.h> /* defines time_t and clock_t */
- +
- + /* "inhibit" the typedefs in sys/types.h */
- + #define size_t _size_t
- + #define time_t _time_t
- + #define clock_t _clock_t
- + #include "/./usr/include/sys/types.h"
- + #undef size_t
- + #undef time_t
- + #undef clock_t
- +
- diff -rc --new-file pdksh-4.9/std/h/sys/wait.h /gnu/src/amiga/pdksh-4.9/std/h/sys/wait.h
- *** pdksh-4.9/std/h/sys/wait.h Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/std/h/sys/wait.h Wed May 4 15:03:28 1994
- ***************
- *** 0 ****
- --- 1,49 ----
- + /*
- + * POSIX <sys/wait.h>
- + */
- + /* $Id: wait.h,v 1.3 93/05/05 21:18:00 sjg Exp $ */
- + #if __STDC__
- + #define ARGS(args) args
- + #else
- + #define ARGS(args) ()
- + #endif
- +
- + #ifdef HAVE_SYS_STDTYPES
- + # include <sys/stdtypes.h>
- + #else
- + # ifndef _PID_T
- + # define _PID_T
- + typedef int pid_t; /* belong in sys/types.h */
- + # endif
- + #endif
- +
- + #ifdef sun
- + # include "/./usr/include/sys/wait.h"
- + #else
- +
- + #define WAIT_T int
- +
- + /* waitpid options */
- + #define WNOHANG 1 /* don't hang in wait */
- + #define WUNTRACED 2 /* tell about stopped, untraced children */
- +
- + #define WSTOPPED 0x7F /* process is stopped */
- +
- + #define WIFSTOPPED(x) (((x)&0xFF) == 0x7F)
- + #define WIFSIGNALED(x) (((x)&0xFF) != 0x7F && ((x)&0x7F) != 0)
- + #define WIFEXITED(x) (((x)&0xFF) != 0x7F && ((x)&0x7F) == 0)
- + #define WIFCORED(x) (!!((x)&0x80)) /* non-standard */
- + #define WEXITSTATUS(x) ((x)>>8&0xFF)
- + #define WTERMSIG(x) ((x)&0x7F)
- + #define WSTOPSIG(x) ((x)>>8&0xFF)
- +
- + pid_t wait ARGS((int *statp));
- + #if _BSD
- + pid_t wait3 ARGS((int *statp, int options, void *));
- + /* todo: does not emulate pid argument */
- + #define waitpid(pid, sp, opts) wait3(sp, opts, (void*)NULL)
- + #else
- + pid_t waitpid ARGS((pid_t pid, int *statp, int options));
- + #endif
- +
- + #endif /* sparc */
- diff -rc --new-file pdksh-4.9/std/h/time.h /gnu/src/amiga/pdksh-4.9/std/h/time.h
- *** pdksh-4.9/std/h/time.h Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/std/h/time.h Wed May 4 15:03:30 1994
- ***************
- *** 0 ****
- --- 1,47 ----
- + /* time, time/date conversion */
- + /* $Id: time.h,v 1.3 93/05/05 21:19:00 sjg Exp $ */
- +
- + #if ! _TIME_H
- + #define _TIME_H 1
- +
- + #include <stddef.h> /* need size_t */
- +
- + #ifndef HAVE_SYS_STDTYPES
- + #ifndef _TIME_T
- + typedef long time_t;
- + #endif
- + typedef long clock_t; /* seconds/CLK_TCK */
- + #endif
- +
- + #if _V7 || _SYSV
- + #define CLK_TCK 60 /* todo: get from <sys/param.h> */
- + #endif
- +
- + #if _BSD
- + #define CLK_TCK 100
- + #endif
- +
- + #if _ST
- + #define CLK_TCK 200 /* ST system clock */
- + #endif
- +
- + struct tm {
- + int tm_sec, tm_min, tm_hour;
- + int tm_mday, tm_mon, tm_year, tm_wday, tm_yday;
- + int tm_isdst;
- + long tm_gmtoff; /* BSD */
- + char *tm_zone; /* BSD */
- + };
- +
- + clock_t clock ARGS((void));
- + time_t time ARGS((time_t *tp));
- + #define difftime(t1, t2) (double)((t2)-(t1))
- + time_t mktime ARGS((struct tm *tmp));
- + char *asctime ARGS((const struct tm *tmp));
- + char *ctime ARGS((const time_t *tp));
- + struct tm *gmtime ARGS((const time_t *tp));
- + struct tm *localtime ARGS((const time_t *tp));
- + size_t strftime ARGS((char *buf, size_t len, const char *fmt, const struct tm *tmp));
- +
- + #endif
- +
- diff -rc --new-file pdksh-4.9/std/h/unistd.h /gnu/src/amiga/pdksh-4.9/std/h/unistd.h
- *** pdksh-4.9/std/h/unistd.h Thu Jan 1 00:00:00 1970
- --- /gnu/src/amiga/pdksh-4.9/std/h/unistd.h Wed May 4 15:03:28 1994
- ***************
- *** 0 ****
- --- 1,49 ----
- + /* unistd.h: misc. P1003.1 definitions */
- + /* Based on a version by Terrence W. Holm */
- + /* $Id: unistd.h,v 1.3 93/05/05 21:17:58 sjg Exp $ */
- +
- + #if ! _UNISTD_H
- + #define _UNISTD_H 1
- +
- + #include <stddef.h>
- +
- + /* doesn't really belong here, but the library function need it */
- + /* todo: use _ARGS, _void, _const */
- + #if __STDC__
- + #define ARGS(args) args
- + #define void void
- + #define const const
- + #else
- + #define ARGS(args) ()
- + #define void char
- + #define const
- + #endif
- +
- + #include <io.h> /* POSIX IO functions */
- +
- + /* for access(2) */
- +
- + #define R_OK 4
- + #define W_OK 2
- + #define X_OK 1
- + #define F_OK 0
- +
- + /* for lockf(2) */
- +
- + #define F_ULOCK 0
- + #define F_LOCK 1
- + #define F_TLOCK 2
- + #define F_TEST 3
- +
- + /* for lseek(2) */
- +
- + #define SEEK_SET 0
- + #define SEEK_CUR 1
- + #define SEEK_END 2
- +
- + #define IN_PATH "/usr/include"
- +
- + char *getcwd ARGS ((char *buf, size_t len));
- +
- + #endif
- +
-