| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: remove.c,v 1.1.2.1 2008/08/05 22:56:24 joerg Exp $ */ | | 1 | /* $NetBSD: remove.c,v 1.1.2.2 2008/08/06 12:58:52 joerg Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>. | | 4 | * Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * | | 10 | * |
11 | * 1. Redistributions of source code must retain the above copyright | | 11 | * 1. Redistributions of source code must retain the above copyright |
12 | * notice, this list of conditions and the following disclaimer. | | 12 | * notice, this list of conditions and the following disclaimer. |
13 | * 2. Redistributions in binary form must reproduce the above copyright | | 13 | * 2. Redistributions in binary form must reproduce the above copyright |
14 | * notice, this list of conditions and the following disclaimer in | | 14 | * notice, this list of conditions and the following disclaimer in |
| @@ -19,26 +19,38 @@ | | | @@ -19,26 +19,38 @@ |
19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | | 19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | | 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
21 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | | 21 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
22 | * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | | 22 | * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
23 | * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, | | 23 | * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, |
24 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | | 24 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
25 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | | 25 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
26 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | | 26 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
27 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | | 27 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
28 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 28 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
29 | * SUCH DAMAGE. | | 29 | * SUCH DAMAGE. |
30 | */ | | 30 | */ |
31 | | | 31 | |
| | | 32 | #if HAVE_CONFIG_H |
| | | 33 | #include "config.h" |
| | | 34 | #endif |
| | | 35 | |
| | | 36 | #include <nbcompat.h> |
| | | 37 | |
| | | 38 | #if HAVE_SYS_CDEFS_H |
| | | 39 | #include <sys/cdefs.h> |
| | | 40 | #endif |
| | | 41 | |
| | | 42 | __RCSID("$NetBSD: remove.c,v 1.1.2.2 2008/08/06 12:58:52 joerg Exp $"); |
| | | 43 | |
32 | #if HAVE_DIRENT_H | | 44 | #if HAVE_DIRENT_H |
33 | #include <dirent.h> | | 45 | #include <dirent.h> |
34 | #endif | | 46 | #endif |
35 | #if HAVE_ERR_H | | 47 | #if HAVE_ERR_H |
36 | #include <err.h> | | 48 | #include <err.h> |
37 | #endif | | 49 | #endif |
38 | #include <errno.h> | | 50 | #include <errno.h> |
39 | #if HAVE_FCNTL_H | | 51 | #if HAVE_FCNTL_H |
40 | #include <fcntl.h> | | 52 | #include <fcntl.h> |
41 | #endif | | 53 | #endif |
42 | #include <limits.h> | | 54 | #include <limits.h> |
43 | #include <stdio.h> | | 55 | #include <stdio.h> |
44 | #include <stdlib.h> | | 56 | #include <stdlib.h> |