some portability fixes by rmh in Bug 395
2 files changed