Modernised to POSIX standards.