tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / compiler / posixc / perror.c
blobb75954da27412ab9bba5ad0bce56c9cc96885e93
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 function perror().
6 */
8 #include <errno.h>
9 #include <string.h>
11 /*****************************************************************************
13 NAME */
14 #include <stdio.h>
16 void perror (
18 /* SYNOPSIS */
19 const char *string
22 /* FUNCTION
23 looks up the language-dependent error message string affiliated with an error
24 number and writes it, followed by a newline, to the standard error stream.
26 INPUTS
27 string - the string to prepend the error message. If NULL only the error
28 message will be printed, otherwise the error message will be
29 separated from string by a colon.
30 RESULT
32 NOTES
34 EXAMPLE
36 BUGS
38 SEE ALSO
40 INTERNALS
42 ******************************************************************************/
44 if (string)
46 fputs(string, stderr);
47 fputs(": ", stderr);
50 fputs(__posixc_strerror(errno), stderr);
51 fputs("\n", stderr);
53 } /* perror */