Simplify and modernize strerror substitute, partly to fix Solaris 8 bug.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 11 Oct 2007 21:43:30 +0000 (14:43 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 11 Oct 2007 21:43:30 +0000 (14:43 -0700)
commit73f48e6fcc45389a6d7022b7de234d82b97b2f7f
tree9ad6b503f21a09a63135b7c8150cb7531b6b63ce
parentc116e7501e246cec2ffee3582e5ed9728b21c7a8
Simplify and modernize strerror substitute, partly to fix Solaris 8 bug.

* lib/strerror.c: Include <string.h> always, to test interface,
and to remove the need for the dummy.
Include intprops.h to compute width instead of doing it ourselves
and missing a CHAR_BIT declaration, which broke tar 1.19 on Solaris 8.
(strerror): Define it to return NULL if there's no system strerror.
(rpl_strerror): Use INT_STRLEN_BOUND to compute bound.
Omit !HAVE_STRERROR code.  We don't need to worry about supporting
ancient pre-strerror Unix systems well any more.  Saying "unknown
system error" is enough.
* lib/string.in.h (strerror): Simplify the ifdef to reflect the
simpler strerror.c implementation.
* m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE, gl_PREREQ_STDERROR):
Simplify the tests to reflect the simpler strerror implementation.
* modules/strerror (Depends-on): Add intprops.
ChangeLog
lib/strerror.c
lib/string.in.h
m4/strerror.m4
modules/strerror