3 * strerror.c - network errno support for AmiTCP/IP
5 * Copyright © 1994 AmiTCP/IP Group,
6 * Network Solutions Development Inc.
8 * Copyright © 2005 Pavel Fedin
12 #include <proto/socket.h>
13 #include <bsdsocket/socketbasetags.h>
15 /****** net.lib/strerror *****************************************************
18 strerror -- return the text for given error number
21 string = strerror(error);
26 This function returns pointer to the (English) string describing the
27 error code given as argument. The error strings are defined for the
28 error codes defined in <sys/errno.h>.
31 The string pointed to by the return value should not be modified by
32 the program, but may be overwritten by a subsequent call to this
36 The strerror() prototype should be
37 const char *strerror(unsigned int);
38 However, the SAS C includes define it differently.
41 <netinclude:sys/errno.h>, perror(), PrintNetFault()
42 *****************************************************************************
47 strerror(unsigned int error
)
55 taglist
[0] = SBTM_GETVAL(SBTC_ERRNOSTRPTR
);
59 SocketBaseTagList((struct TagItem
*)taglist
);
60 return (char *)taglist
[1];