Checking in change from Alan Hayward <Alan.Hayward@arm.com> Signed-off-by: Jeff Johnston <jjohnstn@redhat.com>
This is copied from musl (MIT license). This is newer and more thorough than that of FreeBSD currently shipped only on Cygwin. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>