From owner-svn-src-vendor@freebsd.org Sun Sep 11 15:55:14 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A08AEBD661F; Sun, 11 Sep 2016 15:55:14 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EE5DF1; Sun, 11 Sep 2016 15:55:14 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8BFtDEM051711; Sun, 11 Sep 2016 15:55:13 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8BFtCRY051694; Sun, 11 Sep 2016 15:55:12 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201609111555.u8BFtCRY051694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 11 Sep 2016 15:55:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305694 - vendor/OpenBSD/dist/usr.bin/rcs X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2016 15:55:14 -0000 Author: pfg Date: Sun Sep 11 15:55:11 2016 New Revision: 305694 URL: https://svnweb.freebsd.org/changeset/base/305694 Log: Update OpenRCS to version 20160831 Obtained from: OpenBSD Modified: vendor/OpenBSD/dist/usr.bin/rcs/buf.c vendor/OpenBSD/dist/usr.bin/rcs/ci.c vendor/OpenBSD/dist/usr.bin/rcs/co.c vendor/OpenBSD/dist/usr.bin/rcs/date.y vendor/OpenBSD/dist/usr.bin/rcs/diff.c vendor/OpenBSD/dist/usr.bin/rcs/diff3.c vendor/OpenBSD/dist/usr.bin/rcs/ident.c vendor/OpenBSD/dist/usr.bin/rcs/merge.c vendor/OpenBSD/dist/usr.bin/rcs/rcs.1 vendor/OpenBSD/dist/usr.bin/rcs/rcs.c vendor/OpenBSD/dist/usr.bin/rcs/rcs.h vendor/OpenBSD/dist/usr.bin/rcs/rcsclean.c vendor/OpenBSD/dist/usr.bin/rcs/rcsdiff.c vendor/OpenBSD/dist/usr.bin/rcs/rcsmerge.c vendor/OpenBSD/dist/usr.bin/rcs/rcsnum.c vendor/OpenBSD/dist/usr.bin/rcs/rcsparse.c vendor/OpenBSD/dist/usr.bin/rcs/rcsprog.c vendor/OpenBSD/dist/usr.bin/rcs/rcstime.c vendor/OpenBSD/dist/usr.bin/rcs/rcsutil.c vendor/OpenBSD/dist/usr.bin/rcs/rcsutil.h vendor/OpenBSD/dist/usr.bin/rcs/rlog.1 vendor/OpenBSD/dist/usr.bin/rcs/rlog.c vendor/OpenBSD/dist/usr.bin/rcs/worklist.c vendor/OpenBSD/dist/usr.bin/rcs/xmalloc.c vendor/OpenBSD/dist/usr.bin/rcs/xmalloc.h Modified: vendor/OpenBSD/dist/usr.bin/rcs/buf.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/buf.c Sun Sep 11 14:19:06 2016 (r305693) +++ vendor/OpenBSD/dist/usr.bin/rcs/buf.c Sun Sep 11 15:55:11 2016 (r305694) @@ -1,4 +1,4 @@ -/* $OpenBSD: buf.c,v 1.24 2015/02/05 12:59:58 millert Exp $ */ +/* $OpenBSD: buf.c,v 1.26 2015/11/02 16:45:21 nicm Exp $ */ /* * Copyright (c) 2003 Jean-Francois Brousseau * All rights reserved. @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -137,15 +138,16 @@ out: void buf_free(BUF *b) { - if (b->cb_buf != NULL) - xfree(b->cb_buf); - xfree(b); + if (b == NULL) + return; + free(b->cb_buf); + free(b); } /* * Free the buffer 's structural information but do not free the contents * of the buffer. Instead, they are returned and should be freed later using - * xfree(). + * free(). */ void * buf_release(BUF *b) @@ -153,7 +155,7 @@ buf_release(BUF *b) void *tmp; tmp = b->cb_buf; - xfree(b); + free(b); return (tmp); } Modified: vendor/OpenBSD/dist/usr.bin/rcs/ci.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/ci.c Sun Sep 11 14:19:06 2016 (r305693) +++ vendor/OpenBSD/dist/usr.bin/rcs/ci.c Sun Sep 11 15:55:11 2016 (r305694) @@ -1,4 +1,4 @@ -/* $OpenBSD: ci.c,v 1.219 2015/01/16 06:40:11 deraadt Exp $ */ +/* $OpenBSD: ci.c,v 1.224 2016/07/04 01:39:12 millert Exp $ */ /* * Copyright (c) 2005, 2006 Niall O'Higgins * All rights reserved. @@ -210,8 +210,7 @@ checkin_main(int argc, char **argv) printf("%s\n", rcs_version); exit(0); case 'w': - if (pb.author != NULL) - xfree(pb.author); + free(pb.author); pb.author = xstrdup(rcs_optarg); break; case 'x': @@ -280,7 +279,7 @@ checkin_main(int argc, char **argv) errx(1, "failed to open rcsfile `%s'", pb.fpath); if ((pb.flags & DESCRIPTION) && - rcs_set_description(pb.file, pb.description) == -1) + rcs_set_description(pb.file, pb.description, pb.flags) == -1) err(1, "%s", pb.filename); if (!(pb.flags & QUIET)) @@ -370,16 +369,11 @@ checkin_diff_file(struct checkin_params return (b3); out: - if (b1 != NULL) - buf_free(b1); - if (b2 != NULL) - buf_free(b2); - if (b3 != NULL) - buf_free(b3); - if (path1 != NULL) - xfree(path1); - if (path2 != NULL) - xfree(path2); + buf_free(b1); + buf_free(b2); + buf_free(b3); + free(path1); + free(path2); return (NULL); } @@ -412,7 +406,7 @@ checkin_getlogmsg(RCSNUM *rev, RCSNUM *r (void)fprintf(stderr, "new revision: %s; " "previous revision: %s\n", nrev, prev); - rcs_msg = rcs_prompt(prompt); + rcs_msg = rcs_prompt(prompt, flags); return (rcs_msg); } @@ -511,7 +505,7 @@ checkin_update(struct checkin_params *pb fprintf(stderr, "reuse log message of previous file? [yn](y): "); if (rcs_yesno('y') != 'y') { - xfree(pb->rcs_msg); + free(pb->rcs_msg); pb->rcs_msg = NULL; } } @@ -584,7 +578,7 @@ checkin_update(struct checkin_params *pb pb->username, pb->author, NULL, NULL); if ((pb->flags & INTERACTIVE) && (pb->rcs_msg[0] == '\0')) { - xfree(pb->rcs_msg); /* free empty log message */ + free(pb->rcs_msg); /* free empty log message */ pb->rcs_msg = NULL; } @@ -627,7 +621,7 @@ checkin_init(struct checkin_params *pb) /* Get description from user */ if (pb->description == NULL && - rcs_set_description(pb->file, NULL) == -1) { + rcs_set_description(pb->file, NULL, pb->flags) == -1) { warn("%s", pb->filename); return (-1); } @@ -734,7 +728,7 @@ checkin_attach_symbol(struct checkin_par } } } - if ((ret = rcs_sym_add(pb->file, pb->symbol, pb->newrev) == -1) && + if ((ret = rcs_sym_add(pb->file, pb->symbol, pb->newrev)) == -1 && (rcs_errno == RCS_ERR_DUPENT)) { rcsnum_tostr(rcs_sym_getrev(pb->file, pb->symbol), rbuf, sizeof(rbuf)); @@ -988,25 +982,22 @@ checkin_parsekeyword(char *keystring, RC (void)xasprintf(&datestring, "%s %s", tokens[3], tokens[4]); if ((*date = date_parse(datestring)) == -1) errx(1, "could not parse date"); - xfree(datestring); + free(datestring); if (i < 6) break; - if (*author != NULL) - xfree(*author); + free(*author); *author = xstrdup(tokens[5]); if (i < 7) break; - if (*state != NULL) - xfree(*state); + free(*state); *state = xstrdup(tokens[6]); break; case KW_TYPE_AUTHOR: if (i < 2) break; - if (*author != NULL) - xfree(*author); + free(*author); *author = xstrdup(tokens[1]); break; case KW_TYPE_DATE: @@ -1015,13 +1006,12 @@ checkin_parsekeyword(char *keystring, RC (void)xasprintf(&datestring, "%s %s", tokens[1], tokens[2]); if ((*date = date_parse(datestring)) == -1) errx(1, "could not parse date"); - xfree(datestring); + free(datestring); break; case KW_TYPE_STATE: if (i < 2) break; - if (*state != NULL) - xfree(*state); + free(*state); *state = xstrdup(tokens[1]); break; case KW_TYPE_REVISION: Modified: vendor/OpenBSD/dist/usr.bin/rcs/co.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/co.c Sun Sep 11 14:19:06 2016 (r305693) +++ vendor/OpenBSD/dist/usr.bin/rcs/co.c Sun Sep 11 15:55:11 2016 (r305694) @@ -1,4 +1,4 @@ -/* $OpenBSD: co.c,v 1.120 2015/01/16 06:40:11 deraadt Exp $ */ +/* $OpenBSD: co.c,v 1.122 2015/10/21 16:06:57 millert Exp $ */ /* * Copyright (c) 2005 Joris Vink * All rights reserved. @@ -515,7 +515,7 @@ checkout_err_nobranch(RCSFILE *file, con file->rf_path, date ? " a date before " : "", date ? date : "", - author ? " and author " + (date ? 0:4 ) : "", + author ? " and author " + (date ? 0:4) : "", author ? author : "", state ? " and state " + (date || author ? 0:4) : "", state ? state : ""); @@ -554,7 +554,7 @@ checkout_file_has_diffs(RCSFILE *rfp, RC buf_free(bp); unlink(tempfile); - xfree(tempfile); + free(tempfile); return (ret); } Modified: vendor/OpenBSD/dist/usr.bin/rcs/date.y ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/date.y Sun Sep 11 14:19:06 2016 (r305693) +++ vendor/OpenBSD/dist/usr.bin/rcs/date.y Sun Sep 11 15:55:11 2016 (r305694) @@ -1,5 +1,5 @@ %{ -/* $OpenBSD: date.y,v 1.12 2013/12/03 00:21:49 deraadt Exp $ */ +/* $OpenBSD: date.y,v 1.14 2016/08/26 09:02:54 guenther Exp $ */ /* ** Originally written by Steven M. Bellovin while @@ -17,6 +17,7 @@ #include #include #include +#include #include "rcsprog.h" @@ -494,7 +495,7 @@ yyerror(const char *s) s, yyInput); warnx("%s", str); - xfree(str); + free(str); return (0); } Modified: vendor/OpenBSD/dist/usr.bin/rcs/diff.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/diff.c Sun Sep 11 14:19:06 2016 (r305693) +++ vendor/OpenBSD/dist/usr.bin/rcs/diff.c Sun Sep 11 15:55:11 2016 (r305694) @@ -1,4 +1,4 @@ -/* $OpenBSD: diff.c,v 1.37 2015/01/16 06:40:11 deraadt Exp $ */ +/* $OpenBSD: diff.c,v 1.38 2015/06/13 20:15:21 nicm Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. * All rights reserved. @@ -72,6 +72,7 @@ #include #include #include +#include #include #include #include @@ -374,13 +375,13 @@ diffreg(const char *file1, const char *f clistlen = 100; clist = xcalloc(clistlen, sizeof(*clist)); i = stone(class, slen[0], member, klist, flags); - xfree(member); - xfree(class); + free(member); + free(class); J = xreallocarray(J, len[0] + 2, sizeof(*J)); unravel(klist[i]); - xfree(clist); - xfree(klist); + free(clist); + free(klist); ixold = xreallocarray(ixold, len[0] + 2, sizeof(*ixold)); ixnew = xreallocarray(ixnew, len[1] + 2, sizeof(*ixnew)); @@ -769,7 +770,7 @@ unsort(struct line *f, int l, int *b) a[f[i].serial] = f[i].value; for (i = 1; i <= l; i++) b[i] = a[i]; - xfree(a); + free(a); } static int @@ -860,7 +861,7 @@ ignoreline(char *line) int ret; ret = regexec(diff_ignore_re, line, 0, NULL, 0); - xfree(line); + free(line); return (ret == 0); /* if it matched, it should be ignored. */ } @@ -1383,5 +1384,5 @@ diff_output(const char *fmt, ...) buf_append(diffbuf, str, strlen(str)); else printf("%s", str); - xfree(str); + free(str); } Modified: vendor/OpenBSD/dist/usr.bin/rcs/diff3.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/diff3.c Sun Sep 11 14:19:06 2016 (r305693) +++ vendor/OpenBSD/dist/usr.bin/rcs/diff3.c Sun Sep 11 15:55:11 2016 (r305694) @@ -1,4 +1,4 @@ -/* $OpenBSD: diff3.c,v 1.35 2015/01/16 06:40:11 deraadt Exp $ */ +/* $OpenBSD: diff3.c,v 1.39 2016/08/26 09:02:54 guenther Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -69,6 +69,7 @@ #include #include #include +#include #include #include "diff.h" @@ -234,14 +235,10 @@ merge_diff3(char **av, int flags) warnx("warning: overlaps or other problems during merge"); out: - if (b2 != NULL) - buf_free(b2); - if (b3 != NULL) - buf_free(b3); - if (d1 != NULL) - buf_free(d1); - if (d2 != NULL) - buf_free(d2); + buf_free(b2); + buf_free(b3); + buf_free(d1); + buf_free(d2); (void)unlink(path1); (void)unlink(path2); @@ -249,20 +246,13 @@ out: (void)unlink(dp13); (void)unlink(dp23); - if (path1 != NULL) - xfree(path1); - if (path2 != NULL) - xfree(path2); - if (path3 != NULL) - xfree(path3); - if (dp13 != NULL) - xfree(dp13); - if (dp23 != NULL) - xfree(dp23); - if (data != NULL) - xfree(data); - if (patch != NULL) - xfree(patch); + free(path1); + free(path2); + free(path3); + free(dp13); + free(dp23); + free(data); + free(patch); return (diffb); } @@ -361,14 +351,10 @@ rcs_diff3(RCSFILE *rf, char *workfile, R warnx("warning: overlaps or other problems during merge"); out: - if (b2 != NULL) - buf_free(b2); - if (b3 != NULL) - buf_free(b3); - if (d1 != NULL) - buf_free(d1); - if (d2 != NULL) - buf_free(d2); + buf_free(b2); + buf_free(b3); + buf_free(d1); + buf_free(d2); (void)unlink(path1); (void)unlink(path2); @@ -376,20 +362,13 @@ out: (void)unlink(dp13); (void)unlink(dp23); - if (path1 != NULL) - xfree(path1); - if (path2 != NULL) - xfree(path2); - if (path3 != NULL) - xfree(path3); - if (dp13 != NULL) - xfree(dp13); - if (dp23 != NULL) - xfree(dp23); - if (data != NULL) - xfree(data); - if (patch != NULL) - xfree(patch); + free(path1); + free(path2); + free(path3); + free(dp13); + free(dp23); + free(data); + free(patch); return (diffb); } @@ -657,7 +636,7 @@ merge(size_t m1, size_t m2) d1 = d13; d2 = d23; j = 0; - while ((t1 = d1 < d13 + m1) | (t2 = d2 < d23 + m2)) { + while ((t1 = (d1 < d13 + m1)) | (t2 = (d2 < d23 + m2))) { if (debug) { printf("%d,%d=%d,%d %d,%d=%d,%d\n", d1->old.from, d1->old.to, Modified: vendor/OpenBSD/dist/usr.bin/rcs/ident.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/ident.c Sun Sep 11 14:19:06 2016 (r305693) +++ vendor/OpenBSD/dist/usr.bin/rcs/ident.c Sun Sep 11 15:55:11 2016 (r305694) @@ -1,4 +1,4 @@ -/* $OpenBSD: ident.c,v 1.30 2014/10/02 06:23:15 otto Exp $ */ +/* $OpenBSD: ident.c,v 1.32 2016/08/26 09:02:54 guenther Exp $ */ /* * Copyright (c) 2005 Xavier Santolaria * All rights reserved. @@ -28,6 +28,7 @@ #include #include #include +#include #include #include "rcsprog.h" @@ -156,8 +157,7 @@ ident_line(FILE *fp) found++; out: - if (bp != NULL) - buf_free(bp); + buf_free(bp); } __dead void Modified: vendor/OpenBSD/dist/usr.bin/rcs/merge.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/merge.c Sun Sep 11 14:19:06 2016 (r305693) +++ vendor/OpenBSD/dist/usr.bin/rcs/merge.c Sun Sep 11 15:55:11 2016 (r305694) @@ -1,4 +1,4 @@ -/* $OpenBSD: merge.c,v 1.9 2014/10/10 08:15:25 otto Exp $ */ +/* $OpenBSD: merge.c,v 1.10 2016/08/26 09:02:54 guenther Exp $ */ /* * Copyright (c) 2006 Xavier Santolaria * All rights reserved. @@ -27,6 +27,7 @@ #include #include #include +#include #include #include "rcsprog.h" Modified: vendor/OpenBSD/dist/usr.bin/rcs/rcs.1 ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/rcs.1 Sun Sep 11 14:19:06 2016 (r305693) +++ vendor/OpenBSD/dist/usr.bin/rcs/rcs.1 Sun Sep 11 15:55:11 2016 (r305694) @@ -1,4 +1,4 @@ -.\" $OpenBSD: rcs.1,v 1.58 2013/01/18 11:21:09 guenther Exp $ +.\" $OpenBSD: rcs.1,v 1.59 2015/09/25 15:31:24 schwarze Exp $ .\" .\" Copyright (c) 2005 Jean-Francois Brousseau .\" Copyright (c) 2005 Xavier Santolaria @@ -24,7 +24,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: January 18 2013 $ +.Dd $Mdocdate: September 25 2015 $ .Dt RCS 1 .Os .Sh NAME @@ -40,8 +40,7 @@ .Op Fl e Ns Op Ar users .Op Fl k Ns Ar mode .Op Fl l Ns Op Ar rev -.Oo Fl m Ns Ar rev : -.Ar msg Oc +.Op Fl m Ns Ar rev : Ns Ar msg .Op Fl o Ns Ar rev .Op Fl t Ns Op Ar str .Op Fl u Ns Op Ar rev Modified: vendor/OpenBSD/dist/usr.bin/rcs/rcs.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/rcs.c Sun Sep 11 14:19:06 2016 (r305693) +++ vendor/OpenBSD/dist/usr.bin/rcs/rcs.c Sun Sep 11 15:55:11 2016 (r305694) @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.82 2015/01/16 06:40:11 deraadt Exp $ */ +/* $OpenBSD: rcs.c,v 1.85 2016/05/09 13:03:55 schwarze Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -66,6 +66,7 @@ struct rcs_kw rcs_expkw[] = { { "Revision", RCS_KW_REVISION }, { "Source", RCS_KW_SOURCE }, { "State", RCS_KW_STATE }, + { "Mdocdate", RCS_KW_MDOCDATE }, }; int rcs_errno = RCS_ERR_NOERR; @@ -157,44 +158,40 @@ rcs_close(RCSFILE *rfp) while (!TAILQ_EMPTY(&(rfp->rf_access))) { rap = TAILQ_FIRST(&(rfp->rf_access)); TAILQ_REMOVE(&(rfp->rf_access), rap, ra_list); - xfree(rap->ra_name); - xfree(rap); + free(rap->ra_name); + free(rap); } while (!TAILQ_EMPTY(&(rfp->rf_symbols))) { rsp = TAILQ_FIRST(&(rfp->rf_symbols)); TAILQ_REMOVE(&(rfp->rf_symbols), rsp, rs_list); rcsnum_free(rsp->rs_num); - xfree(rsp->rs_name); - xfree(rsp); + free(rsp->rs_name); + free(rsp); } while (!TAILQ_EMPTY(&(rfp->rf_locks))) { rlp = TAILQ_FIRST(&(rfp->rf_locks)); TAILQ_REMOVE(&(rfp->rf_locks), rlp, rl_list); rcsnum_free(rlp->rl_num); - xfree(rlp->rl_name); - xfree(rlp); + free(rlp->rl_name); + free(rlp); } - if (rfp->rf_head != NULL) - rcsnum_free(rfp->rf_head); - if (rfp->rf_branch != NULL) - rcsnum_free(rfp->rf_branch); + rcsnum_free(rfp->rf_head); + rcsnum_free(rfp->rf_branch); if (rfp->rf_file != NULL) fclose(rfp->rf_file); - if (rfp->rf_path != NULL) - xfree(rfp->rf_path); - if (rfp->rf_comment != NULL) - xfree(rfp->rf_comment); - if (rfp->rf_expand != NULL) - xfree(rfp->rf_expand); - if (rfp->rf_desc != NULL) - xfree(rfp->rf_desc); + + free(rfp->rf_path); + free(rfp->rf_comment); + free(rfp->rf_expand); + free(rfp->rf_desc); if (rfp->rf_pdata != NULL) rcsparse_free(rfp); - xfree(rfp); + + free(rfp); } /* @@ -349,8 +346,7 @@ rcs_write(RCSFILE *rfp) rfp->rf_flags |= RCS_SYNCED; - if (fn != NULL) - xfree(fn); + free(fn); } /* @@ -420,7 +416,7 @@ rcs_movefile(char *from, char *to, mode_ out: (void)fclose(src); (void)fclose(dst); - xfree(buf); + free(buf); return (0); } @@ -509,8 +505,8 @@ rcs_access_remove(RCSFILE *file, const c } TAILQ_REMOVE(&(file->rf_access), ap, ra_list); - xfree(ap->ra_name); - xfree(ap); + free(ap->ra_name); + free(ap); /* not synced anymore */ file->rf_flags &= ~RCS_SYNCED; @@ -582,9 +578,9 @@ rcs_sym_remove(RCSFILE *file, const char } TAILQ_REMOVE(&(file->rf_symbols), symp, rs_list); - xfree(symp->rs_name); + free(symp->rs_name); rcsnum_free(symp->rs_num); - xfree(symp); + free(symp); /* not synced anymore */ file->rf_flags &= ~RCS_SYNCED; @@ -743,8 +739,8 @@ rcs_lock_remove(RCSFILE *file, const cha TAILQ_REMOVE(&(file->rf_locks), lkp, rl_list); rcsnum_free(lkp->rl_num); - xfree(lkp->rl_name); - xfree(lkp); + free(lkp->rl_name); + free(lkp); /* not synced anymore */ file->rf_flags &= ~RCS_SYNCED; @@ -762,8 +758,7 @@ rcs_desc_set(RCSFILE *file, const char * char *tmp; tmp = xstrdup(desc); - if (file->rf_desc != NULL) - xfree(file->rf_desc); + free(file->rf_desc); file->rf_desc = tmp; file->rf_flags &= ~RCS_SYNCED; } @@ -779,8 +774,7 @@ rcs_comment_set(RCSFILE *file, const cha char *tmp; tmp = xstrdup(comment); - if (file->rf_comment != NULL) - xfree(file->rf_comment); + free(file->rf_comment); file->rf_comment = tmp; file->rf_flags &= ~RCS_SYNCED; } @@ -839,7 +833,7 @@ rcs_patch_lines(struct rcs_lines *dlines for (i = 0; (i < nbln) && (dlp != NULL); i++) { ndlp = TAILQ_NEXT(dlp, l_list); TAILQ_REMOVE(&(dlines->l_lines), dlp, l_list); - xfree(dlp); + free(dlp); dlp = ndlp; /* last line is gone - reset dlp */ if (dlp == NULL) { @@ -1020,7 +1014,7 @@ rcs_getrev(RCSFILE *rfp, RCSNUM *frev) return (NULL); rbuf = rcs_patchfile(data, dlen, patch, plen, rcs_patch_lines); - xfree(data); + free(data); if (rbuf == NULL) break; @@ -1246,10 +1240,8 @@ rcs_rev_remove(RCSFILE *rf, RCSNUM *rev) rcs_freedelta(rdp); - if (path_tmp1 != NULL) - xfree(path_tmp1); - if (path_tmp2 != NULL) - xfree(path_tmp2); + free(path_tmp1); + free(path_tmp2); return (0); } @@ -1343,8 +1335,7 @@ rcs_kwexp_set(RCSFILE *file, int mode) } tmp = xstrdup(buf); - if (file->rf_expand != NULL) - xfree(file->rf_expand); + free(file->rf_expand); file->rf_expand = tmp; /* not synced anymore */ file->rf_flags &= ~RCS_SYNCED; @@ -1414,29 +1405,22 @@ rcs_freedelta(struct rcs_delta *rdp) { struct rcs_branch *rb; - if (rdp->rd_num != NULL) - rcsnum_free(rdp->rd_num); - if (rdp->rd_next != NULL) - rcsnum_free(rdp->rd_next); - - if (rdp->rd_author != NULL) - xfree(rdp->rd_author); - if (rdp->rd_locker != NULL) - xfree(rdp->rd_locker); - if (rdp->rd_state != NULL) - xfree(rdp->rd_state); - if (rdp->rd_log != NULL) - xfree(rdp->rd_log); - if (rdp->rd_text != NULL) - xfree(rdp->rd_text); + rcsnum_free(rdp->rd_num); + rcsnum_free(rdp->rd_next); + + free(rdp->rd_author); + free(rdp->rd_locker); + free(rdp->rd_state); + free(rdp->rd_log); + free(rdp->rd_text); while ((rb = TAILQ_FIRST(&(rdp->rd_branches))) != NULL) { TAILQ_REMOVE(&(rdp->rd_branches), rb, rb_list); rcsnum_free(rb->rb_num); - xfree(rb); + free(rb); } - xfree(rdp); + free(rdp); } /* @@ -1613,6 +1597,16 @@ rcs_expand_keywords(char *rcsfile_in, st buf_putc(newbuf, ' '); } + if (kwtype & RCS_KW_MDOCDATE) { + strftime(buf, sizeof(buf), "%B", &tb); + buf_puts(newbuf, buf); + /* Only one blank before single-digit day. */ + snprintf(buf, sizeof(buf), " %d", tb.tm_mday); + buf_puts(newbuf, buf); + strftime(buf, sizeof(buf), " %Y ", &tb); + buf_puts(newbuf, buf); + } + if (kwtype & RCS_KW_NAME) buf_putc(newbuf, ' '); @@ -1701,8 +1695,7 @@ rcs_deltatext_set(RCSFILE *rfp, RCSNUM * if ((rdp = rcs_findrev(rfp, rev)) == NULL) return (-1); - if (rdp->rd_text != NULL) - xfree(rdp->rd_text); + free(rdp->rd_text); len = buf_len(bp); dtext = buf_release(bp); @@ -1717,8 +1710,7 @@ rcs_deltatext_set(RCSFILE *rfp, RCSNUM * rdp->rd_tlen = 0; } - if (dtext != NULL) - xfree(dtext); + free(dtext); return (0); } @@ -1736,8 +1728,7 @@ rcs_rev_setlog(RCSFILE *rfp, RCSNUM *rev if ((rdp = rcs_findrev(rfp, rev)) == NULL) return (-1); - if (rdp->rd_log != NULL) - xfree(rdp->rd_log); + free(rdp->rd_log); rdp->rd_log = xstrdup(logtext); rfp->rf_flags &= ~RCS_SYNCED; @@ -1776,8 +1767,7 @@ rcs_state_set(RCSFILE *rfp, RCSNUM *rev, if ((rdp = rcs_findrev(rfp, rev)) == NULL) return (-1); - if (rdp->rd_state != NULL) - xfree(rdp->rd_state); + free(rdp->rd_state); rdp->rd_state = xstrdup(state); Modified: vendor/OpenBSD/dist/usr.bin/rcs/rcs.h ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/rcs.h Sun Sep 11 14:19:06 2016 (r305693) +++ vendor/OpenBSD/dist/usr.bin/rcs/rcs.h Sun Sep 11 15:55:11 2016 (r305694) @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.h,v 1.16 2013/06/03 17:04:35 jcs Exp $ */ +/* $OpenBSD: rcs.h,v 1.17 2016/05/09 13:03:55 schwarze Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -69,6 +69,7 @@ #define RCS_KW_SOURCE 0x0400 #define RCS_KW_STATE 0x0800 #define RCS_KW_FULLPATH 0x0010 +#define RCS_KW_MDOCDATE 0x0020 #define RCS_KW_LOCKER 0x10000 #define RCS_KW_ID \ Modified: vendor/OpenBSD/dist/usr.bin/rcs/rcsclean.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/rcsclean.c Sun Sep 11 14:19:06 2016 (r305693) +++ vendor/OpenBSD/dist/usr.bin/rcs/rcsclean.c Sun Sep 11 15:55:11 2016 (r305694) @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsclean.c,v 1.54 2015/01/16 06:40:11 deraadt Exp $ */ +/* $OpenBSD: rcsclean.c,v 1.56 2016/08/26 09:02:54 guenther Exp $ */ /* * Copyright (c) 2005 Joris Vink * All rights reserved. @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "rcsprog.h" @@ -209,10 +210,8 @@ rcsclean_file(char *fname, const char *r rcs_set_mtime(file, rcs_mtime); out: - if (b1 != NULL) - buf_free(b1); - if (b2 != NULL) - buf_free(b2); + buf_free(b1); + buf_free(b2); if (file != NULL) rcs_close(file); } Modified: vendor/OpenBSD/dist/usr.bin/rcs/rcsdiff.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/rcsdiff.c Sun Sep 11 14:19:06 2016 (r305693) +++ vendor/OpenBSD/dist/usr.bin/rcs/rcsdiff.c Sun Sep 11 15:55:11 2016 (r305694) @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsdiff.c,v 1.82 2015/01/16 06:40:11 deraadt Exp $ */ +/* $OpenBSD: rcsdiff.c,v 1.84 2015/11/02 16:45:21 nicm Exp $ */ /* * Copyright (c) 2005 Joris Vink * All rights reserved. @@ -250,15 +250,9 @@ rcsdiff_main(int argc, char **argv) status = rcsdiff_rev(file, rev1, rev2, dflags); rcs_close(file); - - if (rev1 != NULL) { - rcsnum_free(rev1); - rev1 = NULL; - } - if (rev2 != NULL) { - rcsnum_free(rev2); - rev2 = NULL; - } + rcsnum_free(rev1); + rcsnum_free(rev2); + rev1 = rev2 = NULL; } return (status); @@ -354,14 +348,10 @@ rcsdiff_file(RCSFILE *file, RCSNUM *rev, out: if (fd != -1) (void)close(fd); - if (b1 != NULL) - buf_free(b1); - if (b2 != NULL) - buf_free(b2); - if (path1 != NULL) - xfree(path1); - if (path2 != NULL) - xfree(path2); + buf_free(b1); + buf_free(b2); + free(path1); + free(path2); return (ret); } @@ -433,14 +423,10 @@ rcsdiff_rev(RCSFILE *file, RCSNUM *rev1, ret = diffreg(path1, path2, NULL, dflags); out: - if (b1 != NULL) - buf_free(b1); - if (b2 != NULL) - buf_free(b2); - if (path1 != NULL) - xfree(path1); - if (path2 != NULL) - xfree(path2); + buf_free(b1); + buf_free(b2); + free(path1); + free(path2); return (ret); } Modified: vendor/OpenBSD/dist/usr.bin/rcs/rcsmerge.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/rcsmerge.c Sun Sep 11 14:19:06 2016 (r305693) +++ vendor/OpenBSD/dist/usr.bin/rcs/rcsmerge.c Sun Sep 11 15:55:11 2016 (r305694) @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsmerge.c,v 1.55 2015/01/16 06:40:11 deraadt Exp $ */ +/* $OpenBSD: rcsmerge.c,v 1.57 2016/08/26 09:02:54 guenther Exp $ */ /* * Copyright (c) 2005, 2006 Xavier Santolaria * All rights reserved. @@ -28,6 +28,7 @@ #include #include #include +#include #include #include "rcsprog.h" @@ -173,12 +174,8 @@ rcsmerge_main(int argc, char **argv) out: rcs_close(file); - - if (rev1 != NULL) - rcsnum_free(rev1); - if (rev2 != NULL) - rcsnum_free(rev2); - + rcsnum_free(rev1); + rcsnum_free(rev2); return (status); } Modified: vendor/OpenBSD/dist/usr.bin/rcs/rcsnum.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/rcsnum.c Sun Sep 11 14:19:06 2016 (r305693) +++ vendor/OpenBSD/dist/usr.bin/rcs/rcsnum.c Sun Sep 11 15:55:11 2016 (r305694) @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsnum.c,v 1.16 2015/01/16 06:40:11 deraadt Exp $ */ +/* $OpenBSD: rcsnum.c,v 1.19 2016/08/26 09:02:54 guenther Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -26,8 +26,10 @@ #include #include -#include #include +#include +#include +#include #include "rcs.h" #include "xmalloc.h" @@ -104,9 +106,10 @@ rcsnum_parse(const char *str) void rcsnum_free(RCSNUM *rn) { - if (rn->rn_id != NULL) - xfree(rn->rn_id); - xfree(rn); + if (rn == NULL) + return; + free(rn->rn_id); + free(rn); } /* @@ -331,7 +334,7 @@ rcsnum_aton(const char *str, char **ep, rcsnum_aton_failed: nump->rn_len = 0; - xfree(nump->rn_id); + free(nump->rn_id); nump->rn_id = NULL; return (-1); } Modified: vendor/OpenBSD/dist/usr.bin/rcs/rcsparse.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/rcsparse.c Sun Sep 11 14:19:06 2016 (r305693) +++ vendor/OpenBSD/dist/usr.bin/rcs/rcsparse.c Sun Sep 11 15:55:11 2016 (r305694) @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsparse.c,v 1.14 2014/12/01 21:58:46 deraadt Exp $ */ +/* $OpenBSD: rcsparse.c,v 1.16 2016/08/26 09:02:54 guenther Exp $ */ /* * Copyright (c) 2010 Tobias Stoeckmann * @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "rcs.h" @@ -340,11 +341,10 @@ rcsparse_free(RCSFILE *rfp) pdp = rfp->rf_pdata; - if (pdp->rp_buf != NULL) - xfree(pdp->rp_buf); + free(pdp->rp_buf); if (pdp->rp_token == RCS_TYPE_REVISION) rcsnum_free(pdp->rp_value.rev); - xfree(pdp); + free(pdp); } /* @@ -609,7 +609,7 @@ rcsparse_text(RCSFILE *rfp, struct rcs_p memcpy(pdp->rp_delta->rd_text, pdp->rp_buf, pdp->rp_delta->rd_tlen); } - xfree(pdp->rp_value.str); + free(pdp->rp_value.str); return (0); } @@ -707,7 +707,7 @@ rcsparse_symbols(RCSFILE *rfp, struct rc name = pdp->rp_value.str; if (rcsparse_token(rfp, RCS_TOK_COLON) != RCS_TOK_COLON || rcsparse_token(rfp, RCS_TYPE_NUMBER) != RCS_TYPE_NUMBER) { - xfree(name); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sun Sep 11 16:21:00 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2507DBD6CDD; Sun, 11 Sep 2016 16:21:00 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8D35211; Sun, 11 Sep 2016 16:20:59 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8BGKxPV061689; Sun, 11 Sep 2016 16:20:59 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8BGKvbi061672; Sun, 11 Sep 2016 16:20:57 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201609111620.u8BGKvbi061672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 11 Sep 2016 16:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305697 - vendor/OpenBSD/dist/usr.bin/rcs X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2016 16:21:00 -0000 Author: pfg Date: Sun Sep 11 16:20:57 2016 New Revision: 305697 URL: https://svnweb.freebsd.org/changeset/base/305697 Log: Revert r305694: This has some changes that we have no interest in. This is only for reference but we will have to chose a different snapshot. Modified: vendor/OpenBSD/dist/usr.bin/rcs/buf.c vendor/OpenBSD/dist/usr.bin/rcs/ci.c vendor/OpenBSD/dist/usr.bin/rcs/co.c vendor/OpenBSD/dist/usr.bin/rcs/date.y vendor/OpenBSD/dist/usr.bin/rcs/diff.c vendor/OpenBSD/dist/usr.bin/rcs/diff3.c vendor/OpenBSD/dist/usr.bin/rcs/ident.c vendor/OpenBSD/dist/usr.bin/rcs/merge.c vendor/OpenBSD/dist/usr.bin/rcs/rcs.1 vendor/OpenBSD/dist/usr.bin/rcs/rcs.c vendor/OpenBSD/dist/usr.bin/rcs/rcs.h vendor/OpenBSD/dist/usr.bin/rcs/rcsclean.c vendor/OpenBSD/dist/usr.bin/rcs/rcsdiff.c vendor/OpenBSD/dist/usr.bin/rcs/rcsmerge.c vendor/OpenBSD/dist/usr.bin/rcs/rcsnum.c vendor/OpenBSD/dist/usr.bin/rcs/rcsparse.c vendor/OpenBSD/dist/usr.bin/rcs/rcsprog.c vendor/OpenBSD/dist/usr.bin/rcs/rcstime.c vendor/OpenBSD/dist/usr.bin/rcs/rcsutil.c vendor/OpenBSD/dist/usr.bin/rcs/rcsutil.h vendor/OpenBSD/dist/usr.bin/rcs/rlog.1 vendor/OpenBSD/dist/usr.bin/rcs/rlog.c vendor/OpenBSD/dist/usr.bin/rcs/worklist.c vendor/OpenBSD/dist/usr.bin/rcs/xmalloc.c vendor/OpenBSD/dist/usr.bin/rcs/xmalloc.h Modified: vendor/OpenBSD/dist/usr.bin/rcs/buf.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/buf.c Sun Sep 11 16:11:51 2016 (r305696) +++ vendor/OpenBSD/dist/usr.bin/rcs/buf.c Sun Sep 11 16:20:57 2016 (r305697) @@ -1,4 +1,4 @@ -/* $OpenBSD: buf.c,v 1.26 2015/11/02 16:45:21 nicm Exp $ */ +/* $OpenBSD: buf.c,v 1.24 2015/02/05 12:59:58 millert Exp $ */ /* * Copyright (c) 2003 Jean-Francois Brousseau * All rights reserved. @@ -32,7 +32,6 @@ #include #include #include -#include #include #include @@ -138,16 +137,15 @@ out: void buf_free(BUF *b) { - if (b == NULL) - return; - free(b->cb_buf); - free(b); + if (b->cb_buf != NULL) + xfree(b->cb_buf); + xfree(b); } /* * Free the buffer 's structural information but do not free the contents * of the buffer. Instead, they are returned and should be freed later using - * free(). + * xfree(). */ void * buf_release(BUF *b) @@ -155,7 +153,7 @@ buf_release(BUF *b) void *tmp; tmp = b->cb_buf; - free(b); + xfree(b); return (tmp); } Modified: vendor/OpenBSD/dist/usr.bin/rcs/ci.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/ci.c Sun Sep 11 16:11:51 2016 (r305696) +++ vendor/OpenBSD/dist/usr.bin/rcs/ci.c Sun Sep 11 16:20:57 2016 (r305697) @@ -1,4 +1,4 @@ -/* $OpenBSD: ci.c,v 1.224 2016/07/04 01:39:12 millert Exp $ */ +/* $OpenBSD: ci.c,v 1.219 2015/01/16 06:40:11 deraadt Exp $ */ /* * Copyright (c) 2005, 2006 Niall O'Higgins * All rights reserved. @@ -210,7 +210,8 @@ checkin_main(int argc, char **argv) printf("%s\n", rcs_version); exit(0); case 'w': - free(pb.author); + if (pb.author != NULL) + xfree(pb.author); pb.author = xstrdup(rcs_optarg); break; case 'x': @@ -279,7 +280,7 @@ checkin_main(int argc, char **argv) errx(1, "failed to open rcsfile `%s'", pb.fpath); if ((pb.flags & DESCRIPTION) && - rcs_set_description(pb.file, pb.description, pb.flags) == -1) + rcs_set_description(pb.file, pb.description) == -1) err(1, "%s", pb.filename); if (!(pb.flags & QUIET)) @@ -369,11 +370,16 @@ checkin_diff_file(struct checkin_params return (b3); out: - buf_free(b1); - buf_free(b2); - buf_free(b3); - free(path1); - free(path2); + if (b1 != NULL) + buf_free(b1); + if (b2 != NULL) + buf_free(b2); + if (b3 != NULL) + buf_free(b3); + if (path1 != NULL) + xfree(path1); + if (path2 != NULL) + xfree(path2); return (NULL); } @@ -406,7 +412,7 @@ checkin_getlogmsg(RCSNUM *rev, RCSNUM *r (void)fprintf(stderr, "new revision: %s; " "previous revision: %s\n", nrev, prev); - rcs_msg = rcs_prompt(prompt, flags); + rcs_msg = rcs_prompt(prompt); return (rcs_msg); } @@ -505,7 +511,7 @@ checkin_update(struct checkin_params *pb fprintf(stderr, "reuse log message of previous file? [yn](y): "); if (rcs_yesno('y') != 'y') { - free(pb->rcs_msg); + xfree(pb->rcs_msg); pb->rcs_msg = NULL; } } @@ -578,7 +584,7 @@ checkin_update(struct checkin_params *pb pb->username, pb->author, NULL, NULL); if ((pb->flags & INTERACTIVE) && (pb->rcs_msg[0] == '\0')) { - free(pb->rcs_msg); /* free empty log message */ + xfree(pb->rcs_msg); /* free empty log message */ pb->rcs_msg = NULL; } @@ -621,7 +627,7 @@ checkin_init(struct checkin_params *pb) /* Get description from user */ if (pb->description == NULL && - rcs_set_description(pb->file, NULL, pb->flags) == -1) { + rcs_set_description(pb->file, NULL) == -1) { warn("%s", pb->filename); return (-1); } @@ -728,7 +734,7 @@ checkin_attach_symbol(struct checkin_par } } } - if ((ret = rcs_sym_add(pb->file, pb->symbol, pb->newrev)) == -1 && + if ((ret = rcs_sym_add(pb->file, pb->symbol, pb->newrev) == -1) && (rcs_errno == RCS_ERR_DUPENT)) { rcsnum_tostr(rcs_sym_getrev(pb->file, pb->symbol), rbuf, sizeof(rbuf)); @@ -982,22 +988,25 @@ checkin_parsekeyword(char *keystring, RC (void)xasprintf(&datestring, "%s %s", tokens[3], tokens[4]); if ((*date = date_parse(datestring)) == -1) errx(1, "could not parse date"); - free(datestring); + xfree(datestring); if (i < 6) break; - free(*author); + if (*author != NULL) + xfree(*author); *author = xstrdup(tokens[5]); if (i < 7) break; - free(*state); + if (*state != NULL) + xfree(*state); *state = xstrdup(tokens[6]); break; case KW_TYPE_AUTHOR: if (i < 2) break; - free(*author); + if (*author != NULL) + xfree(*author); *author = xstrdup(tokens[1]); break; case KW_TYPE_DATE: @@ -1006,12 +1015,13 @@ checkin_parsekeyword(char *keystring, RC (void)xasprintf(&datestring, "%s %s", tokens[1], tokens[2]); if ((*date = date_parse(datestring)) == -1) errx(1, "could not parse date"); - free(datestring); + xfree(datestring); break; case KW_TYPE_STATE: if (i < 2) break; - free(*state); + if (*state != NULL) + xfree(*state); *state = xstrdup(tokens[1]); break; case KW_TYPE_REVISION: Modified: vendor/OpenBSD/dist/usr.bin/rcs/co.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/co.c Sun Sep 11 16:11:51 2016 (r305696) +++ vendor/OpenBSD/dist/usr.bin/rcs/co.c Sun Sep 11 16:20:57 2016 (r305697) @@ -1,4 +1,4 @@ -/* $OpenBSD: co.c,v 1.122 2015/10/21 16:06:57 millert Exp $ */ +/* $OpenBSD: co.c,v 1.120 2015/01/16 06:40:11 deraadt Exp $ */ /* * Copyright (c) 2005 Joris Vink * All rights reserved. @@ -515,7 +515,7 @@ checkout_err_nobranch(RCSFILE *file, con file->rf_path, date ? " a date before " : "", date ? date : "", - author ? " and author " + (date ? 0:4) : "", + author ? " and author " + (date ? 0:4 ) : "", author ? author : "", state ? " and state " + (date || author ? 0:4) : "", state ? state : ""); @@ -554,7 +554,7 @@ checkout_file_has_diffs(RCSFILE *rfp, RC buf_free(bp); unlink(tempfile); - free(tempfile); + xfree(tempfile); return (ret); } Modified: vendor/OpenBSD/dist/usr.bin/rcs/date.y ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/date.y Sun Sep 11 16:11:51 2016 (r305696) +++ vendor/OpenBSD/dist/usr.bin/rcs/date.y Sun Sep 11 16:20:57 2016 (r305697) @@ -1,5 +1,5 @@ %{ -/* $OpenBSD: date.y,v 1.14 2016/08/26 09:02:54 guenther Exp $ */ +/* $OpenBSD: date.y,v 1.12 2013/12/03 00:21:49 deraadt Exp $ */ /* ** Originally written by Steven M. Bellovin while @@ -17,7 +17,6 @@ #include #include #include -#include #include "rcsprog.h" @@ -495,7 +494,7 @@ yyerror(const char *s) s, yyInput); warnx("%s", str); - free(str); + xfree(str); return (0); } Modified: vendor/OpenBSD/dist/usr.bin/rcs/diff.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/diff.c Sun Sep 11 16:11:51 2016 (r305696) +++ vendor/OpenBSD/dist/usr.bin/rcs/diff.c Sun Sep 11 16:20:57 2016 (r305697) @@ -1,4 +1,4 @@ -/* $OpenBSD: diff.c,v 1.38 2015/06/13 20:15:21 nicm Exp $ */ +/* $OpenBSD: diff.c,v 1.37 2015/01/16 06:40:11 deraadt Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. * All rights reserved. @@ -72,7 +72,6 @@ #include #include #include -#include #include #include #include @@ -375,13 +374,13 @@ diffreg(const char *file1, const char *f clistlen = 100; clist = xcalloc(clistlen, sizeof(*clist)); i = stone(class, slen[0], member, klist, flags); - free(member); - free(class); + xfree(member); + xfree(class); J = xreallocarray(J, len[0] + 2, sizeof(*J)); unravel(klist[i]); - free(clist); - free(klist); + xfree(clist); + xfree(klist); ixold = xreallocarray(ixold, len[0] + 2, sizeof(*ixold)); ixnew = xreallocarray(ixnew, len[1] + 2, sizeof(*ixnew)); @@ -770,7 +769,7 @@ unsort(struct line *f, int l, int *b) a[f[i].serial] = f[i].value; for (i = 1; i <= l; i++) b[i] = a[i]; - free(a); + xfree(a); } static int @@ -861,7 +860,7 @@ ignoreline(char *line) int ret; ret = regexec(diff_ignore_re, line, 0, NULL, 0); - free(line); + xfree(line); return (ret == 0); /* if it matched, it should be ignored. */ } @@ -1384,5 +1383,5 @@ diff_output(const char *fmt, ...) buf_append(diffbuf, str, strlen(str)); else printf("%s", str); - free(str); + xfree(str); } Modified: vendor/OpenBSD/dist/usr.bin/rcs/diff3.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/diff3.c Sun Sep 11 16:11:51 2016 (r305696) +++ vendor/OpenBSD/dist/usr.bin/rcs/diff3.c Sun Sep 11 16:20:57 2016 (r305697) @@ -1,4 +1,4 @@ -/* $OpenBSD: diff3.c,v 1.39 2016/08/26 09:02:54 guenther Exp $ */ +/* $OpenBSD: diff3.c,v 1.35 2015/01/16 06:40:11 deraadt Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -69,7 +69,6 @@ #include #include #include -#include #include #include "diff.h" @@ -235,10 +234,14 @@ merge_diff3(char **av, int flags) warnx("warning: overlaps or other problems during merge"); out: - buf_free(b2); - buf_free(b3); - buf_free(d1); - buf_free(d2); + if (b2 != NULL) + buf_free(b2); + if (b3 != NULL) + buf_free(b3); + if (d1 != NULL) + buf_free(d1); + if (d2 != NULL) + buf_free(d2); (void)unlink(path1); (void)unlink(path2); @@ -246,13 +249,20 @@ out: (void)unlink(dp13); (void)unlink(dp23); - free(path1); - free(path2); - free(path3); - free(dp13); - free(dp23); - free(data); - free(patch); + if (path1 != NULL) + xfree(path1); + if (path2 != NULL) + xfree(path2); + if (path3 != NULL) + xfree(path3); + if (dp13 != NULL) + xfree(dp13); + if (dp23 != NULL) + xfree(dp23); + if (data != NULL) + xfree(data); + if (patch != NULL) + xfree(patch); return (diffb); } @@ -351,10 +361,14 @@ rcs_diff3(RCSFILE *rf, char *workfile, R warnx("warning: overlaps or other problems during merge"); out: - buf_free(b2); - buf_free(b3); - buf_free(d1); - buf_free(d2); + if (b2 != NULL) + buf_free(b2); + if (b3 != NULL) + buf_free(b3); + if (d1 != NULL) + buf_free(d1); + if (d2 != NULL) + buf_free(d2); (void)unlink(path1); (void)unlink(path2); @@ -362,13 +376,20 @@ out: (void)unlink(dp13); (void)unlink(dp23); - free(path1); - free(path2); - free(path3); - free(dp13); - free(dp23); - free(data); - free(patch); + if (path1 != NULL) + xfree(path1); + if (path2 != NULL) + xfree(path2); + if (path3 != NULL) + xfree(path3); + if (dp13 != NULL) + xfree(dp13); + if (dp23 != NULL) + xfree(dp23); + if (data != NULL) + xfree(data); + if (patch != NULL) + xfree(patch); return (diffb); } @@ -636,7 +657,7 @@ merge(size_t m1, size_t m2) d1 = d13; d2 = d23; j = 0; - while ((t1 = (d1 < d13 + m1)) | (t2 = (d2 < d23 + m2))) { + while ((t1 = d1 < d13 + m1) | (t2 = d2 < d23 + m2)) { if (debug) { printf("%d,%d=%d,%d %d,%d=%d,%d\n", d1->old.from, d1->old.to, Modified: vendor/OpenBSD/dist/usr.bin/rcs/ident.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/ident.c Sun Sep 11 16:11:51 2016 (r305696) +++ vendor/OpenBSD/dist/usr.bin/rcs/ident.c Sun Sep 11 16:20:57 2016 (r305697) @@ -1,4 +1,4 @@ -/* $OpenBSD: ident.c,v 1.32 2016/08/26 09:02:54 guenther Exp $ */ +/* $OpenBSD: ident.c,v 1.30 2014/10/02 06:23:15 otto Exp $ */ /* * Copyright (c) 2005 Xavier Santolaria * All rights reserved. @@ -28,7 +28,6 @@ #include #include #include -#include #include #include "rcsprog.h" @@ -157,7 +156,8 @@ ident_line(FILE *fp) found++; out: - buf_free(bp); + if (bp != NULL) + buf_free(bp); } __dead void Modified: vendor/OpenBSD/dist/usr.bin/rcs/merge.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/merge.c Sun Sep 11 16:11:51 2016 (r305696) +++ vendor/OpenBSD/dist/usr.bin/rcs/merge.c Sun Sep 11 16:20:57 2016 (r305697) @@ -1,4 +1,4 @@ -/* $OpenBSD: merge.c,v 1.10 2016/08/26 09:02:54 guenther Exp $ */ +/* $OpenBSD: merge.c,v 1.9 2014/10/10 08:15:25 otto Exp $ */ /* * Copyright (c) 2006 Xavier Santolaria * All rights reserved. @@ -27,7 +27,6 @@ #include #include #include -#include #include #include "rcsprog.h" Modified: vendor/OpenBSD/dist/usr.bin/rcs/rcs.1 ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/rcs.1 Sun Sep 11 16:11:51 2016 (r305696) +++ vendor/OpenBSD/dist/usr.bin/rcs/rcs.1 Sun Sep 11 16:20:57 2016 (r305697) @@ -1,4 +1,4 @@ -.\" $OpenBSD: rcs.1,v 1.59 2015/09/25 15:31:24 schwarze Exp $ +.\" $OpenBSD: rcs.1,v 1.58 2013/01/18 11:21:09 guenther Exp $ .\" .\" Copyright (c) 2005 Jean-Francois Brousseau .\" Copyright (c) 2005 Xavier Santolaria @@ -24,7 +24,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: September 25 2015 $ +.Dd $Mdocdate: January 18 2013 $ .Dt RCS 1 .Os .Sh NAME @@ -40,7 +40,8 @@ .Op Fl e Ns Op Ar users .Op Fl k Ns Ar mode .Op Fl l Ns Op Ar rev -.Op Fl m Ns Ar rev : Ns Ar msg +.Oo Fl m Ns Ar rev : +.Ar msg Oc .Op Fl o Ns Ar rev .Op Fl t Ns Op Ar str .Op Fl u Ns Op Ar rev Modified: vendor/OpenBSD/dist/usr.bin/rcs/rcs.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/rcs.c Sun Sep 11 16:11:51 2016 (r305696) +++ vendor/OpenBSD/dist/usr.bin/rcs/rcs.c Sun Sep 11 16:20:57 2016 (r305697) @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.85 2016/05/09 13:03:55 schwarze Exp $ */ +/* $OpenBSD: rcs.c,v 1.82 2015/01/16 06:40:11 deraadt Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -66,7 +66,6 @@ struct rcs_kw rcs_expkw[] = { { "Revision", RCS_KW_REVISION }, { "Source", RCS_KW_SOURCE }, { "State", RCS_KW_STATE }, - { "Mdocdate", RCS_KW_MDOCDATE }, }; int rcs_errno = RCS_ERR_NOERR; @@ -158,40 +157,44 @@ rcs_close(RCSFILE *rfp) while (!TAILQ_EMPTY(&(rfp->rf_access))) { rap = TAILQ_FIRST(&(rfp->rf_access)); TAILQ_REMOVE(&(rfp->rf_access), rap, ra_list); - free(rap->ra_name); - free(rap); + xfree(rap->ra_name); + xfree(rap); } while (!TAILQ_EMPTY(&(rfp->rf_symbols))) { rsp = TAILQ_FIRST(&(rfp->rf_symbols)); TAILQ_REMOVE(&(rfp->rf_symbols), rsp, rs_list); rcsnum_free(rsp->rs_num); - free(rsp->rs_name); - free(rsp); + xfree(rsp->rs_name); + xfree(rsp); } while (!TAILQ_EMPTY(&(rfp->rf_locks))) { rlp = TAILQ_FIRST(&(rfp->rf_locks)); TAILQ_REMOVE(&(rfp->rf_locks), rlp, rl_list); rcsnum_free(rlp->rl_num); - free(rlp->rl_name); - free(rlp); + xfree(rlp->rl_name); + xfree(rlp); } - rcsnum_free(rfp->rf_head); - rcsnum_free(rfp->rf_branch); + if (rfp->rf_head != NULL) + rcsnum_free(rfp->rf_head); + if (rfp->rf_branch != NULL) + rcsnum_free(rfp->rf_branch); if (rfp->rf_file != NULL) fclose(rfp->rf_file); - - free(rfp->rf_path); - free(rfp->rf_comment); - free(rfp->rf_expand); - free(rfp->rf_desc); + if (rfp->rf_path != NULL) + xfree(rfp->rf_path); + if (rfp->rf_comment != NULL) + xfree(rfp->rf_comment); + if (rfp->rf_expand != NULL) + xfree(rfp->rf_expand); + if (rfp->rf_desc != NULL) + xfree(rfp->rf_desc); if (rfp->rf_pdata != NULL) rcsparse_free(rfp); - - free(rfp); + xfree(rfp); } /* @@ -346,7 +349,8 @@ rcs_write(RCSFILE *rfp) rfp->rf_flags |= RCS_SYNCED; - free(fn); + if (fn != NULL) + xfree(fn); } /* @@ -416,7 +420,7 @@ rcs_movefile(char *from, char *to, mode_ out: (void)fclose(src); (void)fclose(dst); - free(buf); + xfree(buf); return (0); } @@ -505,8 +509,8 @@ rcs_access_remove(RCSFILE *file, const c } TAILQ_REMOVE(&(file->rf_access), ap, ra_list); - free(ap->ra_name); - free(ap); + xfree(ap->ra_name); + xfree(ap); /* not synced anymore */ file->rf_flags &= ~RCS_SYNCED; @@ -578,9 +582,9 @@ rcs_sym_remove(RCSFILE *file, const char } TAILQ_REMOVE(&(file->rf_symbols), symp, rs_list); - free(symp->rs_name); + xfree(symp->rs_name); rcsnum_free(symp->rs_num); - free(symp); + xfree(symp); /* not synced anymore */ file->rf_flags &= ~RCS_SYNCED; @@ -739,8 +743,8 @@ rcs_lock_remove(RCSFILE *file, const cha TAILQ_REMOVE(&(file->rf_locks), lkp, rl_list); rcsnum_free(lkp->rl_num); - free(lkp->rl_name); - free(lkp); + xfree(lkp->rl_name); + xfree(lkp); /* not synced anymore */ file->rf_flags &= ~RCS_SYNCED; @@ -758,7 +762,8 @@ rcs_desc_set(RCSFILE *file, const char * char *tmp; tmp = xstrdup(desc); - free(file->rf_desc); + if (file->rf_desc != NULL) + xfree(file->rf_desc); file->rf_desc = tmp; file->rf_flags &= ~RCS_SYNCED; } @@ -774,7 +779,8 @@ rcs_comment_set(RCSFILE *file, const cha char *tmp; tmp = xstrdup(comment); - free(file->rf_comment); + if (file->rf_comment != NULL) + xfree(file->rf_comment); file->rf_comment = tmp; file->rf_flags &= ~RCS_SYNCED; } @@ -833,7 +839,7 @@ rcs_patch_lines(struct rcs_lines *dlines for (i = 0; (i < nbln) && (dlp != NULL); i++) { ndlp = TAILQ_NEXT(dlp, l_list); TAILQ_REMOVE(&(dlines->l_lines), dlp, l_list); - free(dlp); + xfree(dlp); dlp = ndlp; /* last line is gone - reset dlp */ if (dlp == NULL) { @@ -1014,7 +1020,7 @@ rcs_getrev(RCSFILE *rfp, RCSNUM *frev) return (NULL); rbuf = rcs_patchfile(data, dlen, patch, plen, rcs_patch_lines); - free(data); + xfree(data); if (rbuf == NULL) break; @@ -1240,8 +1246,10 @@ rcs_rev_remove(RCSFILE *rf, RCSNUM *rev) rcs_freedelta(rdp); - free(path_tmp1); - free(path_tmp2); + if (path_tmp1 != NULL) + xfree(path_tmp1); + if (path_tmp2 != NULL) + xfree(path_tmp2); return (0); } @@ -1335,7 +1343,8 @@ rcs_kwexp_set(RCSFILE *file, int mode) } tmp = xstrdup(buf); - free(file->rf_expand); + if (file->rf_expand != NULL) + xfree(file->rf_expand); file->rf_expand = tmp; /* not synced anymore */ file->rf_flags &= ~RCS_SYNCED; @@ -1405,22 +1414,29 @@ rcs_freedelta(struct rcs_delta *rdp) { struct rcs_branch *rb; - rcsnum_free(rdp->rd_num); - rcsnum_free(rdp->rd_next); - - free(rdp->rd_author); - free(rdp->rd_locker); - free(rdp->rd_state); - free(rdp->rd_log); - free(rdp->rd_text); + if (rdp->rd_num != NULL) + rcsnum_free(rdp->rd_num); + if (rdp->rd_next != NULL) + rcsnum_free(rdp->rd_next); + + if (rdp->rd_author != NULL) + xfree(rdp->rd_author); + if (rdp->rd_locker != NULL) + xfree(rdp->rd_locker); + if (rdp->rd_state != NULL) + xfree(rdp->rd_state); + if (rdp->rd_log != NULL) + xfree(rdp->rd_log); + if (rdp->rd_text != NULL) + xfree(rdp->rd_text); while ((rb = TAILQ_FIRST(&(rdp->rd_branches))) != NULL) { TAILQ_REMOVE(&(rdp->rd_branches), rb, rb_list); rcsnum_free(rb->rb_num); - free(rb); + xfree(rb); } - free(rdp); + xfree(rdp); } /* @@ -1597,16 +1613,6 @@ rcs_expand_keywords(char *rcsfile_in, st buf_putc(newbuf, ' '); } - if (kwtype & RCS_KW_MDOCDATE) { - strftime(buf, sizeof(buf), "%B", &tb); - buf_puts(newbuf, buf); - /* Only one blank before single-digit day. */ - snprintf(buf, sizeof(buf), " %d", tb.tm_mday); - buf_puts(newbuf, buf); - strftime(buf, sizeof(buf), " %Y ", &tb); - buf_puts(newbuf, buf); - } - if (kwtype & RCS_KW_NAME) buf_putc(newbuf, ' '); @@ -1695,7 +1701,8 @@ rcs_deltatext_set(RCSFILE *rfp, RCSNUM * if ((rdp = rcs_findrev(rfp, rev)) == NULL) return (-1); - free(rdp->rd_text); + if (rdp->rd_text != NULL) + xfree(rdp->rd_text); len = buf_len(bp); dtext = buf_release(bp); @@ -1710,7 +1717,8 @@ rcs_deltatext_set(RCSFILE *rfp, RCSNUM * rdp->rd_tlen = 0; } - free(dtext); + if (dtext != NULL) + xfree(dtext); return (0); } @@ -1728,7 +1736,8 @@ rcs_rev_setlog(RCSFILE *rfp, RCSNUM *rev if ((rdp = rcs_findrev(rfp, rev)) == NULL) return (-1); - free(rdp->rd_log); + if (rdp->rd_log != NULL) + xfree(rdp->rd_log); rdp->rd_log = xstrdup(logtext); rfp->rf_flags &= ~RCS_SYNCED; @@ -1767,7 +1776,8 @@ rcs_state_set(RCSFILE *rfp, RCSNUM *rev, if ((rdp = rcs_findrev(rfp, rev)) == NULL) return (-1); - free(rdp->rd_state); + if (rdp->rd_state != NULL) + xfree(rdp->rd_state); rdp->rd_state = xstrdup(state); Modified: vendor/OpenBSD/dist/usr.bin/rcs/rcs.h ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/rcs.h Sun Sep 11 16:11:51 2016 (r305696) +++ vendor/OpenBSD/dist/usr.bin/rcs/rcs.h Sun Sep 11 16:20:57 2016 (r305697) @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.h,v 1.17 2016/05/09 13:03:55 schwarze Exp $ */ +/* $OpenBSD: rcs.h,v 1.16 2013/06/03 17:04:35 jcs Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -69,7 +69,6 @@ #define RCS_KW_SOURCE 0x0400 #define RCS_KW_STATE 0x0800 #define RCS_KW_FULLPATH 0x0010 -#define RCS_KW_MDOCDATE 0x0020 #define RCS_KW_LOCKER 0x10000 #define RCS_KW_ID \ Modified: vendor/OpenBSD/dist/usr.bin/rcs/rcsclean.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/rcsclean.c Sun Sep 11 16:11:51 2016 (r305696) +++ vendor/OpenBSD/dist/usr.bin/rcs/rcsclean.c Sun Sep 11 16:20:57 2016 (r305697) @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsclean.c,v 1.56 2016/08/26 09:02:54 guenther Exp $ */ +/* $OpenBSD: rcsclean.c,v 1.54 2015/01/16 06:40:11 deraadt Exp $ */ /* * Copyright (c) 2005 Joris Vink * All rights reserved. @@ -30,7 +30,6 @@ #include #include #include -#include #include #include "rcsprog.h" @@ -210,8 +209,10 @@ rcsclean_file(char *fname, const char *r rcs_set_mtime(file, rcs_mtime); out: - buf_free(b1); - buf_free(b2); + if (b1 != NULL) + buf_free(b1); + if (b2 != NULL) + buf_free(b2); if (file != NULL) rcs_close(file); } Modified: vendor/OpenBSD/dist/usr.bin/rcs/rcsdiff.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/rcsdiff.c Sun Sep 11 16:11:51 2016 (r305696) +++ vendor/OpenBSD/dist/usr.bin/rcs/rcsdiff.c Sun Sep 11 16:20:57 2016 (r305697) @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsdiff.c,v 1.84 2015/11/02 16:45:21 nicm Exp $ */ +/* $OpenBSD: rcsdiff.c,v 1.82 2015/01/16 06:40:11 deraadt Exp $ */ /* * Copyright (c) 2005 Joris Vink * All rights reserved. @@ -250,9 +250,15 @@ rcsdiff_main(int argc, char **argv) status = rcsdiff_rev(file, rev1, rev2, dflags); rcs_close(file); - rcsnum_free(rev1); - rcsnum_free(rev2); - rev1 = rev2 = NULL; + + if (rev1 != NULL) { + rcsnum_free(rev1); + rev1 = NULL; + } + if (rev2 != NULL) { + rcsnum_free(rev2); + rev2 = NULL; + } } return (status); @@ -348,10 +354,14 @@ rcsdiff_file(RCSFILE *file, RCSNUM *rev, out: if (fd != -1) (void)close(fd); - buf_free(b1); - buf_free(b2); - free(path1); - free(path2); + if (b1 != NULL) + buf_free(b1); + if (b2 != NULL) + buf_free(b2); + if (path1 != NULL) + xfree(path1); + if (path2 != NULL) + xfree(path2); return (ret); } @@ -423,10 +433,14 @@ rcsdiff_rev(RCSFILE *file, RCSNUM *rev1, ret = diffreg(path1, path2, NULL, dflags); out: - buf_free(b1); - buf_free(b2); - free(path1); - free(path2); + if (b1 != NULL) + buf_free(b1); + if (b2 != NULL) + buf_free(b2); + if (path1 != NULL) + xfree(path1); + if (path2 != NULL) + xfree(path2); return (ret); } Modified: vendor/OpenBSD/dist/usr.bin/rcs/rcsmerge.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/rcsmerge.c Sun Sep 11 16:11:51 2016 (r305696) +++ vendor/OpenBSD/dist/usr.bin/rcs/rcsmerge.c Sun Sep 11 16:20:57 2016 (r305697) @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsmerge.c,v 1.57 2016/08/26 09:02:54 guenther Exp $ */ +/* $OpenBSD: rcsmerge.c,v 1.55 2015/01/16 06:40:11 deraadt Exp $ */ /* * Copyright (c) 2005, 2006 Xavier Santolaria * All rights reserved. @@ -28,7 +28,6 @@ #include #include #include -#include #include #include "rcsprog.h" @@ -174,8 +173,12 @@ rcsmerge_main(int argc, char **argv) out: rcs_close(file); - rcsnum_free(rev1); - rcsnum_free(rev2); + + if (rev1 != NULL) + rcsnum_free(rev1); + if (rev2 != NULL) + rcsnum_free(rev2); + return (status); } Modified: vendor/OpenBSD/dist/usr.bin/rcs/rcsnum.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/rcsnum.c Sun Sep 11 16:11:51 2016 (r305696) +++ vendor/OpenBSD/dist/usr.bin/rcs/rcsnum.c Sun Sep 11 16:20:57 2016 (r305697) @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsnum.c,v 1.19 2016/08/26 09:02:54 guenther Exp $ */ +/* $OpenBSD: rcsnum.c,v 1.16 2015/01/16 06:40:11 deraadt Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -26,10 +26,8 @@ #include #include -#include -#include #include -#include +#include #include "rcs.h" #include "xmalloc.h" @@ -106,10 +104,9 @@ rcsnum_parse(const char *str) void rcsnum_free(RCSNUM *rn) { - if (rn == NULL) - return; - free(rn->rn_id); - free(rn); + if (rn->rn_id != NULL) + xfree(rn->rn_id); + xfree(rn); } /* @@ -334,7 +331,7 @@ rcsnum_aton(const char *str, char **ep, rcsnum_aton_failed: nump->rn_len = 0; - free(nump->rn_id); + xfree(nump->rn_id); nump->rn_id = NULL; return (-1); } Modified: vendor/OpenBSD/dist/usr.bin/rcs/rcsparse.c ============================================================================== --- vendor/OpenBSD/dist/usr.bin/rcs/rcsparse.c Sun Sep 11 16:11:51 2016 (r305696) +++ vendor/OpenBSD/dist/usr.bin/rcs/rcsparse.c Sun Sep 11 16:20:57 2016 (r305697) @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsparse.c,v 1.16 2016/08/26 09:02:54 guenther Exp $ */ +/* $OpenBSD: rcsparse.c,v 1.14 2014/12/01 21:58:46 deraadt Exp $ */ /* * Copyright (c) 2010 Tobias Stoeckmann * @@ -24,7 +24,6 @@ #include #include #include -#include #include #include "rcs.h" @@ -341,10 +340,11 @@ rcsparse_free(RCSFILE *rfp) pdp = rfp->rf_pdata; - free(pdp->rp_buf); + if (pdp->rp_buf != NULL) + xfree(pdp->rp_buf); if (pdp->rp_token == RCS_TYPE_REVISION) rcsnum_free(pdp->rp_value.rev); - free(pdp); + xfree(pdp); } /* @@ -609,7 +609,7 @@ rcsparse_text(RCSFILE *rfp, struct rcs_p memcpy(pdp->rp_delta->rd_text, pdp->rp_buf, pdp->rp_delta->rd_tlen); } - free(pdp->rp_value.str); + xfree(pdp->rp_value.str); return (0); } @@ -707,7 +707,7 @@ rcsparse_symbols(RCSFILE *rfp, struct rc name = pdp->rp_value.str; if (rcsparse_token(rfp, RCS_TOK_COLON) != RCS_TOK_COLON || rcsparse_token(rfp, RCS_TYPE_NUMBER) != RCS_TYPE_NUMBER) { - free(name); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sun Sep 11 16:32:21 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20DE9BD604C for ; Sun, 11 Sep 2016 16:32:21 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm20.bullet.mail.bf1.yahoo.com (nm20.bullet.mail.bf1.yahoo.com [98.139.212.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CED82B79 for ; Sun, 11 Sep 2016 16:32:17 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1473610674; bh=tPm4XZ0H6KtEAgPThj46cVodWU1UtvYdh0W9kU4dsps=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=k7uJwpBHsWl6vQVkaT6P0PoP0PN8k0emooXBMPXToRjKgPXWMhrI6wt+QHb9gRr3gsZdZ4ItYlgoV97OPILIoNGcQtBcxB8jIOIkyO7LZsUxACk1dmeT3CJuj8IZIQGPtv/km8DNEVUqdZC6xVVH4SDnUpu+s4bveARM4D7vYG0x+hEU0FBP/tNQkBSwp1x+AQC++JlY7mGVnV4Zk6ivLFBwkkCvEF1udWLORua6RqGVQZlsWYZKlHEqBCpYYeaYI8VzzAbagYu98Azip4/+hDVBOJW3SnQRcRFLMZEj1j5BhurqO01VUy1I5Wi6reSzo/ATCu9oRNfaB0rm2aBSZg== Received: from [66.196.81.173] by nm20.bullet.mail.bf1.yahoo.com with NNFMP; 11 Sep 2016 16:17:54 -0000 Received: from [98.139.213.13] by tm19.bullet.mail.bf1.yahoo.com with NNFMP; 11 Sep 2016 16:17:54 -0000 Received: from [127.0.0.1] by smtp113.mail.bf1.yahoo.com with NNFMP; 11 Sep 2016 16:17:54 -0000 X-Yahoo-Newman-Id: 899002.53990.bm@smtp113.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: ZcLWhAIVM1l_iffKF0fpO0PpFxDosAKioBRNHIMBNcb9PbG beMdCwr3aZi2xQmYmtF36V8q1QPB7ZM0FAt86zfHxeqtdL1B8C9XouZYLu7D yuxPdmsQg8MaXbSAISN5sz2IKC1H3AHqHd86jG4h2fD5cI7wUomxc3l505kM zUnrDfRgWGKqTE0UmBcY3FaFeLvJKhqqNJYApCMkH1CwcIbMusn4AlFrOIZ7 xFiFzwgEH7znk80Ggr3G1BbUseZiKBxugvx3RLLy_AjSAwinmzdQdDt9gr.C Ux4FYA_jW4PzSzDuZL7zmYwk4FNlLtSIsOKp0Tzj8XiJn8HT7ZwcwQJGqHCA IZALNqP09SJnqVNCdYUjxpYhFROCO8aPWCiaJybDSXPJqwcZ8aIOYWqr06QS enUCZgncsMT8rA7_GlbHjg7MV9siyf9odZpom1.52L4yKeVVKc6uxUwOaFjO GyVGaifSLftjOnmwR7HPmxA_ysEFC2N9MZVS7BA5pCKXFRG05fEgLHDzSKlN Z1JOqm_kPjjAQUmy33nED3um0Zpp7.qyZX7Ijlkmyyj52bw-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r305694 - vendor/OpenBSD/dist/usr.bin/rcs To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org References: <201609111555.u8BFtCRY051694@repo.freebsd.org> From: Pedro Giffuni Message-ID: Date: Sun, 11 Sep 2016 11:17:58 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <201609111555.u8BFtCRY051694@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2016 16:32:21 -0000 On 09/11/16 10:55, Pedro F. Giffuni wrote: > Author: pfg > Date: Sun Sep 11 15:55:11 2016 > New Revision: 305694 > URL: https://svnweb.freebsd.org/changeset/base/305694 > > Log: > Update OpenRCS to version 20160831 > > Obtained from: OpenBSD > Bah .. this brings some pledge stuff that makes things ugly/unportable. Will revert. Pedro. From owner-svn-src-vendor@freebsd.org Sun Sep 11 16:52:11 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6435BD6820; Sun, 11 Sep 2016 16:52:11 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2187F8C; Sun, 11 Sep 2016 16:52:11 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 77BD11811; Sun, 11 Sep 2016 16:52:10 +0000 (UTC) Subject: Re: svn commit: r305694 - vendor/OpenBSD/dist/usr.bin/rcs To: Pedro Giffuni , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org References: <201609111555.u8BFtCRY051694@repo.freebsd.org> From: Allan Jude Message-ID: <5739a5ee-4464-2a35-fa9e-5d84d671c6a3@freebsd.org> Date: Sun, 11 Sep 2016 12:52:09 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WD4mJPr81eBMf6AggojVxjMghEkJ8KPat" X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2016 16:52:11 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WD4mJPr81eBMf6AggojVxjMghEkJ8KPat Content-Type: multipart/mixed; boundary="BPBaebM3gJETRv6HjTuesIKmW5c9hbIoK" From: Allan Jude To: Pedro Giffuni , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Message-ID: <5739a5ee-4464-2a35-fa9e-5d84d671c6a3@freebsd.org> Subject: Re: svn commit: r305694 - vendor/OpenBSD/dist/usr.bin/rcs References: <201609111555.u8BFtCRY051694@repo.freebsd.org> In-Reply-To: --BPBaebM3gJETRv6HjTuesIKmW5c9hbIoK Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016-09-11 12:17, Pedro Giffuni wrote: >=20 >=20 > On 09/11/16 10:55, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Sun Sep 11 15:55:11 2016 >> New Revision: 305694 >> URL: https://svnweb.freebsd.org/changeset/base/305694 >> >> Log: >> Update OpenRCS to version 20160831 >> >> Obtained from: OpenBSD >> >=20 > Bah .. this brings some pledge stuff that makes things ugly/unportable.= > Will revert. >=20 > Pedro. >=20 How nasty is the pledge stuff? It is usually fairly easy to convert pledge to Capsicum, so it might be worth looking at. I'll take a look at it later in the week. --=20 Allan Jude --BPBaebM3gJETRv6HjTuesIKmW5c9hbIoK-- --WD4mJPr81eBMf6AggojVxjMghEkJ8KPat Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJX1Yu6AAoJEBmVNT4SmAt+8DwP/30ocGt1/oMi9VigRvtyqhzU sqZX5YjL62rbiXG+SXMu/a9UQCTr2m8x9fK/VAL0TKX/4aVA27uXjfx5V78HYGq/ 13pITEyQAS9NikR4c0DirxDxgDiE4DMMVERl3Qfkie8VU210z2Ayrpf8Gio8Wdtj kXiBNszML1J0bi4Wu8Ksws3u/dXwsEV4e3Q6ywnxzsf0/D4C8kwWvZJO5OoQ+Bni GPuVJxkDF3QRPxivwijw88W7RBTyyTia28VKgmoVN55dVW/wh4T374Fwwgq+xXD9 R7LScqeIAxTvLAYHPA29sM6JJDkIOS/1Log17PfaIq55pKoIoIipl0pRrKNgIFx6 x9EFc7qo5TrypjgFQ7JSP25hapIxklK8dr3j9s0OONncPrA10IZjjKR+msjl9U5J opCOZ3bSO0dKSUVUMNwojXr773eioJWslLKz4XtKOglOrdA1LN/9j0VnbUAhGHYd YnPE4wK1zgPTUrswyrlGT7Wys3Y1U1AU6Idihx9ZQ2RRfOC+PBgHClU0AIPuo5BC Is5ajcH68b4HQu7+KenU6fdyM2zJ8ZUN0LkTABAJKMhtwwgRObq/uQNBrlZNQNVI wuxCyWWOu9pc9gLzPtsH5o4AIkW2DO0QDMc993Wr3g++Yx1TZZmIHuGjvsgB43l7 5uCersL2cTv2rZRBkmi4 =es8b -----END PGP SIGNATURE----- --WD4mJPr81eBMf6AggojVxjMghEkJ8KPat-- From owner-svn-src-vendor@freebsd.org Sun Sep 11 20:50:02 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2660BD7FA8 for ; Sun, 11 Sep 2016 20:50:02 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm4.bullet.mail.bf1.yahoo.com (nm4.bullet.mail.bf1.yahoo.com [98.139.212.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AADC28A5 for ; Sun, 11 Sep 2016 20:50:02 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1473626818; bh=1GnL2pUQf8mzrFtWMZqRwlqlgVFLDe/7JLfX6P23s5w=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=FMsiIxH0QMLgawd9Pn+si9hyvncqGU7o92jCYdfKM8gn9EfYPZxUUZbI915pzvaNTOygg9/Y4QWcs5Oxcw2KzzFfmXDLE3Z+7hQuZ53INDH2YafNiAEBzy0QOTLdQiXXM0GvetMIWbY71GRZEbicqOZwaYxVW7T7R+m3jBkFJQIP2/+bDKjXsPzsRgT8p671lWjW88WsP2jk0dWmEcDF8SFaikIaqpfIqcQ82+/s5HcwNOwmPxm8aSNSbaDhsH6E9pnAwxce5Ooytju3ReSwhXj5zUU4MONnKoyEO+EHdmBxnLGCwAsbRVrk+3skNulxPwL1FYZJJd6/iMHocJ6gPw== Received: from [66.196.81.173] by nm4.bullet.mail.bf1.yahoo.com with NNFMP; 11 Sep 2016 20:46:58 -0000 Received: from [98.139.211.192] by tm19.bullet.mail.bf1.yahoo.com with NNFMP; 11 Sep 2016 20:46:58 -0000 Received: from [127.0.0.1] by smtp201.mail.bf1.yahoo.com with NNFMP; 11 Sep 2016 20:46:58 -0000 X-Yahoo-Newman-Id: 358015.53969.bm@smtp201.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: AuYDpH4VM1mqe5DpPdf_MNMjkflSz7eLT7AUday7bXfPi4B EOqPGStBB9e26yXqctcyS3QQhF9rN.Bm4S8uotJmSxunJZLYUR8QZIvCUZN. VznrtC.qR3OMbbQmYKkTOW4pV4Ra.ON0kviCL4H61lh44OQ82nAVwQkbdVcz TAPoD4v50j9DgZbEx3UqpPGNIKS0si4mQ24Z6R7bnrrdHbzvfE0gw8ByRddM .9R8K1q8FUeDV_9dXySk3LJgQsy081nunpume3wiMGAZ78wX4G3nj22siNhy _t6bgmWqL4L2zzDpwDk7jEgJZVizUk6tsaNaAmhJyqlrRBibZOqkgePWzxyS 7tzF397aPRp4BdU0xnfTnxJInwHgwKydonQHBVw3SAAg3bz.I3a3Qf4iF2iM jRV2ewn_oOHJGXbnDL7krOVf6MFh0iH_AAyfmPWEYzrLKE.6u92ovOxZOxGo 0BpIN.BaJxe2CsGwUnbtMsHIa8egfTnqlc7dx.MyXnnseXZJDbDMjCQ5L2Qt yIDn8jmPS5gtoNhO7T.W3wwXXXk4UuB4CJ1vIWjtzeuy5nQ-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r305694 - vendor/OpenBSD/dist/usr.bin/rcs To: Allan Jude , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org References: <201609111555.u8BFtCRY051694@repo.freebsd.org> <5739a5ee-4464-2a35-fa9e-5d84d671c6a3@freebsd.org> From: Pedro Giffuni Message-ID: <1dd1619f-2369-64d8-879a-cdbb380c2a95@FreeBSD.org> Date: Sun, 11 Sep 2016 15:47:01 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <5739a5ee-4464-2a35-fa9e-5d84d671c6a3@freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2016 20:50:03 -0000 On 11/09/2016 11:52, Allan Jude wrote: > On 2016-09-11 12:17, Pedro Giffuni wrote: >> >> On 09/11/16 10:55, Pedro F. Giffuni wrote: >>> Author: pfg >>> Date: Sun Sep 11 15:55:11 2016 >>> New Revision: 305694 >>> URL: https://svnweb.freebsd.org/changeset/base/305694 >>> >>> Log: >>> Update OpenRCS to version 20160831 >>> >>> Obtained from: OpenBSD >>> >> Bah .. this brings some pledge stuff that makes things ugly/unportable. >> Will revert. >> >> Pedro. >> > How nasty is the pledge stuff? It is usually fairly easy to convert > pledge to Capsicum, so it might be worth looking at. I didn't look at it too much, TBH. In any case It is not clear that we may want openrcs in the tree, so at least for now there is not need to add more complexity. > I'll take a look at it later in the week. > If you want suggestion for something more interesting, capsicum-ising patch(1) would be useful. I gave it a try once but got stuck with the use of temporary files. Pedro. From owner-svn-src-vendor@freebsd.org Sun Sep 11 23:04:52 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2837EBD7393; Sun, 11 Sep 2016 23:04:52 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C774D62A; Sun, 11 Sep 2016 23:04:51 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id jDnlb1pIWgdaljDnnbBg5R; Sun, 11 Sep 2016 17:04:43 -0600 X-Authority-Analysis: v=2.2 cv=Q++Q2M+a c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=GW1xBdLrtEIA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=mACy7ywjV3k7yP9ZORMA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id A22F61856; Sun, 11 Sep 2016 16:04:41 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u8BN4fG0038653; Sun, 11 Sep 2016 16:04:41 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201609112304.u8BN4fG0038653@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Pedro Giffuni cc: Allan Jude , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r305694 - vendor/OpenBSD/dist/usr.bin/rcs In-Reply-To: Message from Pedro Giffuni of "Sun, 11 Sep 2016 15:47:01 -0500." <1dd1619f-2369-64d8-879a-cdbb380c2a95@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 11 Sep 2016 16:04:41 -0700 X-CMAE-Envelope: MS4wfAyUSTdJNMuN9iJzqdS3PC4wTe2JDndflGVXS1r+tQ3BjPjTqA4B/DOQWWHz5K+XXdCDwd5UhYZ53jxuRhaKXXZ6v9yLXOnsUmHEpvBbg+TDeb7/2flh U1eqjQICVM6hMD6/upKHHIwmXywxmxyjs0MQba6oXnNR/Yik3KSYhmj26P/Y4zRcto0GMKiWpJ67/CghIIg96MkI43Y3S0QSCurlPRgYKa8wWU3pRE0/ZKGt CP1ctDSdLiIS8cqHlNKaGxdEUc+c2cOCgNqghG/IB6o8J0xe6t6JwJK3qk6QMFya6Wz2oKJj/7v7E+urhYpRmA== X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2016 23:04:52 -0000 In message <1dd1619f-2369-64d8-879a-cdbb380c2a95@FreeBSD.org>, Pedro Giffuni wr ites: > > > On 11/09/2016 11:52, Allan Jude wrote: > > On 2016-09-11 12:17, Pedro Giffuni wrote: > >> > >> On 09/11/16 10:55, Pedro F. Giffuni wrote: > >>> Author: pfg > >>> Date: Sun Sep 11 15:55:11 2016 > >>> New Revision: 305694 > >>> URL: https://svnweb.freebsd.org/changeset/base/305694 > >>> > >>> Log: > >>> Update OpenRCS to version 20160831 > >>> > >>> Obtained from: OpenBSD > >>> > >> Bah .. this brings some pledge stuff that makes things ugly/unportable. > >> Will revert. > >> > >> Pedro. > >> > > How nasty is the pledge stuff? It is usually fairly easy to convert > > pledge to Capsicum, so it might be worth looking at. > > I didn't look at it too much, TBH. > In any case It is not clear that we may want openrcs in the tree, so at > least for > now there is not need to add more complexity. > > > I'll take a look at it later in the week. > > > > If you want suggestion for something more interesting, capsicum-ising > patch(1) > would be useful. I gave it a try once but got stuck with the use of > temporary files. Why would we want to put OpenBSD's or for that matter any other in base? Wasn't it decided just before 10.0 was released to remove RCS from base? I recall that there were a couple of issues that needed resolving, one of which was some ports needed it, which is why I created the rcs57 port. Wouldn't ports be a better home for OpenBSD RCS? The other question I have is, wasn't RCS in the original BSD. How did it become GPL? How did it come about that we ended up having a GPL RCS in our base tree? We don't use CVS any more and the only reason we had to keep RCS in base was to satisfy the need for CVS. Since CVS isn't in the tree any more, do we still need RCS in base? devel/rcs57, which is 100% compatible with what we have in base, is in ports. devel/rcs, though named the same, isn't 100% compatible, causing some software to choke. Would OpenBSD have the same compatibility issues as devel/rcs (rcs 5.9)? I think we should reconsider. My take on it is that now that devel/rcs57 is in ports, rcs in base is redundant and could probably be removed. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-vendor@freebsd.org Sun Sep 11 23:49:19 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10120BD793C for ; Sun, 11 Sep 2016 23:49:19 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm24-vm0.bullet.mail.bf1.yahoo.com (nm24-vm0.bullet.mail.bf1.yahoo.com [98.139.213.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD1B36AF for ; Sun, 11 Sep 2016 23:49:18 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1473637751; bh=ZGIx44/NwBkgRgsOmSxeFyAh0LP3hCl45a2FybN363o=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=M00n7vzT3gsG+QNpTJyTQjzZIdUcrYrWbKa8r+A3beYidhAIjXmETazVN1pDxvikoDZbxfGrhCigyKeEBK59KRCYLISRyKU84F7m1oEWhVzfArHiwX1SvsXoWbLkrEo8ZuFggklpbiXZEdN+/RRtXTF1XtaSAWmlrJgVju+Zat1EZFJExzRUD0LYfyx2LoNQQWt8JXs2YR3KArO7Uo4h2oIRzBzJ0X45dfjU62Pkq5m/NfSCHeJIImiPIqJreETDuvxg18Z3Q7BA/sTkgwZetsERLVCH45dQLlyLfq0cnXgS36/VorBYsHRUhWTNEGWvS6BpyRW/3pSezXx3ff/NAw== Received: from [66.196.81.174] by nm24.bullet.mail.bf1.yahoo.com with NNFMP; 11 Sep 2016 23:49:11 -0000 Received: from [68.142.230.77] by tm20.bullet.mail.bf1.yahoo.com with NNFMP; 11 Sep 2016 23:49:11 -0000 Received: from [127.0.0.1] by smtp234.mail.bf1.yahoo.com with NNFMP; 11 Sep 2016 23:49:11 -0000 X-Yahoo-Newman-Id: 209470.93912.bm@smtp234.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 6IBbEJgVM1m1a2bDIAMI3kbnO6Lt7VvBAX2_VyOvyyEh05m MxvPhVC2VC3beg2XyAsRIlmboCaNOj7bnqR8YJfSInEo6hQXw91R8B3OU7uG mvp2CZhHQYZOjrsRussAIgzHitJYRBVhZB54ycdCrEUy4Xdg0xb7Jif42Jkq kIlMaKPXxQJ1tYCNIFyulCa32vD990Zc6x_RbY5qR8pxUhp_054mNP1AsU0x xByyVX4ao1cTGISpZXb2b5093TbqklgvUOFLzx9B_Jo.elAOZo.JjPUO5js_ J5N19Onjyv2mnXDsDgrwxkkcNc.iD9xmi3tH7JJFLKStvLzK9FL19_qiavJK 3VT_nYW1W13DaO8HlJLP6uxsGUyGOG20UIWcS_O9IOVzLURVLfgszLCn6lDq 4fe_a6a1aOyU7tz3cEXV4ua7.Do5pvSjuf_x6Lkh7Z2SW3w.vzS6hJoztIXi lOSpH.7py8CgPezAJOOJKgX.kO6V_HSftfQF5ZN6zo2DGcikvPIhhxelcNop LjXwBBxXPIVFmxlRhYkyRSHKmwKC9UIOXIfg8SYnbVxAIJw-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r305694 - vendor/OpenBSD/dist/usr.bin/rcs To: Cy Schubert References: <201609112304.u8BN4fG0038653@slippy.cwsent.com> Cc: Allan Jude , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org From: Pedro Giffuni Message-ID: <3b13fc77-c96b-0ef3-988c-d99b3156963a@FreeBSD.org> Date: Sun, 11 Sep 2016 18:49:15 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <201609112304.u8BN4fG0038653@slippy.cwsent.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2016 23:49:19 -0000 On 11/09/2016 18:04, Cy Schubert wrote: > In message <1dd1619f-2369-64d8-879a-cdbb380c2a95@FreeBSD.org>, Pedro > Giffuni wr > ites: >> >> On 11/09/2016 11:52, Allan Jude wrote: >>> On 2016-09-11 12:17, Pedro Giffuni wrote: >>>> On 09/11/16 10:55, Pedro F. Giffuni wrote: >>>>> Author: pfg >>>>> Date: Sun Sep 11 15:55:11 2016 >>>>> New Revision: 305694 >>>>> URL: https://svnweb.freebsd.org/changeset/base/305694 >>>>> >>>>> Log: >>>>> Update OpenRCS to version 20160831 >>>>> >>>>> Obtained from: OpenBSD >>>>> >>>> Bah .. this brings some pledge stuff that makes things ugly/unportable. >>>> Will revert. >>>> >>>> Pedro. >>>> >>> How nasty is the pledge stuff? It is usually fairly easy to convert >>> pledge to Capsicum, so it might be worth looking at. >> I didn't look at it too much, TBH. >> In any case It is not clear that we may want openrcs in the tree, so at >> least for >> now there is not need to add more complexity. >> >>> I'll take a look at it later in the week. >>> >> If you want suggestion for something more interesting, capsicum-ising >> patch(1) >> would be useful. I gave it a try once but got stuck with the use of >> temporary files. > Why would we want to put OpenBSD's or for that matter any other in base? > Wasn't it decided just before 10.0 was released to remove RCS from base? Let me set this straight right away: OpenRCS was brought to the vendor tree at a time when: 1) The removal of GNU rcs proved to be a bad idea. 2) OpenBSD has problems paying electricity builds and there was some (low) risk of loosing it. There will be a second attempt to get rid of GNU RCS for FreeBSD 12: you can follow that up in the -current list. I am personally hoping this attempt will be successful and definitive. There are NO plans to import OpenRCS into base. Pedro. From owner-svn-src-vendor@freebsd.org Mon Sep 12 01:54:36 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67278BD770F; Mon, 12 Sep 2016 01:54:36 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 29A447D9; Mon, 12 Sep 2016 01:54:35 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-239-154.lns20.per1.internode.on.net [121.45.239.154]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id u8C1sMGG030769 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 11 Sep 2016 18:54:25 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r305694 - vendor/OpenBSD/dist/usr.bin/rcs To: Pedro Giffuni , Cy Schubert References: <201609112304.u8BN4fG0038653@slippy.cwsent.com> <3b13fc77-c96b-0ef3-988c-d99b3156963a@FreeBSD.org> Cc: Allan Jude , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org From: Julian Elischer Message-ID: <0bdf76af-c1b1-4ecf-b553-9dd6e137219b@freebsd.org> Date: Mon, 12 Sep 2016 09:54:16 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <3b13fc77-c96b-0ef3-988c-d99b3156963a@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2016 01:54:36 -0000 On 12/09/2016 7:49 AM, Pedro Giffuni wrote: > > > On 11/09/2016 18:04, Cy Schubert wrote: >> In message <1dd1619f-2369-64d8-879a-cdbb380c2a95@FreeBSD.org>, Pedro >> Giffuni wr >> ites: >>> >>> On 11/09/2016 11:52, Allan Jude wrote: >>>> On 2016-09-11 12:17, Pedro Giffuni wrote: >>>>> On 09/11/16 10:55, Pedro F. Giffuni wrote: >>>>>> Author: pfg >>>>>> Date: Sun Sep 11 15:55:11 2016 >>>>>> New Revision: 305694 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/305694 >>>>>> >>>>>> Log: >>>>>> Update OpenRCS to version 20160831 >>>>>> >>>>>> Obtained from: OpenBSD >>>>>> >>>>> Bah .. this brings some pledge stuff that makes things >>>>> ugly/unportable. >>>>> Will revert. >>>>> >>>>> Pedro. >>>>> >>>> How nasty is the pledge stuff? It is usually fairly easy to convert >>>> pledge to Capsicum, so it might be worth looking at. >>> I didn't look at it too much, TBH. >>> In any case It is not clear that we may want openrcs in the tree, >>> so at >>> least for >>> now there is not need to add more complexity. >>> >>>> I'll take a look at it later in the week. >>>> >>> If you want suggestion for something more interesting, capsicum-ising >>> patch(1) >>> would be useful. I gave it a try once but got stuck with the use of >>> temporary files. >> Why would we want to put OpenBSD's or for that matter any other in >> base? >> Wasn't it decided just before 10.0 was released to remove RCS from >> base? > > > Let me set this straight right away: > > OpenRCS was brought to the vendor tree at a time when: > 1) The removal of GNU rcs proved to be a bad idea. > 2) OpenBSD has problems paying electricity builds and there was some > (low) risk of loosing it. > > There will be a second attempt to get rid of GNU RCS for FreeBSD 12: > you can follow that up in the -current list. > I am personally hoping this attempt will be successful and > definitive. There are NO plans to import OpenRCS into base. > > Pedro. > > when everything is a package, RCS can easily be put in the "optional" pile. just wait until then and avoid the fight. From owner-svn-src-vendor@freebsd.org Wed Sep 14 20:32:36 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09882BDAFB7; Wed, 14 Sep 2016 20:32:36 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C28ED1DED; Wed, 14 Sep 2016 20:32:35 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8EKWZuZ004133; Wed, 14 Sep 2016 20:32:35 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8EKWYeI004126; Wed, 14 Sep 2016 20:32:34 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201609142032.u8EKWYeI004126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Wed, 14 Sep 2016 20:32:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305816 - in vendor/libarchive/dist/libarchive: . test X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Sep 2016 20:32:36 -0000 Author: mm Date: Wed Sep 14 20:32:34 2016 New Revision: 305816 URL: https://svnweb.freebsd.org/changeset/base/305816 Log: Update vendor/libarchive to git c31379acc9009f5a3bafcfa33d7672a24b3f51f3 Vendor issues fixed (FreeBSD): PR #778: ACL error handling Issue #745: Symlink check prefix optimization is too aggressive Issue #746: Hard links with data can evade sandboxing restrictions This update fixes the vulnerability #3 and vulnerability #4 as reported in the "non-cryptanalytic attacks against FreeBSD update components". https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f Vulnerability #2 has already been fixed in r304866 Modified: vendor/libarchive/dist/libarchive/archive_platform.h vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c vendor/libarchive/dist/libarchive/archive_read_disk_posix.c vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c vendor/libarchive/dist/libarchive/archive_write_disk_acl.c vendor/libarchive/dist/libarchive/archive_write_disk_posix.c vendor/libarchive/dist/libarchive/test/test_write_disk_secure745.c vendor/libarchive/dist/libarchive/test/test_write_disk_secure746.c vendor/libarchive/dist/libarchive/test/test_write_format_gnutar_filenames.c Modified: vendor/libarchive/dist/libarchive/archive_platform.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_platform.h Wed Sep 14 18:22:12 2016 (r305815) +++ vendor/libarchive/dist/libarchive/archive_platform.h Wed Sep 14 20:32:34 2016 (r305816) @@ -159,6 +159,15 @@ #define CAN_RESTORE_METADATA_FD #endif +/* + * glibc 2.24 deprecates readdir_r + */ +#if defined(HAVE_READDIR_R) && (!defined(__GLIBC__) || !defined(__GLIBC_MINOR__) || __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 24)) +#define USE_READDIR_R 1 +#else +#undef USE_READDIR_R +#endif + /* Set up defaults for internal error codes. */ #ifndef ARCHIVE_ERRNO_FILE_FORMAT #if HAVE_EFTYPE Modified: vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Wed Sep 14 18:22:12 2016 (r305815) +++ vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Wed Sep 14 20:32:34 2016 (r305816) @@ -411,9 +411,7 @@ setup_acls(struct archive_read_disk *a, { const char *accpath; acl_t acl; -#if HAVE_ACL_IS_TRIVIAL_NP int r; -#endif accpath = archive_entry_sourcepath(entry); if (accpath == NULL) @@ -473,9 +471,13 @@ setup_acls(struct archive_read_disk *a, } #endif if (acl != NULL) { - translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_NFS4); + r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_NFS4); acl_free(acl); - return (ARCHIVE_OK); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, errno, + "Couldn't translate NFSv4 ACLs: %s", accpath); + } + return (r); } #endif /* ACL_TYPE_NFS4 */ @@ -506,19 +508,30 @@ setup_acls(struct archive_read_disk *a, #endif if (acl != NULL) { - translate_acl(a, entry, acl, + r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_ACCESS); acl_free(acl); acl = NULL; + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, errno, + "Couldn't translate access ACLs: %s", accpath); + return (r); + } } /* Only directories can have default ACLs. */ if (S_ISDIR(archive_entry_mode(entry))) { acl = acl_get_file(accpath, ACL_TYPE_DEFAULT); if (acl != NULL) { - translate_acl(a, entry, acl, + r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_DEFAULT); acl_free(acl); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, errno, + "Couldn't translate default ACLs: %s", + accpath); + return (r); + } } } return (ARCHIVE_OK); @@ -574,12 +587,12 @@ translate_acl(struct archive_read_disk * #ifdef ACL_TYPE_NFS4 acl_entry_type_t acl_type; acl_flagset_t acl_flagset; - int brand, r; + int brand; #endif acl_entry_t acl_entry; acl_permset_t acl_permset; int i, entry_acl_type; - int s, ae_id, ae_tag, ae_perm; + int r, s, ae_id, ae_tag, ae_perm; const char *ae_name; @@ -587,7 +600,11 @@ translate_acl(struct archive_read_disk * // FreeBSD "brands" ACLs as POSIX.1e or NFSv4 // Make sure the "brand" on this ACL is consistent // with the default_entry_acl_type bits provided. - acl_get_brand_np(acl, &brand); + if (acl_get_brand_np(acl, &brand) != 0) { + archive_set_error(&a->archive, errno, + "Failed to read ACL brand"); + return (ARCHIVE_WARN); + } switch (brand) { case ACL_BRAND_POSIX: switch (default_entry_acl_type) { @@ -595,31 +612,43 @@ translate_acl(struct archive_read_disk * case ARCHIVE_ENTRY_ACL_TYPE_DEFAULT: break; default: - // XXX set warning message? - return ARCHIVE_FAILED; + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Invalid ACL entry type for POSIX.1e ACL"); + return (ARCHIVE_WARN); } break; case ACL_BRAND_NFS4: if (default_entry_acl_type & ~ARCHIVE_ENTRY_ACL_TYPE_NFS4) { - // XXX set warning message? - return ARCHIVE_FAILED; + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Invalid ACL entry type for NFSv4 ACL"); + return (ARCHIVE_WARN); } break; default: - // XXX set warning message? - return ARCHIVE_FAILED; + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Unknown ACL brand"); + return (ARCHIVE_WARN); break; } #endif s = acl_get_entry(acl, ACL_FIRST_ENTRY, &acl_entry); + if (s == -1) { + archive_set_error(&a->archive, errno, + "Failed to get first ACL entry"); + return (ARCHIVE_WARN); + } while (s == 1) { ae_id = -1; ae_name = NULL; ae_perm = 0; - acl_get_tag_type(acl_entry, &acl_tag); + if (acl_get_tag_type(acl_entry, &acl_tag) != 0) { + archive_set_error(&a->archive, errno, + "Failed to get ACL tag type"); + return (ARCHIVE_WARN); + } switch (acl_tag) { case ACL_USER: ae_id = (int)*(uid_t *)acl_get_qualifier(acl_entry); @@ -654,13 +683,18 @@ translate_acl(struct archive_read_disk * continue; } - // XXX acl type maps to allow/deny/audit/YYYY bits - // XXX acl_get_entry_type_np on FreeBSD returns EINVAL for - // non-NFSv4 ACLs + // XXX acl_type maps to allow/deny/audit/YYYY bits entry_acl_type = default_entry_acl_type; #ifdef ACL_TYPE_NFS4 - r = acl_get_entry_type_np(acl_entry, &acl_type); - if (r == 0) { + if (default_entry_acl_type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + /* + * acl_get_entry_type_np() falis with non-NFSv4 ACLs + */ + if (acl_get_entry_type_np(acl_entry, &acl_type) != 0) { + archive_set_error(&a->archive, errno, "Failed " + "to get ACL type from a NFSv4 ACL entry"); + return (ARCHIVE_WARN); + } switch (acl_type) { case ACL_ENTRY_TYPE_ALLOW: entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ALLOW; @@ -674,32 +708,53 @@ translate_acl(struct archive_read_disk * case ACL_ENTRY_TYPE_ALARM: entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ALARM; break; + default: + archive_set_error(&a->archive, errno, + "Invalid NFSv4 ACL entry type"); + return (ARCHIVE_WARN); } - } - /* - * Libarchive stores "flag" (NFSv4 inheritance bits) - * in the ae_perm bitmap. - */ - // XXX acl_get_flagset_np on FreeBSD returns EINVAL for - // non-NFSv4 ACLs - r = acl_get_flagset_np(acl_entry, &acl_flagset); - if (r == 0) { + /* + * Libarchive stores "flag" (NFSv4 inheritance bits) + * in the ae_perm bitmap. + * + * acl_get_flagset_np() fails with non-NFSv4 ACLs + */ + if (acl_get_flagset_np(acl_entry, &acl_flagset) != 0) { + archive_set_error(&a->archive, errno, + "Failed to get flagset from a NFSv4 ACL entry"); + return (ARCHIVE_WARN); + } for (i = 0; i < (int)(sizeof(acl_inherit_map) / sizeof(acl_inherit_map[0])); ++i) { - if (acl_get_flag_np(acl_flagset, - acl_inherit_map[i].platform_inherit)) + r = acl_get_flag_np(acl_flagset, + acl_inherit_map[i].platform_inherit); + if (r == -1) { + archive_set_error(&a->archive, errno, + "Failed to check flag in a NFSv4 " + "ACL flagset"); + return (ARCHIVE_WARN); + } else if (r) ae_perm |= acl_inherit_map[i].archive_inherit; } } #endif - acl_get_permset(acl_entry, &acl_permset); + if (acl_get_permset(acl_entry, &acl_permset) != 0) { + archive_set_error(&a->archive, errno, + "Failed to get ACL permission set"); + return (ARCHIVE_WARN); + } for (i = 0; i < (int)(sizeof(acl_perm_map) / sizeof(acl_perm_map[0])); ++i) { /* * acl_get_perm() is spelled differently on different * platforms; see above. */ - if (ACL_GET_PERM(acl_permset, acl_perm_map[i].platform_perm)) + r = ACL_GET_PERM(acl_permset, acl_perm_map[i].platform_perm); + if (r == -1) { + archive_set_error(&a->archive, errno, + "Failed to check permission in an ACL permission set"); + return (ARCHIVE_WARN); + } else if (r) ae_perm |= acl_perm_map[i].archive_perm; } @@ -708,6 +763,11 @@ translate_acl(struct archive_read_disk * ae_id, ae_name); s = acl_get_entry(acl, ACL_NEXT_ENTRY, &acl_entry); + if (s == -1) { + archive_set_error(&a->archive, errno, + "Failed to get next ACL entry"); + return (ARCHIVE_WARN); + } } return (ARCHIVE_OK); } Modified: vendor/libarchive/dist/libarchive/archive_read_disk_posix.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_disk_posix.c Wed Sep 14 18:22:12 2016 (r305815) +++ vendor/libarchive/dist/libarchive/archive_read_disk_posix.c Wed Sep 14 20:32:34 2016 (r305816) @@ -165,7 +165,7 @@ struct filesystem { int synthetic; int remote; int noatime; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) size_t name_max; #endif long incr_xfer_size; @@ -200,7 +200,7 @@ struct tree { DIR *d; #define INVALID_DIR_HANDLE NULL struct dirent *de; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) struct dirent *dirent; size_t dirent_allocated; #endif @@ -1592,7 +1592,7 @@ setup_current_filesystem(struct archive_ #endif t->current_filesystem->noatime = 0; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) /* Set maximum filename length. */ #if defined(HAVE_STRUCT_STATFS_F_NAMEMAX) t->current_filesystem->name_max = sfs.f_namemax; @@ -1615,7 +1615,7 @@ setup_current_filesystem(struct archive_ else t->current_filesystem->name_max = nm; #endif -#endif /* HAVE_READDIR_R */ +#endif /* USE_READDIR_R */ return (ARCHIVE_OK); } @@ -1817,7 +1817,7 @@ setup_current_filesystem(struct archive_ #endif t->current_filesystem->noatime = 0; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) /* Set maximum filename length. */ t->current_filesystem->name_max = sfs.f_namelen; #endif @@ -1901,7 +1901,7 @@ setup_current_filesystem(struct archive_ #endif t->current_filesystem->noatime = 0; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) /* Set maximum filename length. */ t->current_filesystem->name_max = sfs.f_namemax; #endif @@ -1918,7 +1918,7 @@ static int setup_current_filesystem(struct archive_read_disk *a) { struct tree *t = a->tree; -#if defined(_PC_NAME_MAX) && defined(HAVE_READDIR_R) +#if defined(_PC_NAME_MAX) && defined(USE_READDIR_R) long nm; #endif t->current_filesystem->synthetic = -1;/* Not supported */ @@ -1930,7 +1930,7 @@ setup_current_filesystem(struct archive_ t->current_filesystem->min_xfer_size = -1; t->current_filesystem->incr_xfer_size = -1; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) /* Set maximum filename length. */ # if defined(_PC_NAME_MAX) if (tree_current_is_symblic_link_target(t)) { @@ -1958,7 +1958,7 @@ setup_current_filesystem(struct archive_ else t->current_filesystem->name_max = nm; # endif /* _PC_NAME_MAX */ -#endif /* HAVE_READDIR_R */ +#endif /* USE_READDIR_R */ return (ARCHIVE_OK); } @@ -2366,7 +2366,7 @@ tree_dir_next_posix(struct tree *t) size_t namelen; if (t->d == NULL) { -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) size_t dirent_size; #endif @@ -2387,7 +2387,7 @@ tree_dir_next_posix(struct tree *t) t->visit_type = r != 0 ? r : TREE_ERROR_DIR; return (t->visit_type); } -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) dirent_size = offsetof(struct dirent, d_name) + t->filesystem_table[t->current->filesystem_id].name_max + 1; if (t->dirent == NULL || t->dirent_allocated < dirent_size) { @@ -2404,11 +2404,11 @@ tree_dir_next_posix(struct tree *t) } t->dirent_allocated = dirent_size; } -#endif /* HAVE_READDIR_R */ +#endif /* USE_READDIR_R */ } for (;;) { errno = 0; -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) r = readdir_r(t->d, t->dirent, &t->de); #ifdef _AIX /* Note: According to the man page, return value 9 indicates @@ -2660,7 +2660,7 @@ tree_free(struct tree *t) if (t == NULL) return; archive_string_free(&t->path); -#if defined(HAVE_READDIR_R) +#if defined(USE_READDIR_R) free(t->dirent); #endif free(t->sparse_list); Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c Wed Sep 14 18:22:12 2016 (r305815) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c Wed Sep 14 20:32:34 2016 (r305816) @@ -136,6 +136,7 @@ struct tar { int64_t entry_padding; int64_t entry_bytes_unconsumed; int64_t realsize; + int sparse_allowed; struct sparse_block *sparse_list; struct sparse_block *sparse_last; int64_t sparse_offset; @@ -1271,6 +1272,14 @@ header_common(struct archive_read *a, st * sparse information in the extended area. */ /* FALLTHROUGH */ + case '0': + /* + * Enable sparse file "read" support only for regular + * files and explicit GNU sparse files. However, we + * don't allow non-standard file types to be sparse. + */ + tar->sparse_allowed = 1; + /* FALLTHROUGH */ default: /* Regular file and non-standard types */ /* * Per POSIX: non-recognized types should always be @@ -1728,6 +1737,14 @@ pax_attribute(struct archive_read *a, st * NULL pointer to strlen(). */ switch (key[0]) { case 'G': + /* Reject GNU.sparse.* headers on non-regular files. */ + if (strncmp(key, "GNU.sparse", 10) == 0 && + !tar->sparse_allowed) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Non-regular file cannot be sparse"); + return (ARCHIVE_FATAL); + } + /* GNU "0.0" sparse pax format. */ if (strcmp(key, "GNU.sparse.numblocks") == 0) { tar->sparse_offset = -1; Modified: vendor/libarchive/dist/libarchive/archive_write_disk_acl.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk_acl.c Wed Sep 14 18:22:12 2016 (r305815) +++ vendor/libarchive/dist/libarchive/archive_write_disk_acl.c Wed Sep 14 20:32:34 2016 (r305816) @@ -153,9 +153,19 @@ set_acl(struct archive *a, int fd, const if (entries == 0) return (ARCHIVE_OK); acl = acl_init(entries); + if (acl == (acl_t)NULL) { + archive_set_error(a, errno, + "Failed to initialize ACL working storage"); + return (ARCHIVE_FAILED); + } while (archive_acl_next(a, abstract_acl, ae_requested_type, &ae_type, &ae_permset, &ae_tag, &ae_id, &ae_name) == ARCHIVE_OK) { - acl_create_entry(&acl, &acl_entry); + if (acl_create_entry(&acl, &acl_entry) != 0) { + archive_set_error(a, errno, + "Failed to create a new ACL entry"); + ret = ARCHIVE_FAILED; + goto exit_free; + } switch (ae_tag) { case ARCHIVE_ENTRY_ACL_USER: @@ -186,53 +196,96 @@ set_acl(struct archive *a, int fd, const break; #endif default: - /* XXX */ - break; + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Unknown ACL tag"); + ret = ARCHIVE_FAILED; + goto exit_free; } #ifdef ACL_TYPE_NFS4 + r = 0; switch (ae_type) { case ARCHIVE_ENTRY_ACL_TYPE_ALLOW: - acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALLOW); + r = acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALLOW); break; case ARCHIVE_ENTRY_ACL_TYPE_DENY: - acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_DENY); + r = acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_DENY); break; case ARCHIVE_ENTRY_ACL_TYPE_AUDIT: - acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_AUDIT); + r = acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_AUDIT); break; case ARCHIVE_ENTRY_ACL_TYPE_ALARM: - acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALARM); + r = acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALARM); break; case ARCHIVE_ENTRY_ACL_TYPE_ACCESS: case ARCHIVE_ENTRY_ACL_TYPE_DEFAULT: // These don't translate directly into the system ACL. break; default: - // XXX error handling here. - break; + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Unknown ACL entry type"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (r != 0) { + archive_set_error(a, errno, + "Failed to set ACL entry type"); + ret = ARCHIVE_FAILED; + goto exit_free; } #endif - acl_get_permset(acl_entry, &acl_permset); - acl_clear_perms(acl_permset); + if (acl_get_permset(acl_entry, &acl_permset) != 0) { + archive_set_error(a, errno, + "Failed to get ACL permission set"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (acl_clear_perms(acl_permset) != 0) { + archive_set_error(a, errno, + "Failed to clear ACL permissions"); + ret = ARCHIVE_FAILED; + goto exit_free; + } for (i = 0; i < (int)(sizeof(acl_perm_map) / sizeof(acl_perm_map[0])); ++i) { if (ae_permset & acl_perm_map[i].archive_perm) - acl_add_perm(acl_permset, - acl_perm_map[i].platform_perm); + if (acl_add_perm(acl_permset, + acl_perm_map[i].platform_perm) != 0) { + archive_set_error(a, errno, + "Failed to add ACL permission"); + ret = ARCHIVE_FAILED; + goto exit_free; + } } #ifdef ACL_TYPE_NFS4 - // XXX acl_get_flagset_np on FreeBSD returns EINVAL for - // non-NFSv4 ACLs - r = acl_get_flagset_np(acl_entry, &acl_flagset); - if (r == 0) { - acl_clear_flags_np(acl_flagset); + if (acl_type == ACL_TYPE_NFS4) { + /* + * acl_get_flagset_np() fails with non-NFSv4 ACLs + */ + if (acl_get_flagset_np(acl_entry, &acl_flagset) != 0) { + archive_set_error(a, errno, + "Failed to get flagset from an NFSv4 ACL entry"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (acl_clear_flags_np(acl_flagset) != 0) { + archive_set_error(a, errno, + "Failed to clear flags from an NFSv4 ACL flagset"); + ret = ARCHIVE_FAILED; + goto exit_free; + } for (i = 0; i < (int)(sizeof(acl_inherit_map) / sizeof(acl_inherit_map[0])); ++i) { - if (ae_permset & acl_inherit_map[i].archive_inherit) - acl_add_flag_np(acl_flagset, - acl_inherit_map[i].platform_inherit); + if (ae_permset & acl_inherit_map[i].archive_inherit) { + if (acl_add_flag_np(acl_flagset, + acl_inherit_map[i].platform_inherit) != 0) { + archive_set_error(a, errno, + "Failed to add flag to NFSv4 ACL flagset"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + } } } #endif @@ -262,6 +315,7 @@ set_acl(struct archive *a, int fd, const ret = ARCHIVE_WARN; } #endif +exit_free: acl_free(acl); return (ret); } Modified: vendor/libarchive/dist/libarchive/archive_write_disk_posix.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk_posix.c Wed Sep 14 18:22:12 2016 (r305815) +++ vendor/libarchive/dist/libarchive/archive_write_disk_posix.c Wed Sep 14 20:32:34 2016 (r305816) @@ -140,7 +140,17 @@ __FBSDID("$FreeBSD$"); #define O_BINARY 0 #endif #ifndef O_CLOEXEC -#define O_CLOEXEC 0 +#define O_CLOEXEC 0 +#endif + +/* Ignore non-int O_NOFOLLOW constant. */ +/* gnulib's fcntl.h does this on AIX, but it seems practical everywhere */ +#if defined O_NOFOLLOW && !(INT_MIN <= O_NOFOLLOW && O_NOFOLLOW <= INT_MAX) +#undef O_NOFOLLOW +#endif + +#ifndef O_NOFOLLOW +#define O_NOFOLLOW 0 #endif struct fixup_entry { @@ -326,12 +336,14 @@ struct archive_write_disk { #define HFS_BLOCKS(s) ((s) >> 12) +static int check_symlinks_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags); static int check_symlinks(struct archive_write_disk *); static int create_filesystem_object(struct archive_write_disk *); static struct fixup_entry *current_fixup(struct archive_write_disk *, const char *pathname); #if defined(HAVE_FCHDIR) && defined(PATH_MAX) static void edit_deep_directories(struct archive_write_disk *ad); #endif +static int cleanup_pathname_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags); static int cleanup_pathname(struct archive_write_disk *); static int create_dir(struct archive_write_disk *, char *); static int create_parent_dir(struct archive_write_disk *, char *); @@ -2014,6 +2026,10 @@ create_filesystem_object(struct archive_ const char *linkname; mode_t final_mode, mode; int r; + /* these for check_symlinks_fsobj */ + char *linkname_copy; /* non-const copy of linkname */ + struct archive_string error_string; + int error_number; /* We identify hard/symlinks according to the link names. */ /* Since link(2) and symlink(2) don't handle modes, we're done here. */ @@ -2022,6 +2038,27 @@ create_filesystem_object(struct archive_ #if !HAVE_LINK return (EPERM); #else + archive_string_init(&error_string); + linkname_copy = strdup(linkname); + if (linkname_copy == NULL) { + return (EPERM); + } + /* TODO: consider using the cleaned-up path as the link target? */ + r = cleanup_pathname_fsobj(linkname_copy, &error_number, &error_string, a->flags); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, error_number, "%s", error_string.s); + free(linkname_copy); + /* EPERM is more appropriate than error_number for our callers */ + return (EPERM); + } + r = check_symlinks_fsobj(linkname_copy, &error_number, &error_string, a->flags); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, error_number, "%s", error_string.s); + free(linkname_copy); + /* EPERM is more appropriate than error_number for our callers */ + return (EPERM); + } + free(linkname_copy); r = link(linkname, a->name) ? errno : 0; /* * New cpio and pax formats allow hardlink entries @@ -2040,7 +2077,7 @@ create_filesystem_object(struct archive_ a->deferred = 0; } else if (r == 0 && a->filesize > 0) { a->fd = open(a->name, - O_WRONLY | O_TRUNC | O_BINARY | O_CLOEXEC); + O_WRONLY | O_TRUNC | O_BINARY | O_CLOEXEC | O_NOFOLLOW); __archive_ensure_cloexec_flag(a->fd); if (a->fd < 0) r = errno; @@ -2351,126 +2388,233 @@ current_fixup(struct archive_write_disk return (a->current_fixup); } -/* TODO: Make this work. */ -/* - * TODO: The deep-directory support bypasses this; disable deep directory - * support if we're doing symlink checks. - */ /* * TODO: Someday, integrate this with the deep dir support; they both * scan the path and both can be optimized by comparing against other * recent paths. */ /* TODO: Extend this to support symlinks on Windows Vista and later. */ + +/* + * Checks the given path to see if any elements along it are symlinks. Returns + * ARCHIVE_OK if there are none, otherwise puts an error in errmsg. + */ static int -check_symlinks(struct archive_write_disk *a) +check_symlinks_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags) { #if !defined(HAVE_LSTAT) /* Platform doesn't have lstat, so we can't look for symlinks. */ - (void)a; /* UNUSED */ + (void)path; /* UNUSED */ + (void)error_number; /* UNUSED */ + (void)error_string; /* UNUSED */ + (void)flags; /* UNUSED */ return (ARCHIVE_OK); #else - char *pn; + int res = ARCHIVE_OK; + char *tail; + char *head; + int last; char c; int r; struct stat st; + int restore_pwd; + + /* Nothing to do here if name is empty */ + if(path[0] == '\0') + return (ARCHIVE_OK); /* * Guard against symlink tricks. Reject any archive entry whose * destination would be altered by a symlink. - */ - /* Whatever we checked last time doesn't need to be re-checked. */ - pn = a->name; - if (archive_strlen(&(a->path_safe)) > 0) { - char *p = a->path_safe.s; - while ((*pn != '\0') && (*p == *pn)) - ++p, ++pn; - } + * + * Walk the filename in chunks separated by '/'. For each segment: + * - if it doesn't exist, continue + * - if it's symlink, abort or remove it + * - if it's a directory and it's not the last chunk, cd into it + * As we go: + * head points to the current (relative) path + * tail points to the temporary \0 terminating the segment we're currently examining + * c holds what used to be in *tail + * last is 1 if this is the last tail + */ + restore_pwd = open(".", O_RDONLY | O_BINARY | O_CLOEXEC); + __archive_ensure_cloexec_flag(restore_pwd); + if (restore_pwd < 0) + return (ARCHIVE_FATAL); + head = path; + tail = path; + last = 0; + /* TODO: reintroduce a safe cache here? */ /* Skip the root directory if the path is absolute. */ - if(pn == a->name && pn[0] == '/') - ++pn; - c = pn[0]; - /* Keep going until we've checked the entire name. */ - while (pn[0] != '\0' && (pn[0] != '/' || pn[1] != '\0')) { + if(tail == path && tail[0] == '/') + ++tail; + /* Keep going until we've checked the entire name. + * head, tail, path all alias the same string, which is + * temporarily zeroed at tail, so be careful restoring the + * stashed (c=tail[0]) for error messages. + * Exiting the loop with break is okay; continue is not. + */ + while (!last) { + /* Skip the separator we just consumed, plus any adjacent ones */ + while (*tail == '/') + ++tail; /* Skip the next path element. */ - while (*pn != '\0' && *pn != '/') - ++pn; - c = pn[0]; - pn[0] = '\0'; + while (*tail != '\0' && *tail != '/') + ++tail; + /* is this the last path component? */ + last = (tail[0] == '\0') || (tail[0] == '/' && tail[1] == '\0'); + /* temporarily truncate the string here */ + c = tail[0]; + tail[0] = '\0'; /* Check that we haven't hit a symlink. */ - r = lstat(a->name, &st); + r = lstat(head, &st); if (r != 0) { + tail[0] = c; /* We've hit a dir that doesn't exist; stop now. */ if (errno == ENOENT) { break; } else { - /* Note: This effectively disables deep directory + /* Treat any other error as fatal - best to be paranoid here + * Note: This effectively disables deep directory * support when security checks are enabled. * Otherwise, very long pathnames that trigger * an error here could evade the sandbox. * TODO: We could do better, but it would probably * require merging the symlink checks with the * deep-directory editing. */ - return (ARCHIVE_FAILED); + if (error_number) *error_number = errno; + if (error_string) + archive_string_sprintf(error_string, + "Could not stat %s", + path); + res = ARCHIVE_FAILED; + break; + } + } else if (S_ISDIR(st.st_mode)) { + if (!last) { + if (chdir(head) != 0) { + tail[0] = c; + if (error_number) *error_number = errno; + if (error_string) + archive_string_sprintf(error_string, + "Could not chdir %s", + path); + res = (ARCHIVE_FATAL); + break; + } + /* Our view is now from inside this dir: */ + head = tail + 1; } } else if (S_ISLNK(st.st_mode)) { - if (c == '\0') { + if (last) { /* * Last element is symlink; remove it * so we can overwrite it with the * item being extracted. */ - if (unlink(a->name)) { - archive_set_error(&a->archive, errno, - "Could not remove symlink %s", - a->name); - pn[0] = c; - return (ARCHIVE_FAILED); + if (unlink(head)) { + tail[0] = c; + if (error_number) *error_number = errno; + if (error_string) + archive_string_sprintf(error_string, + "Could not remove symlink %s", + path); + res = ARCHIVE_FAILED; + break; } - a->pst = NULL; /* * Even if we did remove it, a warning * is in order. The warning is silly, * though, if we're just replacing one * symlink with another symlink. */ - if (!S_ISLNK(a->mode)) { - archive_set_error(&a->archive, 0, - "Removing symlink %s", - a->name); + tail[0] = c; + /* FIXME: not sure how important this is to restore + if (!S_ISLNK(path)) { + if (error_number) *error_number = 0; + if (error_string) + archive_string_sprintf(error_string, + "Removing symlink %s", + path); } + */ /* Symlink gone. No more problem! */ - pn[0] = c; - return (0); - } else if (a->flags & ARCHIVE_EXTRACT_UNLINK) { + res = ARCHIVE_OK; + break; + } else if (flags & ARCHIVE_EXTRACT_UNLINK) { /* User asked us to remove problems. */ - if (unlink(a->name) != 0) { - archive_set_error(&a->archive, 0, - "Cannot remove intervening symlink %s", - a->name); - pn[0] = c; - return (ARCHIVE_FAILED); + if (unlink(head) != 0) { + tail[0] = c; + if (error_number) *error_number = 0; + if (error_string) + archive_string_sprintf(error_string, + "Cannot remove intervening symlink %s", + path); + res = ARCHIVE_FAILED; + break; } - a->pst = NULL; + tail[0] = c; } else { - archive_set_error(&a->archive, 0, - "Cannot extract through symlink %s", - a->name); - pn[0] = c; - return (ARCHIVE_FAILED); + tail[0] = c; + if (error_number) *error_number = 0; + if (error_string) + archive_string_sprintf(error_string, + "Cannot extract through symlink %s", + path); + res = ARCHIVE_FAILED; + break; } } - pn[0] = c; - if (pn[0] != '\0') - pn++; /* Advance to the next segment. */ - } - pn[0] = c; - /* We've checked and/or cleaned the whole path, so remember it. */ - archive_strcpy(&a->path_safe, a->name); - return (ARCHIVE_OK); + /* be sure to always maintain this */ + tail[0] = c; + if (tail[0] != '\0') + tail++; /* Advance to the next segment. */ + } + /* Catches loop exits via break */ + tail[0] = c; +#ifdef HAVE_FCHDIR + /* If we changed directory above, restore it here. */ + if (restore_pwd >= 0) { + r = fchdir(restore_pwd); + if (r != 0) { + if(error_number) *error_number = errno; + if(error_string) + archive_string_sprintf(error_string, + "chdir() failure"); + } + close(restore_pwd); + restore_pwd = -1; + if (r != 0) { + res = (ARCHIVE_FATAL); + } + } +#endif + /* TODO: reintroduce a safe cache here? */ + return res; #endif } +/* + * Check a->name for symlinks, returning ARCHIVE_OK if its clean, otherwise + * calls archive_set_error and returns ARCHIVE_{FATAL,FAILED} + */ +static int +check_symlinks(struct archive_write_disk *a) +{ + struct archive_string error_string; + int error_number; + int rc; + archive_string_init(&error_string); + rc = check_symlinks_fsobj(a->name, &error_number, &error_string, a->flags); + if (rc != ARCHIVE_OK) { + archive_set_error(&a->archive, error_number, "%s", error_string.s); + } + archive_string_free(&error_string); + a->pst = NULL; /* to be safe */ + return rc; +} + + #if defined(__CYGWIN__) /* * 1. Convert a path separator from '\' to '/' . @@ -2544,15 +2688,17 @@ cleanup_pathname_win(struct archive_writ * is set) if the path is absolute. */ static int -cleanup_pathname(struct archive_write_disk *a) +cleanup_pathname_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags) { char *dest, *src; char separator = '\0'; - dest = src = a->name; + dest = src = path; if (*src == '\0') { - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Invalid empty pathname"); + if (error_number) *error_number = ARCHIVE_ERRNO_MISC; + if (error_string) + archive_string_sprintf(error_string, + "Invalid empty pathname"); return (ARCHIVE_FAILED); } @@ -2561,9 +2707,11 @@ cleanup_pathname(struct archive_write_di #endif /* Skip leading '/'. */ if (*src == '/') { - if (a->flags & ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS) { - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Path is absolute"); + if (flags & ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS) { + if (error_number) *error_number = ARCHIVE_ERRNO_MISC; + if (error_string) + archive_string_sprintf(error_string, + "Path is absolute"); return (ARCHIVE_FAILED); } @@ -2590,10 +2738,11 @@ cleanup_pathname(struct archive_write_di } else if (src[1] == '.') { if (src[2] == '/' || src[2] == '\0') { /* Conditionally warn about '..' */ - if (a->flags & ARCHIVE_EXTRACT_SECURE_NODOTDOT) { - archive_set_error(&a->archive, - ARCHIVE_ERRNO_MISC, - "Path contains '..'"); + if (flags & ARCHIVE_EXTRACT_SECURE_NODOTDOT) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Fri Sep 16 15:19:33 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64C0CBDD01A; Fri, 16 Sep 2016 15:19:33 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11595F6C; Fri, 16 Sep 2016 15:19:33 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8GFJW1o077009; Fri, 16 Sep 2016 15:19:32 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8GFJWin077006; Fri, 16 Sep 2016 15:19:32 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609161519.u8GFJWin077006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 16 Sep 2016 15:19:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305888 - in vendor/cortex-strings: . dist dist/autom4te.cache dist/benchmarks dist/benchmarks/dhry dist/benchmarks/dhry/.deps dist/benchmarks/multi dist/benchmarks/multi/.deps dist/ref... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2016 15:19:33 -0000 Author: andrew Date: Fri Sep 16 15:19:31 2016 New Revision: 305888 URL: https://svnweb.freebsd.org/changeset/base/305888 Log: Import the Linaro Cortex Strings library from https://git.linaro.org/toolchain/cortex-strings.git Sponsored by: The FreeBSD Foundation Added: vendor/cortex-strings/ vendor/cortex-strings/dist/ vendor/cortex-strings/dist/.gitignore vendor/cortex-strings/dist/Makefile (contents, props changed) vendor/cortex-strings/dist/Makefile.am (contents, props changed) vendor/cortex-strings/dist/Makefile.in (contents, props changed) vendor/cortex-strings/dist/README vendor/cortex-strings/dist/aclocal.m4 vendor/cortex-strings/dist/autogen.sh (contents, props changed) vendor/cortex-strings/dist/autom4te.cache/ vendor/cortex-strings/dist/autom4te.cache/output.0 vendor/cortex-strings/dist/autom4te.cache/output.1 (contents, props changed) vendor/cortex-strings/dist/autom4te.cache/requests vendor/cortex-strings/dist/autom4te.cache/traces.0 vendor/cortex-strings/dist/autom4te.cache/traces.1 (contents, props changed) vendor/cortex-strings/dist/benchmarks/ vendor/cortex-strings/dist/benchmarks/dhry/ vendor/cortex-strings/dist/benchmarks/dhry/.deps/ vendor/cortex-strings/dist/benchmarks/dhry/.deps/dhry-dhry_1.Po (contents, props changed) vendor/cortex-strings/dist/benchmarks/dhry/.deps/dhry-dhry_2.Po (contents, props changed) vendor/cortex-strings/dist/benchmarks/dhry/.deps/dhry_native-dhry_1.Po (contents, props changed) vendor/cortex-strings/dist/benchmarks/dhry/.deps/dhry_native-dhry_2.Po (contents, props changed) vendor/cortex-strings/dist/benchmarks/dhry/dhry.h (contents, props changed) vendor/cortex-strings/dist/benchmarks/dhry/dhry_1.c (contents, props changed) vendor/cortex-strings/dist/benchmarks/dhry/dhry_2.c (contents, props changed) vendor/cortex-strings/dist/benchmarks/multi/ vendor/cortex-strings/dist/benchmarks/multi/.deps/ vendor/cortex-strings/dist/benchmarks/multi/.deps/.dirstamp vendor/cortex-strings/dist/benchmarks/multi/.deps/libmulti_a-harness.Po (contents, props changed) vendor/cortex-strings/dist/benchmarks/multi/.dirstamp vendor/cortex-strings/dist/benchmarks/multi/harness.c (contents, props changed) vendor/cortex-strings/dist/compile (contents, props changed) vendor/cortex-strings/dist/config.guess (contents, props changed) vendor/cortex-strings/dist/config.h (contents, props changed) vendor/cortex-strings/dist/config.h.in (contents, props changed) vendor/cortex-strings/dist/config.log vendor/cortex-strings/dist/config.status (contents, props changed) vendor/cortex-strings/dist/config.sub (contents, props changed) vendor/cortex-strings/dist/configure (contents, props changed) vendor/cortex-strings/dist/configure.ac vendor/cortex-strings/dist/depcomp (contents, props changed) vendor/cortex-strings/dist/install-sh (contents, props changed) vendor/cortex-strings/dist/libtool (contents, props changed) vendor/cortex-strings/dist/ltmain.sh (contents, props changed) vendor/cortex-strings/dist/missing (contents, props changed) vendor/cortex-strings/dist/reference/ vendor/cortex-strings/dist/reference/bionic-a15/ vendor/cortex-strings/dist/reference/bionic-a15/.deps/ vendor/cortex-strings/dist/reference/bionic-a15/.deps/libbionic_a15_a-strlen.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a15/.deps/memcmp.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a15/.deps/memcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a15/.deps/memset.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a15/.deps/strcmp.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a15/.deps/strcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a15/memcmp.S (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a15/memcpy.S (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a15/memset.S (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a15/strcmp.S (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a15/strcpy.S (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a15/strlen.c (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a9/ vendor/cortex-strings/dist/reference/bionic-a9/.deps/ vendor/cortex-strings/dist/reference/bionic-a9/.deps/libbionic_a9_a-strlen.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a9/.deps/memcmp.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a9/.deps/memcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a9/.deps/memset.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a9/.deps/strcmp.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a9/.deps/strcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a9/memcmp.S (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a9/memcpy.S (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a9/memset.S (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a9/strcmp.S (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a9/strcpy.S (contents, props changed) vendor/cortex-strings/dist/reference/bionic-a9/strlen.c (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/ vendor/cortex-strings/dist/reference/bionic-c/.deps/ vendor/cortex-strings/dist/reference/bionic-c/.deps/.dirstamp vendor/cortex-strings/dist/reference/bionic-c/.deps/bcopy.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/.deps/memchr.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/.deps/memcmp.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/.deps/memcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/.deps/memset.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/.deps/strchr.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/.deps/strcmp.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/.deps/strcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/.deps/strlen.Po (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/.dirstamp vendor/cortex-strings/dist/reference/bionic-c/bcopy.c (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/memchr.c (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/memcmp.c (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/memcpy.c (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/memset.c (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/strchr.c (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/strcmp.c (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/strcpy.c (contents, props changed) vendor/cortex-strings/dist/reference/bionic-c/strlen.c (contents, props changed) vendor/cortex-strings/dist/reference/csl/ vendor/cortex-strings/dist/reference/csl/.deps/ vendor/cortex-strings/dist/reference/csl/.deps/memcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/csl/.deps/memset.Po (contents, props changed) vendor/cortex-strings/dist/reference/csl/arm_asm.h (contents, props changed) vendor/cortex-strings/dist/reference/csl/memcpy.c (contents, props changed) vendor/cortex-strings/dist/reference/csl/memset.c (contents, props changed) vendor/cortex-strings/dist/reference/glibc/ vendor/cortex-strings/dist/reference/glibc-c/ vendor/cortex-strings/dist/reference/glibc-c/.deps/ vendor/cortex-strings/dist/reference/glibc-c/.deps/.dirstamp vendor/cortex-strings/dist/reference/glibc-c/.deps/memchr.Po (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/.deps/memcmp.Po (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/.deps/memcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/.deps/memset.Po (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/.deps/strchr.Po (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/.deps/strcmp.Po (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/.deps/strcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/.deps/strlen.Po (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/.deps/wordcopy.Po (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/.dirstamp vendor/cortex-strings/dist/reference/glibc-c/memchr.c (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/memcmp.c (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/memcopy.h (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/memcpy.c (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/memset.c (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/pagecopy.h (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/strchr.c (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/strcmp.c (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/strcpy.c (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/strlen.c (contents, props changed) vendor/cortex-strings/dist/reference/glibc-c/wordcopy.c (contents, props changed) vendor/cortex-strings/dist/reference/glibc/.deps/ vendor/cortex-strings/dist/reference/glibc/.deps/memcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/glibc/.deps/memset.Po (contents, props changed) vendor/cortex-strings/dist/reference/glibc/.deps/strchr.Po (contents, props changed) vendor/cortex-strings/dist/reference/glibc/.deps/strlen.Po (contents, props changed) vendor/cortex-strings/dist/reference/glibc/memcpy.S (contents, props changed) vendor/cortex-strings/dist/reference/glibc/memset.S (contents, props changed) vendor/cortex-strings/dist/reference/glibc/strchr.S (contents, props changed) vendor/cortex-strings/dist/reference/glibc/strlen.S (contents, props changed) vendor/cortex-strings/dist/reference/helpers/ vendor/cortex-strings/dist/reference/helpers/bounce.c (contents, props changed) vendor/cortex-strings/dist/reference/helpers/spawn.c (contents, props changed) vendor/cortex-strings/dist/reference/newlib/ vendor/cortex-strings/dist/reference/newlib-c/ vendor/cortex-strings/dist/reference/newlib-c/.deps/ vendor/cortex-strings/dist/reference/newlib-c/.deps/memchr.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib-c/.deps/memcmp.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib-c/.deps/memcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib-c/.deps/memset.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib-c/.deps/strchr.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib-c/.deps/strcmp.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib-c/.deps/strcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib-c/.deps/strlen.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib-c/memchr.c (contents, props changed) vendor/cortex-strings/dist/reference/newlib-c/memcmp.c (contents, props changed) vendor/cortex-strings/dist/reference/newlib-c/memcpy.c (contents, props changed) vendor/cortex-strings/dist/reference/newlib-c/memset.c (contents, props changed) vendor/cortex-strings/dist/reference/newlib-c/shim.h (contents, props changed) vendor/cortex-strings/dist/reference/newlib-c/strchr.c (contents, props changed) vendor/cortex-strings/dist/reference/newlib-c/strcmp.c (contents, props changed) vendor/cortex-strings/dist/reference/newlib-c/strcpy.c (contents, props changed) vendor/cortex-strings/dist/reference/newlib-c/strlen.c (contents, props changed) vendor/cortex-strings/dist/reference/newlib-xscale/ vendor/cortex-strings/dist/reference/newlib-xscale/.deps/ vendor/cortex-strings/dist/reference/newlib-xscale/.deps/memchr.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib-xscale/.deps/memcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib-xscale/.deps/memset.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib-xscale/.deps/strchr.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib-xscale/.deps/strcmp.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib-xscale/.deps/strcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib-xscale/.deps/strlen.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib-xscale/memchr.c (contents, props changed) vendor/cortex-strings/dist/reference/newlib-xscale/memcpy.c (contents, props changed) vendor/cortex-strings/dist/reference/newlib-xscale/memset.c (contents, props changed) vendor/cortex-strings/dist/reference/newlib-xscale/strchr.c (contents, props changed) vendor/cortex-strings/dist/reference/newlib-xscale/strcmp.c (contents, props changed) vendor/cortex-strings/dist/reference/newlib-xscale/strcpy.c (contents, props changed) vendor/cortex-strings/dist/reference/newlib-xscale/strlen.c (contents, props changed) vendor/cortex-strings/dist/reference/newlib-xscale/xscale.h (contents, props changed) vendor/cortex-strings/dist/reference/newlib/.deps/ vendor/cortex-strings/dist/reference/newlib/.deps/memcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib/.deps/strcmp.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib/.deps/strcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib/.deps/strlen.Po (contents, props changed) vendor/cortex-strings/dist/reference/newlib/arm_asm.h (contents, props changed) vendor/cortex-strings/dist/reference/newlib/memcpy.S (contents, props changed) vendor/cortex-strings/dist/reference/newlib/shim.h (contents, props changed) vendor/cortex-strings/dist/reference/newlib/strcmp.S (contents, props changed) vendor/cortex-strings/dist/reference/newlib/strcpy.c (contents, props changed) vendor/cortex-strings/dist/reference/newlib/strlen.c (contents, props changed) vendor/cortex-strings/dist/reference/plain/ vendor/cortex-strings/dist/reference/plain/.deps/ vendor/cortex-strings/dist/reference/plain/.deps/memcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/plain/.deps/memset.Po (contents, props changed) vendor/cortex-strings/dist/reference/plain/.deps/strcmp.Po (contents, props changed) vendor/cortex-strings/dist/reference/plain/.deps/strcpy.Po (contents, props changed) vendor/cortex-strings/dist/reference/plain/memcpy.c (contents, props changed) vendor/cortex-strings/dist/reference/plain/memset.c (contents, props changed) vendor/cortex-strings/dist/reference/plain/strcmp.c (contents, props changed) vendor/cortex-strings/dist/reference/plain/strcpy.c (contents, props changed) vendor/cortex-strings/dist/scripts/ vendor/cortex-strings/dist/scripts/add-license.sh (contents, props changed) vendor/cortex-strings/dist/scripts/bench.py (contents, props changed) vendor/cortex-strings/dist/scripts/fixup.py (contents, props changed) vendor/cortex-strings/dist/scripts/libplot.py (contents, props changed) vendor/cortex-strings/dist/scripts/plot-align.py (contents, props changed) vendor/cortex-strings/dist/scripts/plot-sizes.py (contents, props changed) vendor/cortex-strings/dist/scripts/plot-top.py (contents, props changed) vendor/cortex-strings/dist/scripts/plot.py (contents, props changed) vendor/cortex-strings/dist/scripts/trim.sh (contents, props changed) vendor/cortex-strings/dist/src/ vendor/cortex-strings/dist/src/aarch64/ vendor/cortex-strings/dist/src/aarch64/.deps/ vendor/cortex-strings/dist/src/aarch64/.deps/memchr.Plo vendor/cortex-strings/dist/src/aarch64/.deps/memcmp.Plo vendor/cortex-strings/dist/src/aarch64/.deps/memcpy.Plo vendor/cortex-strings/dist/src/aarch64/.deps/memmove.Plo vendor/cortex-strings/dist/src/aarch64/.deps/memset.Plo vendor/cortex-strings/dist/src/aarch64/.deps/strchr.Plo vendor/cortex-strings/dist/src/aarch64/.deps/strchrnul.Plo vendor/cortex-strings/dist/src/aarch64/.deps/strcmp.Plo vendor/cortex-strings/dist/src/aarch64/.deps/strcpy.Plo vendor/cortex-strings/dist/src/aarch64/.deps/strlen.Plo vendor/cortex-strings/dist/src/aarch64/.deps/strncmp.Plo vendor/cortex-strings/dist/src/aarch64/.deps/strnlen.Plo vendor/cortex-strings/dist/src/aarch64/memchr.S (contents, props changed) vendor/cortex-strings/dist/src/aarch64/memcmp.S (contents, props changed) vendor/cortex-strings/dist/src/aarch64/memcpy.S (contents, props changed) vendor/cortex-strings/dist/src/aarch64/memmove.S (contents, props changed) vendor/cortex-strings/dist/src/aarch64/memset.S (contents, props changed) vendor/cortex-strings/dist/src/aarch64/strchr.S (contents, props changed) vendor/cortex-strings/dist/src/aarch64/strchrnul.S (contents, props changed) vendor/cortex-strings/dist/src/aarch64/strcmp.S (contents, props changed) vendor/cortex-strings/dist/src/aarch64/strcpy.S (contents, props changed) vendor/cortex-strings/dist/src/aarch64/strlen.S (contents, props changed) vendor/cortex-strings/dist/src/aarch64/strncmp.S (contents, props changed) vendor/cortex-strings/dist/src/aarch64/strnlen.S (contents, props changed) vendor/cortex-strings/dist/src/arm/ vendor/cortex-strings/dist/src/arm/.deps/ vendor/cortex-strings/dist/src/arm/.deps/memchr.Plo vendor/cortex-strings/dist/src/arm/.deps/memcpy.Plo vendor/cortex-strings/dist/src/arm/.deps/memset.Plo vendor/cortex-strings/dist/src/arm/.deps/strchr.Plo vendor/cortex-strings/dist/src/arm/.deps/strcmp.Plo vendor/cortex-strings/dist/src/arm/memchr.S (contents, props changed) vendor/cortex-strings/dist/src/arm/memcpy.S (contents, props changed) vendor/cortex-strings/dist/src/arm/memset.S (contents, props changed) vendor/cortex-strings/dist/src/arm/strchr.S (contents, props changed) vendor/cortex-strings/dist/src/arm/strcmp.S (contents, props changed) vendor/cortex-strings/dist/src/thumb/ vendor/cortex-strings/dist/src/thumb-2/ vendor/cortex-strings/dist/src/thumb-2/.deps/ vendor/cortex-strings/dist/src/thumb-2/.deps/strcpy.Plo vendor/cortex-strings/dist/src/thumb-2/.deps/strlen.Plo vendor/cortex-strings/dist/src/thumb-2/strcpy.c (contents, props changed) vendor/cortex-strings/dist/src/thumb-2/strlen.S (contents, props changed) vendor/cortex-strings/dist/src/thumb/aeabi_idiv.S (contents, props changed) vendor/cortex-strings/dist/src/thumb/strcmp-armv6m.S (contents, props changed) vendor/cortex-strings/dist/stamp-h1 vendor/cortex-strings/dist/test-driver (contents, props changed) vendor/cortex-strings/dist/tests/ vendor/cortex-strings/dist/tests/.deps/ vendor/cortex-strings/dist/tests/.deps/test-strnlen.Po (contents, props changed) vendor/cortex-strings/dist/tests/.deps/tests_test_memchr-test-memchr.Po (contents, props changed) vendor/cortex-strings/dist/tests/.deps/tests_test_memcmp-test-memcmp.Po (contents, props changed) vendor/cortex-strings/dist/tests/.deps/tests_test_memcpy-test-memcpy.Po (contents, props changed) vendor/cortex-strings/dist/tests/.deps/tests_test_memmove-test-memmove.Po (contents, props changed) vendor/cortex-strings/dist/tests/.deps/tests_test_memset-test-memset.Po (contents, props changed) vendor/cortex-strings/dist/tests/.deps/tests_test_strchr-test-strchr.Po (contents, props changed) vendor/cortex-strings/dist/tests/.deps/tests_test_strcmp-test-strcmp.Po (contents, props changed) vendor/cortex-strings/dist/tests/.deps/tests_test_strcpy-test-strcpy.Po (contents, props changed) vendor/cortex-strings/dist/tests/.deps/tests_test_strlen-test-strlen.Po (contents, props changed) vendor/cortex-strings/dist/tests/.deps/tests_test_strncmp-test-strncmp.Po (contents, props changed) vendor/cortex-strings/dist/tests/hp-timing.h (contents, props changed) vendor/cortex-strings/dist/tests/test-memchr.c (contents, props changed) vendor/cortex-strings/dist/tests/test-memcmp.c (contents, props changed) vendor/cortex-strings/dist/tests/test-memcpy.c (contents, props changed) vendor/cortex-strings/dist/tests/test-memmove.c (contents, props changed) vendor/cortex-strings/dist/tests/test-memset.c (contents, props changed) vendor/cortex-strings/dist/tests/test-skeleton.c (contents, props changed) vendor/cortex-strings/dist/tests/test-strchr.c (contents, props changed) vendor/cortex-strings/dist/tests/test-strcmp.c (contents, props changed) vendor/cortex-strings/dist/tests/test-strcpy.c (contents, props changed) vendor/cortex-strings/dist/tests/test-string.h (contents, props changed) vendor/cortex-strings/dist/tests/test-strlen.c (contents, props changed) vendor/cortex-strings/dist/tests/test-strncmp.c (contents, props changed) vendor/cortex-strings/dist/tests/test-strnlen.c (contents, props changed) Added: vendor/cortex-strings/dist/.gitignore ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/cortex-strings/dist/.gitignore Fri Sep 16 15:19:31 2016 (r305888) @@ -0,0 +1,11 @@ +*.a +*.o +*.la +*.lo +*.png +*.pyc +.deps +.dirstamp +.libs +try-* +cache.txt Added: vendor/cortex-strings/dist/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/cortex-strings/dist/Makefile Fri Sep 16 15:19:31 2016 (r305888) @@ -0,0 +1,2797 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# Copyright (c) 2011, Linaro Limited +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of the Linaro nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +# Top level Makefile for cortex-strings + + + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/cortex-strings +pkgincludedir = $(includedir)/cortex-strings +pkglibdir = $(libdir)/cortex-strings +pkglibexecdir = $(libexecdir)/cortex-strings +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = aarch64-none-elf +host_triplet = aarch64-none-elf +check_PROGRAMS = tests/test-memchr$(EXEEXT) tests/test-memcmp$(EXEEXT) \ + tests/test-memcpy$(EXEEXT) tests/test-memmove$(EXEEXT) \ + tests/test-memset$(EXEEXT) tests/test-strchr$(EXEEXT) \ + tests/test-strcmp$(EXEEXT) tests/test-strcpy$(EXEEXT) \ + tests/test-strlen$(EXEEXT) tests/test-strncmp$(EXEEXT) \ + tests/test-strnlen$(EXEEXT) +noinst_PROGRAMS = dhry$(EXEEXT) dhry-native$(EXEEXT) try-none$(EXEEXT) \ + try-this$(EXEEXT) try-plain$(EXEEXT) try-newlib-c$(EXEEXT) \ + try-bionic-c$(EXEEXT) try-glibc-c$(EXEEXT) $(am__EXEEXT_1) + +# Benchmarks and example programs +#am__append_1 = \ +# try-bionic-a9 \ +# try-bionic-a15 \ +# try-csl \ +# try-glibc \ +# try-newlib \ +# try-newlib-xscale + + +# Libraries used in the benchmarks and examples +#am__append_2 = \ +# libbionic-a9.a \ +# libbionic-a15.a \ +# libcsl.a \ +# libglibc.a \ +# libnewlib.a \ +# libnewlib-xscale.a + +#am__append_3 = \ +# -mtune=$(submachine) + +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(am__DIST_COMMON) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libbionic_a15_a_AR = $(AR) $(ARFLAGS) +libbionic_a15_a_LIBADD = +am__libbionic_a15_a_SOURCES_DIST = reference/bionic-a15/memcpy.S \ + reference/bionic-a15/memset.S reference/bionic-a15/memcmp.S \ + reference/bionic-a15/strcmp.S reference/bionic-a15/strcpy.S \ + reference/bionic-a15/strlen.c +am__dirstamp = $(am__leading_dot)dirstamp +#am__objects_1 = reference/bionic-a15/memcpy.$(OBJEXT) \ +# reference/bionic-a15/memset.$(OBJEXT) +#am_libbionic_a15_a_OBJECTS = $(am__objects_1) \ +# reference/bionic-a15/memcmp.$(OBJEXT) \ +# reference/bionic-a15/strcmp.$(OBJEXT) \ +# reference/bionic-a15/strcpy.$(OBJEXT) \ +# reference/bionic-a15/libbionic_a15_a-strlen.$(OBJEXT) +libbionic_a15_a_OBJECTS = $(am_libbionic_a15_a_OBJECTS) +libbionic_a9_a_AR = $(AR) $(ARFLAGS) +libbionic_a9_a_LIBADD = +am__libbionic_a9_a_SOURCES_DIST = reference/bionic-a9/memcpy.S \ + reference/bionic-a9/memset.S reference/bionic-a9/memcmp.S \ + reference/bionic-a9/strcmp.S reference/bionic-a9/strcpy.S \ + reference/bionic-a9/strlen.c +#am__objects_2 = reference/bionic-a9/memcpy.$(OBJEXT) \ +# reference/bionic-a9/memset.$(OBJEXT) +#am_libbionic_a9_a_OBJECTS = $(am__objects_2) \ +# reference/bionic-a9/memcmp.$(OBJEXT) \ +# reference/bionic-a9/strcmp.$(OBJEXT) \ +# reference/bionic-a9/strcpy.$(OBJEXT) \ +# reference/bionic-a9/libbionic_a9_a-strlen.$(OBJEXT) +libbionic_a9_a_OBJECTS = $(am_libbionic_a9_a_OBJECTS) +libbionic_c_a_AR = $(AR) $(ARFLAGS) +libbionic_c_a_LIBADD = +am_libbionic_c_a_OBJECTS = reference/bionic-c/bcopy.$(OBJEXT) \ + reference/bionic-c/memchr.$(OBJEXT) \ + reference/bionic-c/memcmp.$(OBJEXT) \ + reference/bionic-c/memcpy.$(OBJEXT) \ + reference/bionic-c/memset.$(OBJEXT) \ + reference/bionic-c/strchr.$(OBJEXT) \ + reference/bionic-c/strcmp.$(OBJEXT) \ + reference/bionic-c/strcpy.$(OBJEXT) \ + reference/bionic-c/strlen.$(OBJEXT) +libbionic_c_a_OBJECTS = $(am_libbionic_c_a_OBJECTS) +libcsl_a_AR = $(AR) $(ARFLAGS) +libcsl_a_LIBADD = +am__libcsl_a_SOURCES_DIST = reference/csl/memcpy.c \ + reference/csl/memset.c reference/csl/arm_asm.h +#am_libcsl_a_OBJECTS = \ +# reference/csl/memcpy.$(OBJEXT) \ +# reference/csl/memset.$(OBJEXT) +libcsl_a_OBJECTS = $(am_libcsl_a_OBJECTS) +libglibc_c_a_AR = $(AR) $(ARFLAGS) +libglibc_c_a_LIBADD = +am_libglibc_c_a_OBJECTS = reference/glibc-c/memchr.$(OBJEXT) \ + reference/glibc-c/memcmp.$(OBJEXT) \ + reference/glibc-c/memcpy.$(OBJEXT) \ + reference/glibc-c/memset.$(OBJEXT) \ + reference/glibc-c/strchr.$(OBJEXT) \ + reference/glibc-c/strcmp.$(OBJEXT) \ + reference/glibc-c/strcpy.$(OBJEXT) \ + reference/glibc-c/strlen.$(OBJEXT) \ + reference/glibc-c/wordcopy.$(OBJEXT) +libglibc_c_a_OBJECTS = $(am_libglibc_c_a_OBJECTS) +libglibc_a_AR = $(AR) $(ARFLAGS) +libglibc_a_LIBADD = +am__libglibc_a_SOURCES_DIST = reference/glibc/memcpy.S \ + reference/glibc/memset.S reference/glibc/strchr.S \ + reference/glibc/strlen.S +#am_libglibc_a_OBJECTS = \ +# reference/glibc/memcpy.$(OBJEXT) \ +# reference/glibc/memset.$(OBJEXT) \ +# reference/glibc/strchr.$(OBJEXT) \ +# reference/glibc/strlen.$(OBJEXT) +libglibc_a_OBJECTS = $(am_libglibc_a_OBJECTS) +libmulti_a_AR = $(AR) $(ARFLAGS) +libmulti_a_LIBADD = +am_libmulti_a_OBJECTS = benchmarks/multi/libmulti_a-harness.$(OBJEXT) +libmulti_a_OBJECTS = $(am_libmulti_a_OBJECTS) +libnewlib_c_a_AR = $(AR) $(ARFLAGS) +libnewlib_c_a_LIBADD = +am_libnewlib_c_a_OBJECTS = reference/newlib-c/memchr.$(OBJEXT) \ + reference/newlib-c/memcmp.$(OBJEXT) \ + reference/newlib-c/memcpy.$(OBJEXT) \ + reference/newlib-c/memset.$(OBJEXT) \ + reference/newlib-c/strchr.$(OBJEXT) \ + reference/newlib-c/strcmp.$(OBJEXT) \ + reference/newlib-c/strcpy.$(OBJEXT) \ + reference/newlib-c/strlen.$(OBJEXT) +libnewlib_c_a_OBJECTS = $(am_libnewlib_c_a_OBJECTS) +libnewlib_xscale_a_AR = $(AR) $(ARFLAGS) +libnewlib_xscale_a_LIBADD = +am__libnewlib_xscale_a_SOURCES_DIST = \ + reference/newlib-xscale/memchr.c \ + reference/newlib-xscale/memcpy.c \ + reference/newlib-xscale/memset.c \ + reference/newlib-xscale/strchr.c \ + reference/newlib-xscale/strcmp.c \ + reference/newlib-xscale/strcpy.c \ + reference/newlib-xscale/strlen.c \ + reference/newlib-xscale/xscale.h +#am_libnewlib_xscale_a_OBJECTS = \ +# reference/newlib-xscale/memchr.$(OBJEXT) \ +# reference/newlib-xscale/memcpy.$(OBJEXT) \ +# reference/newlib-xscale/memset.$(OBJEXT) \ +# reference/newlib-xscale/strchr.$(OBJEXT) \ +# reference/newlib-xscale/strcmp.$(OBJEXT) \ +# reference/newlib-xscale/strcpy.$(OBJEXT) \ +# reference/newlib-xscale/strlen.$(OBJEXT) +libnewlib_xscale_a_OBJECTS = $(am_libnewlib_xscale_a_OBJECTS) +libnewlib_a_AR = $(AR) $(ARFLAGS) +libnewlib_a_LIBADD = +am__libnewlib_a_SOURCES_DIST = reference/newlib/memcpy.S \ + reference/newlib/strcmp.S reference/newlib/strcpy.c \ + reference/newlib/strlen.c reference/newlib/arm_asm.h \ + reference/newlib/shim.h +#am_libnewlib_a_OBJECTS = \ +# reference/newlib/memcpy.$(OBJEXT) \ +# reference/newlib/strcmp.$(OBJEXT) \ +# reference/newlib/strcpy.$(OBJEXT) \ +# reference/newlib/strlen.$(OBJEXT) +libnewlib_a_OBJECTS = $(am_libnewlib_a_OBJECTS) +libplain_a_AR = $(AR) $(ARFLAGS) +libplain_a_LIBADD = +am_libplain_a_OBJECTS = reference/plain/memset.$(OBJEXT) \ + reference/plain/memcpy.$(OBJEXT) \ + reference/plain/strcmp.$(OBJEXT) \ + reference/plain/strcpy.$(OBJEXT) +libplain_a_OBJECTS = $(am_libplain_a_OBJECTS) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +libcortex_strings_la_LIBADD = +am__libcortex_strings_la_SOURCES_DIST = src/thumb-2/strcpy.c \ + src/arm/memchr.S src/arm/strchr.S src/thumb-2/strlen.S \ + src/arm/memset.S src/arm/memcpy.S src/arm/strcmp.S \ + src/aarch64/memchr.S src/aarch64/memcmp.S src/aarch64/memcpy.S \ + src/aarch64/memmove.S src/aarch64/memset.S \ + src/aarch64/strchr.S src/aarch64/strchrnul.S \ + src/aarch64/strcmp.S src/aarch64/strcpy.S src/aarch64/strlen.S \ + src/aarch64/strncmp.S src/aarch64/strnlen.S +am_libcortex_strings_la_OBJECTS = \ + src/aarch64/memchr.lo \ + src/aarch64/memcmp.lo \ + src/aarch64/memcpy.lo \ + src/aarch64/memmove.lo \ + src/aarch64/memset.lo \ + src/aarch64/strchr.lo \ + src/aarch64/strchrnul.lo \ + src/aarch64/strcmp.lo \ + src/aarch64/strcpy.lo \ + src/aarch64/strlen.lo \ + src/aarch64/strncmp.lo \ + src/aarch64/strnlen.lo +#am_libcortex_strings_la_OBJECTS = \ +# src/thumb-2/strcpy.lo src/arm/memchr.lo \ +# src/arm/strchr.lo src/thumb-2/strlen.lo \ +# src/arm/memset.lo src/arm/memcpy.lo \ +# src/arm/strcmp.lo +libcortex_strings_la_OBJECTS = $(am_libcortex_strings_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am__v_lt_1 = +libcortex_strings_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libcortex_strings_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +#am__EXEEXT_1 = try-bionic-a9$(EXEEXT) \ +# try-bionic-a15$(EXEEXT) try-csl$(EXEEXT) \ +# try-glibc$(EXEEXT) try-newlib$(EXEEXT) \ +# try-newlib-xscale$(EXEEXT) +PROGRAMS = $(noinst_PROGRAMS) +am_dhry_OBJECTS = benchmarks/dhry/dhry-dhry_1.$(OBJEXT) \ + benchmarks/dhry/dhry-dhry_2.$(OBJEXT) +dhry_OBJECTS = $(am_dhry_OBJECTS) +dhry_DEPENDENCIES = libcortex-strings.la +dhry_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(dhry_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_3 = benchmarks/dhry/dhry_native-dhry_1.$(OBJEXT) \ + benchmarks/dhry/dhry_native-dhry_2.$(OBJEXT) +am_dhry_native_OBJECTS = $(am__objects_3) +dhry_native_OBJECTS = $(am_dhry_native_OBJECTS) +dhry_native_LDADD = $(LDADD) +dhry_native_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(dhry_native_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +tests_test_memchr_SOURCES = tests/test-memchr.c +tests_test_memchr_OBJECTS = \ + tests/tests_test_memchr-test-memchr.$(OBJEXT) +tests_test_memchr_DEPENDENCIES = $(tests_ldadd) +tests_test_memchr_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(tests_test_memchr_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +tests_test_memcmp_SOURCES = tests/test-memcmp.c +tests_test_memcmp_OBJECTS = \ + tests/tests_test_memcmp-test-memcmp.$(OBJEXT) +tests_test_memcmp_DEPENDENCIES = $(tests_ldadd) +tests_test_memcmp_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(tests_test_memcmp_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +tests_test_memcpy_SOURCES = tests/test-memcpy.c +tests_test_memcpy_OBJECTS = \ + tests/tests_test_memcpy-test-memcpy.$(OBJEXT) +tests_test_memcpy_DEPENDENCIES = $(tests_ldadd) +tests_test_memcpy_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(tests_test_memcpy_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +tests_test_memmove_SOURCES = tests/test-memmove.c +tests_test_memmove_OBJECTS = \ + tests/tests_test_memmove-test-memmove.$(OBJEXT) +tests_test_memmove_DEPENDENCIES = $(tests_ldadd) +tests_test_memmove_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(tests_test_memmove_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +tests_test_memset_SOURCES = tests/test-memset.c +tests_test_memset_OBJECTS = \ + tests/tests_test_memset-test-memset.$(OBJEXT) +tests_test_memset_DEPENDENCIES = $(tests_ldadd) +tests_test_memset_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(tests_test_memset_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +tests_test_strchr_SOURCES = tests/test-strchr.c +tests_test_strchr_OBJECTS = \ + tests/tests_test_strchr-test-strchr.$(OBJEXT) +tests_test_strchr_DEPENDENCIES = $(tests_ldadd) +tests_test_strchr_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(tests_test_strchr_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +tests_test_strcmp_SOURCES = tests/test-strcmp.c +tests_test_strcmp_OBJECTS = \ + tests/tests_test_strcmp-test-strcmp.$(OBJEXT) +tests_test_strcmp_DEPENDENCIES = $(tests_ldadd) +tests_test_strcmp_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(tests_test_strcmp_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +tests_test_strcpy_SOURCES = tests/test-strcpy.c +tests_test_strcpy_OBJECTS = \ + tests/tests_test_strcpy-test-strcpy.$(OBJEXT) +tests_test_strcpy_DEPENDENCIES = $(tests_ldadd) +tests_test_strcpy_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(tests_test_strcpy_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +tests_test_strlen_SOURCES = tests/test-strlen.c +tests_test_strlen_OBJECTS = \ + tests/tests_test_strlen-test-strlen.$(OBJEXT) +tests_test_strlen_DEPENDENCIES = $(tests_ldadd) +tests_test_strlen_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(tests_test_strlen_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +tests_test_strncmp_SOURCES = tests/test-strncmp.c +tests_test_strncmp_OBJECTS = \ + tests/tests_test_strncmp-test-strncmp.$(OBJEXT) +tests_test_strncmp_DEPENDENCIES = $(tests_ldadd) +tests_test_strncmp_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(tests_test_strncmp_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +tests_test_strnlen_SOURCES = tests/test-strnlen.c +tests_test_strnlen_OBJECTS = tests/test-strnlen.$(OBJEXT) +tests_test_strnlen_LDADD = $(LDADD) +am_try_bionic_a15_OBJECTS = +try_bionic_a15_OBJECTS = $(am_try_bionic_a15_OBJECTS) +#try_bionic_a15_DEPENDENCIES = libmulti.a \ +# libbionic-a15.a +am_try_bionic_a9_OBJECTS = +try_bionic_a9_OBJECTS = $(am_try_bionic_a9_OBJECTS) +#try_bionic_a9_DEPENDENCIES = libmulti.a \ +# libbionic-a9.a +am_try_bionic_c_OBJECTS = +try_bionic_c_OBJECTS = $(am_try_bionic_c_OBJECTS) +try_bionic_c_DEPENDENCIES = libmulti.a libbionic-c.a +am_try_csl_OBJECTS = +try_csl_OBJECTS = $(am_try_csl_OBJECTS) +#try_csl_DEPENDENCIES = libmulti.a libcsl.a +am_try_glibc_OBJECTS = +try_glibc_OBJECTS = $(am_try_glibc_OBJECTS) +#try_glibc_DEPENDENCIES = libmulti.a libglibc.a +am_try_glibc_c_OBJECTS = +try_glibc_c_OBJECTS = $(am_try_glibc_c_OBJECTS) +try_glibc_c_DEPENDENCIES = libmulti.a libglibc-c.a +am_try_newlib_OBJECTS = +try_newlib_OBJECTS = $(am_try_newlib_OBJECTS) +#try_newlib_DEPENDENCIES = libmulti.a libnewlib.a +am_try_newlib_c_OBJECTS = +try_newlib_c_OBJECTS = $(am_try_newlib_c_OBJECTS) +try_newlib_c_DEPENDENCIES = libmulti.a libnewlib-c.a +am_try_newlib_xscale_OBJECTS = +try_newlib_xscale_OBJECTS = $(am_try_newlib_xscale_OBJECTS) +#try_newlib_xscale_DEPENDENCIES = libmulti.a \ +# libnewlib-xscale.a +am_try_none_OBJECTS = +try_none_OBJECTS = $(am_try_none_OBJECTS) +try_none_DEPENDENCIES = libmulti.a +am_try_plain_OBJECTS = +try_plain_OBJECTS = $(am_try_plain_OBJECTS) +try_plain_DEPENDENCIES = libmulti.a libplain.a +am_try_this_OBJECTS = +try_this_OBJECTS = $(am_try_this_OBJECTS) +try_this_DEPENDENCIES = libmulti.a libcortex-strings.la +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) +LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CCASFLAGS) $(CCASFLAGS) +AM_V_CPPAS = $(am__v_CPPAS_$(V)) +am__v_CPPAS_ = $(am__v_CPPAS_$(AM_DEFAULT_VERBOSITY)) +am__v_CPPAS_0 = @echo " CPPAS " $@; +am__v_CPPAS_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libbionic_a15_a_SOURCES) $(libbionic_a9_a_SOURCES) \ + $(libbionic_c_a_SOURCES) $(libcsl_a_SOURCES) \ + $(libglibc_c_a_SOURCES) $(libglibc_a_SOURCES) \ + $(libmulti_a_SOURCES) $(libnewlib_c_a_SOURCES) \ + $(libnewlib_xscale_a_SOURCES) $(libnewlib_a_SOURCES) \ + $(libplain_a_SOURCES) $(libcortex_strings_la_SOURCES) \ + $(dhry_SOURCES) $(dhry_native_SOURCES) tests/test-memchr.c \ + tests/test-memcmp.c tests/test-memcpy.c tests/test-memmove.c \ + tests/test-memset.c tests/test-strchr.c tests/test-strcmp.c \ + tests/test-strcpy.c tests/test-strlen.c tests/test-strncmp.c \ + tests/test-strnlen.c $(try_bionic_a15_SOURCES) \ + $(try_bionic_a9_SOURCES) $(try_bionic_c_SOURCES) \ + $(try_csl_SOURCES) $(try_glibc_SOURCES) $(try_glibc_c_SOURCES) \ + $(try_newlib_SOURCES) $(try_newlib_c_SOURCES) \ + $(try_newlib_xscale_SOURCES) $(try_none_SOURCES) \ + $(try_plain_SOURCES) $(try_this_SOURCES) +DIST_SOURCES = $(am__libbionic_a15_a_SOURCES_DIST) \ + $(am__libbionic_a9_a_SOURCES_DIST) $(libbionic_c_a_SOURCES) \ + $(am__libcsl_a_SOURCES_DIST) $(libglibc_c_a_SOURCES) \ + $(am__libglibc_a_SOURCES_DIST) $(libmulti_a_SOURCES) \ + $(libnewlib_c_a_SOURCES) \ + $(am__libnewlib_xscale_a_SOURCES_DIST) \ + $(am__libnewlib_a_SOURCES_DIST) $(libplain_a_SOURCES) \ + $(am__libcortex_strings_la_SOURCES_DIST) $(dhry_SOURCES) \ + $(dhry_native_SOURCES) tests/test-memchr.c tests/test-memcmp.c \ + tests/test-memcpy.c tests/test-memmove.c tests/test-memset.c \ + tests/test-strchr.c tests/test-strcmp.c tests/test-strcpy.c \ + tests/test-strlen.c tests/test-strncmp.c tests/test-strnlen.c \ + $(try_bionic_a15_SOURCES) $(try_bionic_a9_SOURCES) \ + $(try_bionic_c_SOURCES) $(try_csl_SOURCES) \ + $(try_glibc_SOURCES) $(try_glibc_c_SOURCES) \ + $(try_newlib_SOURCES) $(try_newlib_c_SOURCES) \ + $(try_newlib_xscale_SOURCES) $(try_none_SOURCES) \ + $(try_plain_SOURCES) $(try_this_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +AM_RECURSIVE_TARGETS = cscope check recheck +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in README \ + compile config.guess config.sub depcomp install-sh ltmain.sh \ + missing test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +GZIP_ENV = --best +DIST_TARGETS = dist-bzip2 dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = ${SHELL} /home/andrew/freebsd/repo/cortex-strings/missing aclocal-1.15 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +AUTOCONF = ${SHELL} /home/andrew/freebsd/repo/cortex-strings/missing autoconf +AUTOHEADER = ${SHELL} /home/andrew/freebsd/repo/cortex-strings/missing autoheader +AUTOMAKE = ${SHELL} /home/andrew/freebsd/repo/cortex-strings/missing automake-1.15 +AWK = nawk +CC = gcc +CCAS = gcc +CCASDEPMODE = depmode=gcc3 +CCASFLAGS = -g -O2 +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +FGREP = /usr/bin/grep -F +GREP = /usr/bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LD = /usr/local/bin/ld +LDFLAGS = +LIBOBJS = +LIBS = +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +LT_SYS_LIBRARY_PATH = +MAKEINFO = ${SHELL} /home/andrew/freebsd/repo/cortex-strings/missing makeinfo +MANIFEST_TOOL = : +MKDIR_P = ./install-sh -c -d +NM = /usr/local/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OTOOL = +OTOOL64 = +PACKAGE = cortex-strings +PACKAGE_BUGREPORT = +PACKAGE_NAME = cortex-strings +PACKAGE_STRING = cortex-strings 1.1-2012.06~dev +PACKAGE_TARNAME = cortex-strings +PACKAGE_URL = +PACKAGE_VERSION = 1.1-2012.06~dev +PATH_SEPARATOR = : +RANLIB = ranlib +SED = /usr/local/bin/gsed +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +VERSION = 1.1-2012.06~dev +abs_builddir = /home/andrew/freebsd/repo/cortex-strings +abs_srcdir = /home/andrew/freebsd/repo/cortex-strings +abs_top_builddir = /home/andrew/freebsd/repo/cortex-strings +abs_top_srcdir = /home/andrew/freebsd/repo/cortex-strings +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +bindir = ${exec_prefix}/bin +build = aarch64-none-elf +build_alias = aarch64-none-elf +build_cpu = aarch64 +build_os = elf +build_vendor = none +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = aarch64-none-elf +host_alias = +host_cpu = aarch64 +host_os = elf +host_vendor = none +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /home/andrew/freebsd/repo/cortex-strings/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +submachine = +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = +top_builddir = . +top_srcdir = . +with_neon = yes +with_vfp = yes + +# Used to record the compiler version in the executables +COMPILER = $(shell $(CC) --version 2>&1 | head -n1) + +# The main library +lib_LTLIBRARIES = \ + libcortex-strings.la + + +# Options for the tests +tests_cflags = -I$(srcdir)/tests $(AM_CFLAGS) +tests_ldadd = libcortex-strings.la +tests_test_memchr_LDADD = $(tests_ldadd) +tests_test_memchr_CFLAGS = $(tests_cflags) +tests_test_memcmp_LDADD = $(tests_ldadd) +tests_test_memcmp_CFLAGS = $(tests_cflags) +tests_test_memcpy_LDADD = $(tests_ldadd) +tests_test_memcpy_CFLAGS = $(tests_cflags) +tests_test_memmove_LDADD = $(tests_ldadd) +tests_test_memmove_CFLAGS = $(tests_cflags) +tests_test_memset_LDADD = $(tests_ldadd) +tests_test_memset_CFLAGS = $(tests_cflags) +tests_test_strchr_LDADD = $(tests_ldadd) +tests_test_strchr_CFLAGS = $(tests_cflags) +tests_test_strcmp_LDADD = $(tests_ldadd) +tests_test_strcmp_CFLAGS = $(tests_cflags) +tests_test_strcpy_LDADD = $(tests_ldadd) +tests_test_strcpy_CFLAGS = $(tests_cflags) +tests_test_strlen_LDADD = $(tests_ldadd) +tests_test_strlen_CFLAGS = $(tests_cflags) +tests_test_strncmp_LDADD = $(tests_ldadd) +tests_test_strncmp_CFLAGS = $(tests_cflags) +TESTS = $(check_PROGRAMS) + +# Good 'ol Dhrystone +dhry_SOURCES = \ + benchmarks/dhry/dhry_1.c \ + benchmarks/dhry/dhry_2.c \ + benchmarks/dhry/dhry.h + +dhry_CFLAGS = -Dcompiler="\"$(COMPILER)\"" -Doptions="\"$(CFLAGS)\"" +dhry_LDADD = libcortex-strings.la +dhry_native_SOURCES = $(dhry_SOURCES) +dhry_native_CFLAGS = $(dhry_CFLAGS) + +# Benchmark harness +noinst_LIBRARIES = libmulti.a libbionic-c.a libglibc-c.a libnewlib-c.a \ + libplain.a $(am__append_2) +libmulti_a_SOURCES = \ + benchmarks/multi/harness.c + +libmulti_a_CFLAGS = -DVERSION=\"$(VERSION)\" $(AM_CFLAGS) +libbionic_c_a_SOURCES = \ + reference/bionic-c/bcopy.c \ + reference/bionic-c/memchr.c \ + reference/bionic-c/memcmp.c \ + reference/bionic-c/memcpy.c \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Fri Sep 16 15:25:45 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62EB5BDD25F; Fri, 16 Sep 2016 15:25:45 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1532C767; Fri, 16 Sep 2016 15:25:45 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8GFPibX080769; Fri, 16 Sep 2016 15:25:44 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8GFPifw080768; Fri, 16 Sep 2016 15:25:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609161525.u8GFPifw080768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 16 Sep 2016 15:25:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305889 - in vendor/cortex-strings/dist: . autom4te.cache benchmarks/dhry/.deps benchmarks/multi benchmarks/multi/.deps reference/bionic-a15/.deps reference/bionic-a9/.deps reference/bi... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2016 15:25:45 -0000 Author: andrew Date: Fri Sep 16 15:25:44 2016 New Revision: 305889 URL: https://svnweb.freebsd.org/changeset/base/305889 Log: Remove generated files that shouldn't have been added Reported by: cognet Sponsored by: The FreeBSD Foundation Deleted: vendor/cortex-strings/dist/Makefile vendor/cortex-strings/dist/Makefile.in vendor/cortex-strings/dist/aclocal.m4 vendor/cortex-strings/dist/autom4te.cache/ vendor/cortex-strings/dist/benchmarks/dhry/.deps/ vendor/cortex-strings/dist/benchmarks/multi/.deps/ vendor/cortex-strings/dist/benchmarks/multi/.dirstamp vendor/cortex-strings/dist/compile vendor/cortex-strings/dist/config.guess vendor/cortex-strings/dist/config.h vendor/cortex-strings/dist/config.h.in vendor/cortex-strings/dist/config.log vendor/cortex-strings/dist/config.status vendor/cortex-strings/dist/config.sub vendor/cortex-strings/dist/configure vendor/cortex-strings/dist/depcomp vendor/cortex-strings/dist/install-sh vendor/cortex-strings/dist/libtool vendor/cortex-strings/dist/ltmain.sh vendor/cortex-strings/dist/missing vendor/cortex-strings/dist/reference/bionic-a15/.deps/ vendor/cortex-strings/dist/reference/bionic-a9/.deps/ vendor/cortex-strings/dist/reference/bionic-c/.deps/ vendor/cortex-strings/dist/reference/bionic-c/.dirstamp vendor/cortex-strings/dist/reference/csl/.deps/ vendor/cortex-strings/dist/reference/glibc-c/.deps/ vendor/cortex-strings/dist/reference/glibc-c/.dirstamp vendor/cortex-strings/dist/reference/glibc/.deps/ vendor/cortex-strings/dist/reference/newlib-c/.deps/ vendor/cortex-strings/dist/reference/newlib-xscale/.deps/ vendor/cortex-strings/dist/reference/newlib/.deps/ vendor/cortex-strings/dist/reference/plain/.deps/ vendor/cortex-strings/dist/src/aarch64/.deps/ vendor/cortex-strings/dist/src/arm/.deps/ vendor/cortex-strings/dist/src/thumb-2/.deps/ vendor/cortex-strings/dist/stamp-h1 vendor/cortex-strings/dist/test-driver vendor/cortex-strings/dist/tests/.deps/ From owner-svn-src-vendor@freebsd.org Fri Sep 16 15:29:24 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A979ABDD34D; Fri, 16 Sep 2016 15:29:24 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E54D930; Fri, 16 Sep 2016 15:29:24 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8GFTNTk080934; Fri, 16 Sep 2016 15:29:23 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8GFTNKJ080933; Fri, 16 Sep 2016 15:29:23 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609161529.u8GFTNKJ080933@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 16 Sep 2016 15:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305890 - in vendor/cortex-strings/linaro-eb80ac: . autom4te.cache benchmarks/dhry/.deps benchmarks/multi benchmarks/multi/.deps reference/bionic-a15/.deps reference/bionic-a9/.deps ref... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2016 15:29:24 -0000 Author: andrew Date: Fri Sep 16 15:29:23 2016 New Revision: 305890 URL: https://svnweb.freebsd.org/changeset/base/305890 Log: Tag upstream revision eb80ac77a6cdb3509d885d23d1dd343803381176 Added: vendor/cortex-strings/linaro-eb80ac/ - copied from r305888, vendor/cortex-strings/dist/ Deleted: vendor/cortex-strings/linaro-eb80ac/Makefile vendor/cortex-strings/linaro-eb80ac/Makefile.in vendor/cortex-strings/linaro-eb80ac/aclocal.m4 vendor/cortex-strings/linaro-eb80ac/autom4te.cache/ vendor/cortex-strings/linaro-eb80ac/benchmarks/dhry/.deps/ vendor/cortex-strings/linaro-eb80ac/benchmarks/multi/.deps/ vendor/cortex-strings/linaro-eb80ac/benchmarks/multi/.dirstamp vendor/cortex-strings/linaro-eb80ac/compile vendor/cortex-strings/linaro-eb80ac/config.guess vendor/cortex-strings/linaro-eb80ac/config.h vendor/cortex-strings/linaro-eb80ac/config.h.in vendor/cortex-strings/linaro-eb80ac/config.log vendor/cortex-strings/linaro-eb80ac/config.status vendor/cortex-strings/linaro-eb80ac/config.sub vendor/cortex-strings/linaro-eb80ac/configure vendor/cortex-strings/linaro-eb80ac/depcomp vendor/cortex-strings/linaro-eb80ac/install-sh vendor/cortex-strings/linaro-eb80ac/libtool vendor/cortex-strings/linaro-eb80ac/ltmain.sh vendor/cortex-strings/linaro-eb80ac/missing vendor/cortex-strings/linaro-eb80ac/reference/bionic-a15/.deps/ vendor/cortex-strings/linaro-eb80ac/reference/bionic-a9/.deps/ vendor/cortex-strings/linaro-eb80ac/reference/bionic-c/.deps/ vendor/cortex-strings/linaro-eb80ac/reference/bionic-c/.dirstamp vendor/cortex-strings/linaro-eb80ac/reference/csl/.deps/ vendor/cortex-strings/linaro-eb80ac/reference/glibc-c/.deps/ vendor/cortex-strings/linaro-eb80ac/reference/glibc-c/.dirstamp vendor/cortex-strings/linaro-eb80ac/reference/glibc/.deps/ vendor/cortex-strings/linaro-eb80ac/reference/newlib-c/.deps/ vendor/cortex-strings/linaro-eb80ac/reference/newlib-xscale/.deps/ vendor/cortex-strings/linaro-eb80ac/reference/newlib/.deps/ vendor/cortex-strings/linaro-eb80ac/reference/plain/.deps/ vendor/cortex-strings/linaro-eb80ac/src/aarch64/.deps/ vendor/cortex-strings/linaro-eb80ac/src/arm/.deps/ vendor/cortex-strings/linaro-eb80ac/src/thumb-2/.deps/ vendor/cortex-strings/linaro-eb80ac/stamp-h1 vendor/cortex-strings/linaro-eb80ac/test-driver vendor/cortex-strings/linaro-eb80ac/tests/.deps/