tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / workbench / network / stacks / AROSTCP / netlib / strerror.c
blob539bb05cf13c0c817d1917cacff281a789c6cb25
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 - 2011 Pavel Fedin
9 */
11 #include <errno.h>
12 #include <proto/socket.h>
13 #include <bsdsocket/socketbasetags.h>
15 #include "conf.h"
17 /****** net.lib/strerror *****************************************************
19 NAME
20 strerror -- return the text for given error number
22 SYNOPSIS
23 string = strerror(error);
25 char * strerror(int);
27 FUNCTION
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>.
32 NOTES
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
35 function.
37 BUGS
38 The strerror() prototype should be
39 const char *strerror(unsigned int);
40 However, the SAS C includes define it differently.
42 SEE ALSO
43 <netinclude:sys/errno.h>, perror(), PrintNetFault()
44 *****************************************************************************
47 #ifdef notyet
48 const char *
49 strerror(unsigned int error)
50 #else
51 char *
52 strerror(int error)
53 #endif
55 IPTR taglist[3];
57 taglist[0] = SBTM_GETVAL(SBTC_ERRNOSTRPTR);
58 taglist[1] = error;
59 taglist[2] = TAG_END;
61 SocketBaseTagList((struct TagItem *)taglist);
62 return (char *)taglist[1];