import some changes from netbsd
3 files changed