3 * strerror.c - network errno support for AmiTCP/IP
5 * Copyright © 1994 AmiTCP/IP Group,
6 * Network Solutions Development Inc.
8 * Copyright © 2005 - 2011 Pavel Fedin
12 #include <proto/socket.h>
13 #include <bsdsocket/socketbasetags.h>
17 /****** net.lib/strerror *****************************************************
20 strerror -- return the text for given error number
23 string = strerror(error);
28 This function returns pointer to the (English) string describing the
29 error code given as argument. The error strings are defined for the
30 error codes defined in <sys/errno.h>.
33 The string pointed to by the return value should not be modified by
34 the program, but may be overwritten by a subsequent call to this
38 The strerror() prototype should be
39 const char *strerror(unsigned int);
40 However, the SAS C includes define it differently.
43 <netinclude:sys/errno.h>, perror(), PrintNetFault()
44 *****************************************************************************
49 strerror(unsigned int error
)
57 taglist
[0] = SBTM_GETVAL(SBTC_ERRNOSTRPTR
);
61 SocketBaseTagList((struct TagItem
*)taglist
);
62 return (char *)taglist
[1];