-# $FreeBSD$
+# $FreeBSD: src/usr.bin/cpio/Makefile,v 1.4 2008/06/16 07:24:05 dougb Exp $
+
+.include <bsd.own.mk>
PROG= bsdcpio
BSDCPIO_VERSION_STRING=1.0.0
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
#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 <errno.h>
* (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
*/
#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 <errno.h>
#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
* (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. */
*/
#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) || \
*/
#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 <sys/stat.h>
*/
#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
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];
p = buff;
}
n = (*func)(p, *w++);
- if (n == (size_t)-1)
+ if (n == -1)
return (-1);
p += n;
}
* 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;
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.
}
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);
}
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)
return (4);
}
/* Invalid first byte. */
- return ((size_t)-1);
+ return (-1);
}
/*
{
wchar_t *ws, *dest;
const char *src;
- size_t n;
+ int n;
int err;
ws = (wchar_t *)malloc((as->length + 1) * sizeof(wchar_t));
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);
}
#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) || \
#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)
#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
* (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. */
* 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
* 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
* 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
* 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
*/
#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"
#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
* (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. */