xref: /titanic_50/usr/src/cmd/sendmail/db/os/os_unlink.c (revision 25cf1a301a396c38e8adf52c15f537b80d2483f7)
1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 1997, 1998
5  *	Sleepycat Software.  All rights reserved.
6  */
7 
8 #include "config.h"
9 
10 #ifndef lint
11 static const char sccsid[] = "@(#)os_unlink.c	10.7 (Sleepycat) 10/12/98";
12 #endif /* not lint */
13 
14 #ifndef NO_SYSTEM_INCLUDES
15 #include <sys/types.h>
16 
17 #include <errno.h>
18 #include <unistd.h>
19 #endif
20 
21 #include "db_int.h"
22 #include "os_jump.h"
23 
24 /*
25  * __os_unlink --
26  *	Remove a file.
27  *
28  * PUBLIC: int __os_unlink __P((const char *));
29  */
30 int
31 __os_unlink(path)
32 	const char *path;
33 {
34 	int ret;
35 
36 	ret = __db_jump.j_unlink != NULL ?
37 	    __db_jump.j_unlink(path) : unlink(path);
38 	return (ret == -1 ? errno : 0);
39 }
40