mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 06:53:33 +00:00
There must only be one strerror()
This commit is contained in:
parent
c91de6a356
commit
5250feb7ad
1 changed files with 0 additions and 23 deletions
23
third_party/unzip/unix.c
vendored
23
third_party/unzip/unix.c
vendored
|
@ -2046,26 +2046,3 @@ int vol_attr_ok( const char *path)
|
|||
* Enable by specifying "LOCAL_UNZIP=-DNEED_STRERROR=1" on the "make"
|
||||
* command line.
|
||||
*/
|
||||
|
||||
#ifdef NEED_STRERROR
|
||||
|
||||
char *strerror( err)
|
||||
int err;
|
||||
{
|
||||
extern char *sys_errlist[];
|
||||
extern int sys_nerr;
|
||||
|
||||
static char no_msg[ 64];
|
||||
|
||||
if ((err >= 0) && (err < sys_nerr))
|
||||
{
|
||||
return sys_errlist[ err];
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( no_msg, "(no message, code = %d.)", err);
|
||||
return no_msg;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* def NEED_STRERROR */
|
||||
|
|
Loading…
Reference in a new issue