Utility functions from BSD systems