purge remaining gpl code from clib, and make clib build again
[tangerine.git] / compiler / clib / remove.c
blob83e02baa290c9640f11b096d738189484aab39ab
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 $Id$
5 ANSI C function remove().
6 */
8 #define remove remove
10 #include <proto/dos.h>
11 #include "__errno.h"
12 #include "__upath.h"
14 /*****************************************************************************
16 NAME */
17 #include <stdio.h>
19 int remove (
21 /* SYNOPSIS */
22 const char * pathname)
24 /* FUNCTION
25 Deletes a file or directory.
27 INPUTS
28 pathname - Complete path to the file or directory.
30 RESULT
31 0 on success and -1 on error. In case of an error, errno is set.
33 NOTES
34 Identical to unlink
36 EXAMPLE
38 BUGS
40 SEE ALSO
41 unlink
43 INTERNALS
45 ******************************************************************************/
47 if (!DeleteFile (__path_u2a(pathname)))
49 errno = IoErr2errno (IoErr());
50 return -1;
53 return 0;
54 } /* remove */