arch/m68k-amiga: Define the gcc symbol 'start' instead of using .bss
[AROS.git] / compiler / clib / perror.c
blob980453d89a63b18923d88548f0cc0889112b62a6
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 $Id$
5 ANSI C function perror().
6 */
8 #include "errno.h"
9 #include "string.h"
10 /*****************************************************************************
12 NAME */
13 #include <stdio.h>
15 void perror (
17 /* SYNOPSIS */
18 const char *string
21 /* FUNCTION
22 looks up the language-dependent error message string affiliated with an error
23 number and writes it, followed by a newline, to the standard error stream.
25 INPUTS
26 string - the string to prepend the error message. If NULL only the error
27 message will be printed, otherwise the error message will be
28 separated from string by a colon.
29 RESULT
31 NOTES
33 EXAMPLE
35 BUGS
37 SEE ALSO
39 INTERNALS
41 ******************************************************************************/
43 if (string)
45 fputs(string, stderr);
46 fputs(": ", stderr);
49 fputs(strerror(errno), stderr);
50 fputs("\n", stderr);
52 } /* perror */