Eric Blake wrote on 2011-05-19: > http://austingroupbugs.net/view.php?id=382 requires that strerror(0) > succeed, but FreeBSD reports "Unknown error: 0" and fails with EINVAL. > > * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): Expose BSD bug. > * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Likewise. > * lib/strerror_r.c (rpl_strerror_r): Work around it. > * doc/posix-functions/strerror.texi (strerror): Document it. > * doc/posix-functions/strerror_r.texi (strerror_r): Likewise. > * tests/test-strerror.c (main): Strengthen test. > * tests/test-strerror_r.c (main): Likewise.
You have marked this bug as "fixed by gnulib", but I'm still seeing test failures about it on FreeBSD 6.4. A testdir for strerror, strerror_r-posix, perror yields these test failures: test-perror2.c:112: assertion failed Abort trap (core dumped) FAIL: test-perror2 test-strerror.c:62: assertion failed Abort trap (core dumped) FAIL: test-strerror Relevant configure output: checking whether strerror_r is declared... yes checking for strerror_r... yes checking for strerror_r with POSIX signature... yes checking whether strerror_r works... no ; exit status 20 checking whether strerror_r is declared without a macro... yes checking for working strerror function... no ; exit status 4 checking whether strerror is declared... yes Relevant config.status variables: S["REPLACE_STRERROR_R"]="1" S["REPLACE_STRERROR"]="1" S["HAVE_DECL_STRERROR_R"]="1" S["GNULIB_STRERROR_R"]="1" S["GNULIB_STRERROR"]="1" S["REPLACE_PERROR"]="1" S["GNULIB_PERROR"]="1" D["HAVE_DECL_STRERROR_R"]=" 1" D["HAVE_STRERROR_R"]=" 1" D["HAVE_RAW_DECL_STRERROR_R"]=" 1" D["GNULIB_TEST_PERROR"]=" 1" D["HAVE_DECL_STRERROR"]=" 1" D["GNULIB_STRERROR"]=" 1" D["GNULIB_TEST_STRERROR"]=" 1" D["HAVE_STRERROR_R"]=" 1" D["GNULIB_TEST_STRERROR_R"]=" 1" Bruno -- In memoriam Mordechai Gebirtig <http://en.wikipedia.org/wiki/Mordechai_Gebirtig>