Compile dtksh on FreeBSD

dtksh can be now compiled on FreeBSD. Work in progress.

Needs a real Korn shell to bootstrap as $(KSHELL).
KSHELL is set by default to /usr/local/bin/ksh93
(generic POSIX shell may not work)

Tested on:

  FreeBSD 9.0-BETA1 #0 r224912M amd64

Known issues:

xvmstat:
* sleep does not work well (SIGSTOP is delivered)
xpong:
* xpong: line 220:  ball1x = max_x * 2.2 / 3 : arithmetic syntax error
* dtksh is rebuilt uncondtionally every time make is invoked
This commit is contained in:
Marcin Cieslak
2012-08-14 15:31:55 +02:00
committed by Jon Trulson
parent 441a25b361
commit d3206f4514
21 changed files with 54 additions and 207 deletions

View File

@@ -727,110 +727,6 @@ esac
esac
trap 'exit 2' 1 2
#
# check if we can use pax -- punt to cpio
#
AR_DELTA=
NEED_pax=
_cpio_=
_cpio_local=
_pax_=
_pax_local=
for p in $_path_
do case $AR_DELTA in
"") for f in $p/pax $p/pax.save
do if ($f -f /dev/null -z /dev/null) >/dev/null 2>&1
then _pax_=$p/pax
c=pax; eval new=$_stamp_
if test "$new" -ge "$OLDEST_pax"
then case $f in
$BIN/pax) if test ! -f $f.save
then $_trace_ cp $f $f.save
fi
;;
esac
AR_DELTA=$f
break 2
fi
fi
done
;;
esac
case $_cpio_ in
"") if test -f $p/cpio
then case $p in
$BIN) _cpio_local=$p/cpio
;;
*) _cpio_=$p/cpio
case $AR_DELTA in
?*) break ;;
esac
;;
esac
fi
;;
esac
case $_pax_ in
"") if test -f $p/pax
then case $p in
$BIN) _pax_local=$p/pax
;;
*) _pax_=$p/pax
case $AR_DELTA in
?*) break ;;
esac
;;
esac
fi
;;
esac
done
case $_cpio_ in
"") _cpio_=$_cpio_local ;;
esac
case $_pax_ in
"") _pax_=$_pax_local ;;
esac
case $_pax_ in
?*) AR_PATH=$_pax_
case $AR_DELTA in
"") AR_LIST="$AR_PATH" ;;
*) AR_LIST="$AR_PATH -x ignore" ;;
esac
AR_READ="$AR_PATH -r"
AR_WRITE="$AR_PATH -w"
;;
*) AAR_PATH=tar
AAR_LIST="$AAR_PATH t"
AAR_READ="$AAR_PATH x"
AAR_WRITE="$AAR_PATH c"
case $_cpio_ in
?*) AR_PATH=$_cpio_
AR_LIST="$AR_PATH -ict"
AR_READ="$AR_PATH -icdmu"
AR_WRITE="$AR_PATH -oc"
;;
*) AR_PATH=$AAR_PATH
AR_LIST=$AAR_LIST
AR_READ=$AAR_READ
AR_WRITE=$AAR_WRITE
AAR_PATH=
AAR_LIST=
AAR_READ=
AAR_WRITE=
;;
esac
esac
case $AR_PATH in
"") echo $_command_: must have pax, cpio, or tar to uncrate >&2; exit 1 ;;
esac
OAR_PATH=$AR_PATH
OAR_LIST=$AR_LIST
OAR_READ=$AR_READ
OAR_WRITE=$AR_WRITE
OAR_DELTA=$AR_DELTA
#
# check if we can use nmake from the start
# if so then limit proto to notices only

View File

@@ -104,6 +104,7 @@
# include <sys/types.h>
# include <sys/stat.h>
# include <string.h>
# undef ctime
@@ -1331,7 +1332,7 @@ struct ppsymkey
extern __MANGLE__ int access __PROTO__((const char*, int));
extern __MANGLE__ __V_* calloc __PROTO__((int, int));
extern __MANGLE__ __V_* calloc __PROTO__((size_t, size_t));
extern __MANGLE__ int close __PROTO__((int));
extern __MANGLE__ int creat __PROTO__((const char*, int));
extern __MANGLE__ char* ctime __PROTO__((time_t*));