diff options
author | jilles <jilles@FreeBSD.org> | 2011-04-05 21:56:05 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2011-04-05 21:56:05 +0000 |
commit | c902a38c4a1577f5b9a27832540f1a955ea78038 (patch) | |
tree | 9ba493ad554e8b08e9a294a55e6d6e571583a3e2 /lib/libc/gen/errlst.c | |
parent | bb9f2459b8a1d6a5aca6101af345c3ed3ccabc83 (diff) | |
download | FreeBSD-src-c902a38c4a1577f5b9a27832540f1a955ea78038.zip FreeBSD-src-c902a38c4a1577f5b9a27832540f1a955ea78038.tar.gz |
Allow strerror(0) and strerror_r(0, ...).
Of course, strerror_r() may still fail with ERANGE.
Although the POSIX specification said this could fail with EINVAL and
doing this likely indicates invalid use of errno, most other
implementations permitted it, various POSIX testsuites require it to
work (matching the older sys_errlist array) and apparently some
applications depend on it.
PR: standards/151316
MFC after: 1 week
Diffstat (limited to 'lib/libc/gen/errlst.c')
-rw-r--r-- | lib/libc/gen/errlst.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/errlst.c b/lib/libc/gen/errlst.c index b105cc8..d817823 100644 --- a/lib/libc/gen/errlst.c +++ b/lib/libc/gen/errlst.c @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include <stdio.h> const char *const sys_errlist[] = { - "Undefined error: 0", /* 0 - ENOERROR */ + "No error: 0", /* 0 - ENOERROR */ "Operation not permitted", /* 1 - EPERM */ "No such file or directory", /* 2 - ENOENT */ "No such process", /* 3 - ESRCH */ |