From 16d2d12641723af5958c4e82032bf2cb4271fb1b Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Sat, 21 Jun 2008 06:54:15 -0400 Subject: [PATCH] IFC SVN-Revision: 134 --- cpio/Makefile | 6 ++-- cpio/cmdline.c | 2 +- cpio/cpio.h | 2 +- cpio/matching.c | 2 +- cpio/test/main.c | 2 +- cpio/test/test.h | 2 +- ...archive_read_support_compression_program.c | 2 +- .../archive_read_support_format_mtree.c | 2 +- libarchive/archive_string.c | 34 +++++++++---------- .../archive_write_set_compression_program.c | 2 +- libarchive/filter_fork.c | 2 +- libarchive/test/main.c | 2 +- libarchive/test/test.h | 2 +- libarchive/test/test_read_extract.c | 2 +- libarchive/test/test_write_disk.c | 2 +- libarchive/test/test_write_disk_perms.c | 2 +- libarchive/test/test_write_disk_secure.c | 2 +- tar/subst.c | 2 +- tar/test/main.c | 2 +- tar/test/test.h | 2 +- 20 files changed, 39 insertions(+), 37 deletions(-) diff --git a/cpio/Makefile b/cpio/Makefile index 2e91ba3b0..aca098467 100644 --- a/cpio/Makefile +++ b/cpio/Makefile @@ -1,4 +1,6 @@ -# $FreeBSD$ +# $FreeBSD: src/usr.bin/cpio/Makefile,v 1.4 2008/06/16 07:24:05 dougb Exp $ + +.include PROG= bsdcpio BSDCPIO_VERSION_STRING=1.0.0 @@ -9,7 +11,7 @@ CFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\" CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" LDADD+= -larchive -lz -lbz2 -.if defined(WITH_BSDCPIO) +.if ${MK_GNU_CPIO} != "yes" SYMLINKS=bsdcpio ${BINDIR}/cpio MLINKS= bsdcpio.1 cpio.1 .endif diff --git a/cpio/cmdline.c b/cpio/cmdline.c index 29183f1ca..a602e39c1 100644 --- a/cpio/cmdline.c +++ b/cpio/cmdline.c @@ -26,7 +26,7 @@ #include "cpio_platform.h" -__FBSDID("$FreeBSD$"); +__FBSDID("$FreeBSD: src/usr.bin/cpio/cmdline.c,v 1.3 2008/06/21 02:20:20 kientzle Exp $"); #ifdef HAVE_ERRNO_H #include diff --git a/cpio/cpio.h b/cpio/cpio.h index 78086331b..3afd95203 100644 --- a/cpio/cpio.h +++ b/cpio/cpio.h @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: src/usr.bin/cpio/cpio.h,v 1.2 2008/06/21 02:20:20 kientzle Exp $ */ #ifndef CPIO_H_INCLUDED diff --git a/cpio/matching.c b/cpio/matching.c index 8d1798fd5..3e4ddc3bf 100644 --- a/cpio/matching.c +++ b/cpio/matching.c @@ -24,7 +24,7 @@ */ #include "cpio_platform.h" -__FBSDID("$FreeBSD$"); +__FBSDID("$FreeBSD: src/usr.bin/cpio/matching.c,v 1.2 2008/06/21 02:20:20 kientzle Exp $"); #ifdef HAVE_ERRNO_H #include diff --git a/cpio/test/main.c b/cpio/test/main.c index 133f4a989..e0f8c2e11 100644 --- a/cpio/test/main.c +++ b/cpio/test/main.c @@ -44,7 +44,7 @@ #undef EXTRA_DUMP /* How to dump extra data */ /* How to generate extra version info. */ #define EXTRA_VERSION (systemf("%s --version", testprog) ? "" : "") -__FBSDID("$FreeBSD$"); +__FBSDID("$FreeBSD: src/usr.bin/cpio/test/main.c,v 1.2 2008/06/21 02:17:18 kientzle Exp $"); /* * "list.h" is simply created by "grep DEFINE_TEST"; it has diff --git a/cpio/test/test.h b/cpio/test/test.h index 39a98376f..431d5d7c4 100644 --- a/cpio/test/test.h +++ b/cpio/test/test.h @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: src/usr.bin/cpio/test/test.h,v 1.2 2008/06/21 02:17:18 kientzle Exp $ */ /* Every test program should #include "test.h" as the first thing. */ diff --git a/libarchive/archive_read_support_compression_program.c b/libarchive/archive_read_support_compression_program.c index 0404482e1..4f25d6ed5 100644 --- a/libarchive/archive_read_support_compression_program.c +++ b/libarchive/archive_read_support_compression_program.c @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_compression_program.c,v 1.3 2008/05/26 17:00:22 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_compression_program.c,v 1.4 2008/06/15 10:45:57 kientzle Exp $"); /* This capability is only available on POSIX systems. */ #if !defined(HAVE_PIPE) || !defined(HAVE_FCNTL) || \ diff --git a/libarchive/archive_read_support_format_mtree.c b/libarchive/archive_read_support_format_mtree.c index 81a14669a..6d5a84a50 100644 --- a/libarchive/archive_read_support_format_mtree.c +++ b/libarchive/archive_read_support_format_mtree.c @@ -25,7 +25,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_mtree.c,v 1.7 2008/06/09 14:44:56 cperciva Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_mtree.c,v 1.8 2008/06/15 10:43:59 kientzle Exp $"); #ifdef HAVE_SYS_STAT_H #include diff --git a/libarchive/archive_string.c b/libarchive/archive_string.c index 5fd5f835c..21fe57115 100644 --- a/libarchive/archive_string.c +++ b/libarchive/archive_string.c @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_string.c,v 1.13 2008/06/15 05:12:47 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_string.c,v 1.16 2008/06/15 11:28:56 kientzle Exp $"); /* * Basic resizable string support, to simplify manipulating arbitrary-sized @@ -206,7 +206,7 @@ static int my_wcstombs(struct archive_string *as, const wchar_t *w, int (*func)(char *, wchar_t)) { - size_t n; + int n; char *p; char buff[256]; @@ -227,7 +227,7 @@ my_wcstombs(struct archive_string *as, const wchar_t *w, p = buff; } n = (*func)(p, *w++); - if (n == (size_t)-1) + if (n == -1) return (-1); p += n; } @@ -275,7 +275,7 @@ __archive_strappend_w_mbs(struct archive_string *as, const wchar_t *w) * format. So please don't replace this with a call to the * standard mbtowc() function! */ -static size_t +static int my_mbtowc_utf8(wchar_t *pwc, const char *s, size_t n) { int ch; @@ -285,7 +285,7 @@ my_mbtowc_utf8(wchar_t *pwc, const char *s, size_t n) return (0); /* If length argument is zero, don't look at the first character. */ if (n <= 0) - return ((size_t)-2); + return (-1); /* * Decode 1-4 bytes depending on the value of the first byte. @@ -300,16 +300,16 @@ my_mbtowc_utf8(wchar_t *pwc, const char *s, size_t n) } if ((ch & 0xe0) == 0xc0) { if (n < 2) - return ((size_t)-2); - if ((s[1] & 0xc0) != 0x80) return (size_t)-1; + return (-1); + if ((s[1] & 0xc0) != 0x80) return (-1); *pwc = ((ch & 0x1f) << 6) | (s[1] & 0x3f); return (2); } if ((ch & 0xf0) == 0xe0) { if (n < 3) - return ((size_t)-2); - if ((s[1] & 0xc0) != 0x80) return (size_t)-1; - if ((s[2] & 0xc0) != 0x80) return (size_t)-1; + return (-1); + if ((s[1] & 0xc0) != 0x80) return (-1); + if ((s[2] & 0xc0) != 0x80) return (-1); *pwc = ((ch & 0x0f) << 12) | ((s[1] & 0x3f) << 6) | (s[2] & 0x3f); @@ -317,10 +317,10 @@ my_mbtowc_utf8(wchar_t *pwc, const char *s, size_t n) } if ((ch & 0xf8) == 0xf0) { if (n < 4) - return ((size_t)-2); - if ((s[1] & 0xc0) != 0x80) return (size_t)-1; - if ((s[2] & 0xc0) != 0x80) return (size_t)-1; - if ((s[3] & 0xc0) != 0x80) return (size_t)-1; + return (-1); + if ((s[1] & 0xc0) != 0x80) return (-1); + if ((s[2] & 0xc0) != 0x80) return (-1); + if ((s[3] & 0xc0) != 0x80) return (-1); *pwc = ((ch & 0x07) << 18) | ((s[1] & 0x3f) << 12) | ((s[2] & 0x3f) << 6) @@ -328,7 +328,7 @@ my_mbtowc_utf8(wchar_t *pwc, const char *s, size_t n) return (4); } /* Invalid first byte. */ - return ((size_t)-1); + return (-1); } /* @@ -340,7 +340,7 @@ __archive_string_utf8_w(struct archive_string *as) { wchar_t *ws, *dest; const char *src; - size_t n; + int n; int err; ws = (wchar_t *)malloc((as->length + 1) * sizeof(wchar_t)); @@ -353,7 +353,7 @@ __archive_string_utf8_w(struct archive_string *as) n = my_mbtowc_utf8(dest, src, 8); if (n == 0) break; - if (n == (size_t)-1 || n == (size_t)-2) { + if (n < 0) { free(ws); return (NULL); } diff --git a/libarchive/archive_write_set_compression_program.c b/libarchive/archive_write_set_compression_program.c index e7d894b71..69c5d4286 100644 --- a/libarchive/archive_write_set_compression_program.c +++ b/libarchive/archive_write_set_compression_program.c @@ -25,7 +25,7 @@ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_compression_program.c,v 1.2 2008/05/26 17:00:23 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_compression_program.c,v 1.3 2008/06/15 10:45:57 kientzle Exp $"); /* This capability is only available on POSIX systems. */ #if !defined(HAVE_PIPE) || !defined(HAVE_FCNTL) || \ diff --git a/libarchive/filter_fork.c b/libarchive/filter_fork.c index 721e4c2b7..c746a186f 100644 --- a/libarchive/filter_fork.c +++ b/libarchive/filter_fork.c @@ -29,7 +29,7 @@ #if defined(HAVE_PIPE) && defined(HAVE_FCNTL) && \ (defined(HAVE_FORK) || defined(HAVE_VFORK)) -__FBSDID("$FreeBSD: src/lib/libarchive/filter_fork.c,v 1.3 2008/05/26 17:00:23 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/filter_fork.c,v 1.4 2008/06/15 10:45:57 kientzle Exp $"); #if defined(HAVE_POLL) # if defined(HAVE_POLL_H) diff --git a/libarchive/test/main.c b/libarchive/test/main.c index 0b479e3ac..83d3147d9 100644 --- a/libarchive/test/main.c +++ b/libarchive/test/main.c @@ -43,7 +43,7 @@ #define ENVBASE "LIBARCHIVE" /* Prefix for environment variables. */ #define EXTRA_DUMP(x) archive_error_string((struct archive *)(x)) #define EXTRA_VERSION archive_version() -__FBSDID("$FreeBSD: src/lib/libarchive/test/main.c,v 1.12 2008/05/26 17:00:24 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/test/main.c,v 1.13 2008/06/15 10:35:22 kientzle Exp $"); /* * "list.h" is simply created by "grep DEFINE_TEST"; it has diff --git a/libarchive/test/test.h b/libarchive/test/test.h index 30efce80b..fbbf10a8c 100644 --- a/libarchive/test/test.h +++ b/libarchive/test/test.h @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libarchive/test/test.h,v 1.9 2008/03/12 05:12:23 kientzle Exp $ + * $FreeBSD: src/lib/libarchive/test/test.h,v 1.10 2008/06/15 10:35:22 kientzle Exp $ */ /* Every test program should #include "test.h" as the first thing. */ diff --git a/libarchive/test/test_read_extract.c b/libarchive/test/test_read_extract.c index 36976b0bc..ec8483077 100644 --- a/libarchive/test/test_read_extract.c +++ b/libarchive/test/test_read_extract.c @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "test.h" -__FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_extract.c,v 1.3 2007/05/29 01:00:20 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_extract.c,v 1.4 2008/06/15 10:35:22 kientzle Exp $"); #define BUFF_SIZE 1000000 #define FILE_BUFF_SIZE 100000 diff --git a/libarchive/test/test_write_disk.c b/libarchive/test/test_write_disk.c index 0576c8ca5..fe44a4538 100644 --- a/libarchive/test/test_write_disk.c +++ b/libarchive/test/test_write_disk.c @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "test.h" -__FBSDID("$FreeBSD: src/lib/libarchive/test/test_write_disk.c,v 1.8 2008/01/23 05:47:08 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/test/test_write_disk.c,v 1.9 2008/06/15 10:35:22 kientzle Exp $"); #if ARCHIVE_VERSION_STAMP >= 1009000 diff --git a/libarchive/test/test_write_disk_perms.c b/libarchive/test/test_write_disk_perms.c index e0ca9f4ba..2e872a1e3 100644 --- a/libarchive/test/test_write_disk_perms.c +++ b/libarchive/test/test_write_disk_perms.c @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "test.h" -__FBSDID("$FreeBSD: src/lib/libarchive/test/test_write_disk_perms.c,v 1.8 2008/01/01 22:28:04 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/test/test_write_disk_perms.c,v 1.9 2008/06/15 10:35:22 kientzle Exp $"); #if ARCHIVE_VERSION_STAMP >= 1009000 diff --git a/libarchive/test/test_write_disk_secure.c b/libarchive/test/test_write_disk_secure.c index 2de3efbfa..2bcc95762 100644 --- a/libarchive/test/test_write_disk_secure.c +++ b/libarchive/test/test_write_disk_secure.c @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "test.h" -__FBSDID("$FreeBSD: src/lib/libarchive/test/test_write_disk_secure.c,v 1.3 2007/07/06 15:43:11 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/test/test_write_disk_secure.c,v 1.4 2008/06/15 10:35:22 kientzle Exp $"); #define UMASK 022 diff --git a/tar/subst.c b/tar/subst.c index 6757533dc..1c32fb075 100644 --- a/tar/subst.c +++ b/tar/subst.c @@ -24,7 +24,7 @@ */ #include "bsdtar_platform.h" -__FBSDID("$FreeBSD: src/usr.bin/tar/subst.c,v 1.3 2008/06/09 14:41:28 cperciva Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/tar/subst.c,v 1.4 2008/06/15 10:08:16 kientzle Exp $"); #if HAVE_REGEX_H #include "bsdtar.h" diff --git a/tar/test/main.c b/tar/test/main.c index 23b0e1eff..27bb48d40 100644 --- a/tar/test/main.c +++ b/tar/test/main.c @@ -44,7 +44,7 @@ #undef EXTRA_DUMP /* How to dump extra data */ /* How to generate extra version info. */ #define EXTRA_VERSION (systemf("%s --version", testprog) ? "" : "") -__FBSDID("$FreeBSD: src/usr.bin/tar/test/main.c,v 1.2 2008/05/26 17:10:10 kientzle Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/tar/test/main.c,v 1.3 2008/06/15 10:07:54 kientzle Exp $"); /* * "list.h" is simply created by "grep DEFINE_TEST"; it has diff --git a/tar/test/test.h b/tar/test/test.h index 6feac22b6..30321e845 100644 --- a/tar/test/test.h +++ b/tar/test/test.h @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/usr.bin/tar/test/test.h,v 1.2 2008/05/26 17:10:10 kientzle Exp $ + * $FreeBSD: src/usr.bin/tar/test/test.h,v 1.3 2008/06/15 10:07:54 kientzle Exp $ */ /* Every test program should #include "test.h" as the first thing. */ -- 2.47.3