3 * perror.c - print error message
5 * Copyright © 1994 AmiTCP/IP Group,
6 * Network Solutions Development Inc.
10 /****** net.lib/perror *******************************************************
13 perror - socket error messages
21 void perror(const char *)
24 The perror() function finds the error message corresponding to the
25 current value of the global variable errno and writes it, followed
26 by a newline, to the stderr. If the argument string is non-NULL it
27 is preappended to the message string and separated from it by a
28 colon and space (`: '). If string is NULL only the error message
32 The perror() function requires the stdio functions to be linked.
35 strerror(), PrintNetFault(), <netinclude:sys/errno.h>
37 ******************************************************************************
43 #include <clib/netlib_protos.h>
46 perror(const char *banner
)
48 const char *err
= strerror(errno
);
51 fputs(banner
, stderr
);