Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / network / stacks / AROSTCP / netlib / strerror.c
bloba9f36b8d37eedc7b72917d59171671f0e5556ca5
1 /* $Id$
3 * strerror.c - network errno support for AmiTCP/IP
5 * Copyright © 1994 AmiTCP/IP Group,
6 * Network Solutions Development Inc.
7 * All rights reserved.
8 * Copyright © 2005 Pavel Fedin
9 */
11 #include <errno.h>
12 #include <proto/socket.h>
13 #include <bsdsocket/socketbasetags.h>
15 /****** net.lib/strerror *****************************************************
17 NAME
18 strerror -- return the text for given error number
20 SYNOPSIS
21 string = strerror(error);
23 char * strerror(int);
25 FUNCTION
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>.
30 NOTES
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
33 function.
35 BUGS
36 The strerror() prototype should be
37 const char *strerror(unsigned int);
38 However, the SAS C includes define it differently.
40 SEE ALSO
41 <netinclude:sys/errno.h>, perror(), PrintNetFault()
42 *****************************************************************************
45 #ifdef notyet
46 const char *
47 strerror(unsigned int error)
48 #else
49 char *
50 strerror(int error)
51 #endif
53 ULONG taglist[3];
55 taglist[0] = SBTM_GETVAL(SBTC_ERRNOSTRPTR);
56 taglist[1] = error;
57 taglist[2] = TAG_END;
59 SocketBaseTagList((struct TagItem *)taglist);
60 return (char *)taglist[1];