Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl2/diffutils merge conflicts, new reach-over Make...
details: https://anonhg.NetBSD.org/src/rev/87ad25c4ba76
branches: trunk
changeset: 342879:87ad25c4ba76
user: christos <christos%NetBSD.org@localhost>
date: Wed Jan 13 03:39:27 2016 +0000
description:
merge conflicts, new reach-over Makefiles
diffstat:
external/gpl2/diffutils/Makefile | 7 +
external/gpl2/diffutils/Makefile.inc | 8 +
external/gpl2/diffutils/bin/Makefile | 7 +
external/gpl2/diffutils/bin/Makefile.inc | 6 +
external/gpl2/diffutils/bin/cmp/Makefile | 11 +
external/gpl2/diffutils/bin/diff/Makefile | 20 +
external/gpl2/diffutils/bin/diff3/Makefile | 13 +
external/gpl2/diffutils/bin/sdiff/Makefile | 11 +
external/gpl2/diffutils/diffutils2netbsd | 77 ++++
external/gpl2/diffutils/dist/lib/xmalloc.c | 8 +-
external/gpl2/diffutils/dist/src/context.c | 6 +-
external/gpl2/diffutils/dist/src/diff.c | 10 +-
external/gpl2/diffutils/dist/src/diff3.c | 4 +-
external/gpl2/diffutils/dist/src/sdiff.c | 37 +-
external/gpl2/diffutils/dist/src/system.h | 4 +-
external/gpl2/diffutils/include/config.h | 515 +++++++++++++++++++++++++++++
external/gpl2/diffutils/include/fnmatch.h | 69 +++
external/gpl2/diffutils/include/regex.h | 46 ++
external/gpl2/diffutils/lib/Makefile | 18 +
19 files changed, 845 insertions(+), 32 deletions(-)
diffs (truncated from 1051 to 300 lines):
diff -r 95cbfacf719e -r 87ad25c4ba76 external/gpl2/diffutils/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl2/diffutils/Makefile Wed Jan 13 03:39:27 2016 +0000
@@ -0,0 +1,7 @@
+# $NetBSD: Makefile,v 1.1 2016/01/13 03:39:27 christos Exp $
+
+# We don't use GNU cmp and GNU sdiff, but have our own
+
+SUBDIR= lib .WAIT bin
+
+.include <bsd.subdir.mk>
diff -r 95cbfacf719e -r 87ad25c4ba76 external/gpl2/diffutils/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl2/diffutils/Makefile.inc Wed Jan 13 03:39:27 2016 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: Makefile.inc,v 1.1 2016/01/13 03:39:28 christos Exp $
+
+WARNS= 0
+
+IDIST= ${NETBSDSRCDIR}/external/gpl2/diffutils/dist
+
+CPPFLAGS+= -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H \
+ -I${IDIST}/../include -I${IDIST}/lib
diff -r 95cbfacf719e -r 87ad25c4ba76 external/gpl2/diffutils/bin/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl2/diffutils/bin/Makefile Wed Jan 13 03:39:27 2016 +0000
@@ -0,0 +1,7 @@
+# $NetBSD: Makefile,v 1.1 2016/01/13 03:39:28 christos Exp $
+
+# We don't use GNU cmp and GNU sdiff, but have our own
+
+SUBDIR= diff diff3 # sdiff cmp
+
+.include <bsd.subdir.mk>
diff -r 95cbfacf719e -r 87ad25c4ba76 external/gpl2/diffutils/bin/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl2/diffutils/bin/Makefile.inc Wed Jan 13 03:39:27 2016 +0000
@@ -0,0 +1,6 @@
+# $NetBSD: Makefile.inc,v 1.1 2016/01/13 03:39:28 christos Exp $
+
+.include "${.PARSEDIR}/../Makefile.inc"
+
+PROGDPLIBS+= diffutils ${.CURDIR}/../../lib
+BINDIR=/usr/bin
diff -r 95cbfacf719e -r 87ad25c4ba76 external/gpl2/diffutils/bin/cmp/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl2/diffutils/bin/cmp/Makefile Wed Jan 13 03:39:27 2016 +0000
@@ -0,0 +1,11 @@
+# $NetBSD: Makefile,v 1.1 2016/01/13 03:39:28 christos Exp $
+
+.include <bsd.init.mk>
+
+DIST= ${IDIST}/src
+.PATH: ${DIST} ${IDIST}/man
+
+PROG= cmp
+SRCS= cmp.c version.c
+
+.include <bsd.prog.mk>
diff -r 95cbfacf719e -r 87ad25c4ba76 external/gpl2/diffutils/bin/diff/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl2/diffutils/bin/diff/Makefile Wed Jan 13 03:39:27 2016 +0000
@@ -0,0 +1,20 @@
+# $NetBSD: Makefile,v 1.1 2016/01/13 03:39:28 christos Exp $
+
+.include <bsd.init.mk>
+
+DIST= ${IDIST}/src
+.PATH: ${DIST} ${IDIST}/doc ${IDIST}/man
+
+PROG= diff
+SRCS= analyze.c context.c diff.c dir.c ed.c ifdef.c io.c \
+ normal.c side.c util.c version.c
+
+INFOFLAGS= -I${IDIST}/doc
+TEXINFO= diff.texi
+
+COPTS.ifdef.c = -Wno-stack-protector
+
+CWARNFLAGS.clang+= -Wno-unused-value -Wno-string-plus-int
+
+.include <bsd.info.mk>
+.include <bsd.prog.mk>
diff -r 95cbfacf719e -r 87ad25c4ba76 external/gpl2/diffutils/bin/diff3/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl2/diffutils/bin/diff3/Makefile Wed Jan 13 03:39:27 2016 +0000
@@ -0,0 +1,13 @@
+# $NetBSD: Makefile,v 1.1 2016/01/13 03:39:28 christos Exp $
+
+.include <bsd.init.mk>
+
+DIST= ${IDIST}/src
+.PATH: ${DIST} ${IDIST}/man
+
+PROG= diff3
+SRCS= diff3.c version.c
+
+CWARNFLAGS.clang+= -Wno-unused-value
+
+.include <bsd.prog.mk>
diff -r 95cbfacf719e -r 87ad25c4ba76 external/gpl2/diffutils/bin/sdiff/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl2/diffutils/bin/sdiff/Makefile Wed Jan 13 03:39:27 2016 +0000
@@ -0,0 +1,11 @@
+# $NetBSD: Makefile,v 1.1 2016/01/13 03:39:28 christos Exp $
+
+.include <bsd.init.mk>
+
+DIST= ${IDIST}/src
+.PATH: ${DIST} ${IDIST}/man
+
+PROG= sdiff
+SRCS= sdiff.c version.c
+
+.include <bsd.prog.mk>
diff -r 95cbfacf719e -r 87ad25c4ba76 external/gpl2/diffutils/diffutils2netbsd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl2/diffutils/diffutils2netbsd Wed Jan 13 03:39:27 2016 +0000
@@ -0,0 +1,77 @@
+#! /bin/sh
+#
+# $NetBSD: diffutils2netbsd,v 1.1 2016/01/13 03:39:28 christos Exp $
+#
+# Copyright (c) 2003 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. 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.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION OR CONTRIBUTORS
+# 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.
+#
+# diffutils2netbsd: convert an diffutils source tree into a
+# format suitable for commit. Works on current dir.
+#
+
+if [ ! -d "$1" ]; then exit 1; fi
+cd "$1"
+# delete some superfluous files
+echo deleting some superfluous files
+rm -rf ms
+
+echo done
+
+### Remove the $'s around RCS tags
+cleantags .
+
+### Add our NetBSD RCS Id
+find . -type f -name '*.[chly]' -print | while read c; do
+ sed 1q < $c | grep -q '\$NetBSD' || (
+echo "/* \$NetBSD\$ */" >/tmp/diffutils3$$
+echo "" >>/tmp/diffutils3$$
+cat $c >> /tmp/diffutils3$$
+mv /tmp/diffutils3$$ $c && echo added NetBSD RCS tag to $c
+ )
+done
+
+find . -type f -name '*.[0-9]' -print | while read m; do
+ sed 1q < $m | grep -q '\$NetBSD' || (
+echo ".\\\" \$NetBSD\$" >/tmp/diffutils4$$
+echo ".\\\"" >>/tmp/diffutils4$$
+cat $m >> /tmp/diffutils4$$
+mv /tmp/diffutils4$$ $m && echo added NetBSD RCS tag to $m
+ )
+done
+
+find . -type f -name '*.texi' -print | while read t; do
+ sed "2 s/^/@c \$NetBSD\$\\
+/" < $t > /tmp/diffutils5$$
+ mv /tmp/diffutils5$$ $t && echo added NetBSD RCS tag to $t
+done
+
+echo done
+
+cat << EOF
+You can import now using
+
+cvs -d cvs.netbsd.org:/cvsroot import src/external/gpl2/diffutils/dist FSF diffutils-X-Y
+_EOF
+
+exit 0
diff -r 95cbfacf719e -r 87ad25c4ba76 external/gpl2/diffutils/dist/lib/xmalloc.c
--- a/external/gpl2/diffutils/dist/lib/xmalloc.c Wed Jan 13 03:15:29 2016 +0000
+++ b/external/gpl2/diffutils/dist/lib/xmalloc.c Wed Jan 13 03:39:27 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xmalloc.c,v 1.1.1.1 2016/01/13 03:15:30 christos Exp $ */
+/* $NetBSD: xmalloc.c,v 1.2 2016/01/13 03:39:28 christos Exp $ */
/* xmalloc.c -- malloc with out of memory checking
Copyright (C) 1990-1999, 2000, 2002 Free Software Foundation, Inc.
@@ -84,7 +84,7 @@
void *p;
p = malloc (n);
- if (p == 0)
+ if (p == 0 && n)
xalloc_die ();
return p;
}
@@ -96,7 +96,7 @@
xrealloc (void *p, size_t n)
{
p = realloc (p, n);
- if (p == 0)
+ if (p == 0 && n)
xalloc_die ();
return p;
}
@@ -109,7 +109,7 @@
void *p;
p = calloc (n, s);
- if (p == 0)
+ if (p == 0 && n && s)
xalloc_die ();
return p;
}
diff -r 95cbfacf719e -r 87ad25c4ba76 external/gpl2/diffutils/dist/src/context.c
--- a/external/gpl2/diffutils/dist/src/context.c Wed Jan 13 03:15:29 2016 +0000
+++ b/external/gpl2/diffutils/dist/src/context.c Wed Jan 13 03:39:27 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: context.c,v 1.1.1.1 2016/01/13 03:15:30 christos Exp $ */
+/* $NetBSD: context.c,v 1.2 2016/01/13 03:39:28 christos Exp $ */
/* Context-format output routines for GNU DIFF.
@@ -63,9 +63,9 @@
int nsec = TIMESPEC_NS (inf->stat.st_mtim);
if (! (tm && nstrftime (buf, sizeof buf, time_format, tm, 0, nsec)))
{
- long sec = inf->stat.st_mtime;
+ long long sec = inf->stat.st_mtime;
verify (info_preserved, sizeof inf->stat.st_mtime <= sizeof sec);
- sprintf (buf, "%ld.%.9d", sec, nsec);
+ sprintf (buf, "%lld.%.9d", sec, nsec);
}
fprintf (outfile, "%s %s\t%s\n", mark, inf->name, buf);
}
diff -r 95cbfacf719e -r 87ad25c4ba76 external/gpl2/diffutils/dist/src/diff.c
--- a/external/gpl2/diffutils/dist/src/diff.c Wed Jan 13 03:15:29 2016 +0000
+++ b/external/gpl2/diffutils/dist/src/diff.c Wed Jan 13 03:39:27 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: diff.c,v 1.1.1.1 2016/01/13 03:15:30 christos Exp $ */
+/* $NetBSD: diff.c,v 1.2 2016/01/13 03:39:28 christos Exp $ */
/* diff - compare files line by line
@@ -38,6 +38,7 @@
#include <regex.h>
#include <setmode.h>
#include <xalloc.h>
+#include <posixver.h>
static char const authorship_msgid[] =
N_("Written by Paul Eggert, Mike Haertel, David Hayes,\n\
@@ -1208,9 +1209,10 @@
else if ((same_files
= (cmp.file[0].desc != NONEXISTENT
&& cmp.file[1].desc != NONEXISTENT
- && 0 < same_file (&cmp.file[0].stat, &cmp.file[1].stat)
- && same_file_attributes (&cmp.file[0].stat,
- &cmp.file[1].stat)))
+ && (same_special_file (&cmp.file[0].stat, &cmp.file[1].stat)
+ || (0 < same_file (&cmp.file[0].stat, &cmp.file[1].stat)
+ && same_file_attributes (&cmp.file[0].stat,
+ &cmp.file[1].stat)))))
&& no_diff_means_no_output)
{
/* The two named files are actually the same physical file.
diff -r 95cbfacf719e -r 87ad25c4ba76 external/gpl2/diffutils/dist/src/diff3.c
--- a/external/gpl2/diffutils/dist/src/diff3.c Wed Jan 13 03:15:29 2016 +0000
+++ b/external/gpl2/diffutils/dist/src/diff3.c Wed Jan 13 03:39:27 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: diff3.c,v 1.1.1.1 2016/01/13 03:15:30 christos Exp $ */
+/* $NetBSD: diff3.c,v 1.2 2016/01/13 03:39:28 christos Exp $ */
/* diff3 - compare three files line by line
@@ -1404,7 +1404,7 @@
line = 0;
do
{
- fprintf (outputfile, line_prefix);
+ fprintf (outputfile, "%s", line_prefix);
cp = D_RELNUM (ptr, realfile, line);
Home |
Main Index |
Thread Index |
Old Index