diff -Nru dwdiff-2.1.2/Changelog dwdiff-2.1.3/Changelog --- dwdiff-2.1.2/Changelog 2018-12-10 18:25:15.000000000 +0000 +++ dwdiff-2.1.3/Changelog 2020-07-18 06:57:36.000000000 +0000 @@ -1,3 +1,8 @@ +Version 2.1.3: + Bug fixes: + - Fixed compilation problems on GCC 10, due to multiple definition of the + same variable. + Version 2.1.2: New features: - Brought up-to-date with newer ICU, including move to pkg-config instead of diff -Nru dwdiff-2.1.2/configure dwdiff-2.1.3/configure --- dwdiff-2.1.2/configure 2018-12-10 18:25:15.000000000 +0000 +++ dwdiff-2.1.3/configure 2020-07-18 06:57:36.000000000 +0000 @@ -160,7 +160,7 @@ #============================== # Setup #============================== -unset LINKRULE COMPILERULE USERRULES USERHELP EXTENSIONS SWITCHES PRECHECKFUNC INSTALLDIRS DUMP_LOG +unset LINKRULE COMPILERULE USERRULES USERHELP EXTENSIONS SWITCHES PRECHECKFUNC INSTALLDIRS DUMP_LOG HOST_PREFIX . ./config.pkg @@ -172,6 +172,7 @@ #@INCLUDE_START [ "${EXTENSIONS}" = "c verbose_compile gettext" ] || error "EXTENSIONS changed after running merge_config. Run merge_config again." +SWITCHES="${SWITCHES} +c99" SUFFIXES="${SUFFIXES} .c .o" [ -z "${LINKRULE}" ] && LINKRULE='$(CC) $(CFLAGS) $(LDFLAGS) -o $@ .config.o $(LDLIBS) $(TESTLIBS)' [ -z "${COMPILERULE}" ] && COMPILERULE='$(CC) $(CFLAGS) $(TESTFLAGS) -c -o $@ $<' @@ -224,6 +225,27 @@ test_link "working C compiler (${CC-${MAKE} default})" || error "No working C compiler found. See config.log for errors." } +has_support_c99() { + if [ "no" = "${with_c99}" ] ; then + return + fi + clean_c + cat > .config.c <> config.log 2>&1 ; then + if test_make "CFLAGS=$CFLAGS" "$@" .config.o >> config.log 2>&1 ; then check_message_result "yes" true else @@ -250,7 +272,7 @@ check_message "Checking for $1... " shift - if test_make "$@" .config >> config.log 2>&1 ; then + if test_make "CFLAGS=$CFLAGS" "$@" .config >> config.log 2>&1 ; then check_message_result "yes" true else @@ -452,6 +474,25 @@ --prefix=*) PREFIX="${PARAM#--prefix=}" ;; + --host=*) + HOST_PREFIX="${PARAM#--host=}" + [ -z "${LIBTOOL}" ] && LIBTOOL="${HOST_PREFIX}-libtool" + if which "${LIBTOOL}" > /dev/null && echo "${EXTENSIONS}" | grep "libtool" > /dev/null + then + [ -z "${CC}" ] && CC="`"${LIBTOOL}" --config | grep '^CC' | tail -n1 | sed 's/.*"\([^"]\+\)".*/\1/'`" + [ -z "${CXX}" ] && CXX="`"${LIBTOOL}" --tag=CXX --config | grep '^CC' | tail -n1 | sed 's/.*"\([^"]\+\)".*/\1/'`" + else + [ -z "${CC}" ] && CC="${HOST_PREFIX}-gcc" + [ -z "${CXX}" ] && CXX="${HOST_PREFIX}-g++" + fi + [ -z "${PKG_CONFIG}" ] && PKG_CONFIG="${HOST_PREFIX}-pkg-config" + + echo "INFO: cross compiling using the following settings:" + echo " CC=$CC" + echo " CXX=$CXX" + echo " LIBTOOL=$LIBTOOL" + echo " PKG_CONFIG=$PKG_CONFIG" + ;; --dump-log) DUMP_LOG=1 ;; @@ -503,6 +544,15 @@ esac done +# Remove trailing slashes from the prefix. These are superfluous and get in +# the way of testing. +STRIPPED_PREFIX="${PREFIX%/}" +while [ "${PREFIX}" != "${STRIPPED_PREFIX}" ] +do + PREFIX="${STRIPPED_PREFIX}" + STRIPPED_PREFIX="${PREFIX%/}" +done + if [ -n "${INSTALL}" ] ; then TEST_INSTALL="${INSTALL}" unset INSTALL diff -Nru dwdiff-2.1.2/debian/changelog dwdiff-2.1.3/debian/changelog --- dwdiff-2.1.2/debian/changelog 2020-03-03 20:32:36.000000000 +0000 +++ dwdiff-2.1.3/debian/changelog 2020-07-18 14:04:52.000000000 +0000 @@ -1,14 +1,17 @@ -dwdiff (2.1.2-2build2) focal; urgency=medium +dwdiff (2.1.3-1) unstable; urgency=medium - * No-change rebuild for icu soname change. + [ Debian Janitor ] + * debian/copyright: use spaces rather than tabs to start continuation lines + * Use secure URI in Homepage field + + [ Barak A. Pearlmutter ] + * Use secure URI in debian/watch + * Rules-Requires-Root: no + * Bump to debhelper 13 + * Bump standards version to 4.5.0, no changes needed + * New upstream version with GCC-10 fix (closes: #957158) - -- Matthias Klose Tue, 03 Mar 2020 21:32:36 +0100 - -dwdiff (2.1.2-2build1) focal; urgency=medium - - * No-change rebuild for icu soname change. - - -- Matthias Klose Thu, 13 Feb 2020 08:56:26 +0100 + -- Barak A. Pearlmutter Sat, 18 Jul 2020 15:04:52 +0100 dwdiff (2.1.2-2) unstable; urgency=medium diff -Nru dwdiff-2.1.2/debian/control dwdiff-2.1.3/debian/control --- dwdiff-2.1.2/debian/control 2019-02-15 20:53:28.000000000 +0000 +++ dwdiff-2.1.3/debian/control 2020-07-18 14:00:27.000000000 +0000 @@ -2,9 +2,10 @@ Section: utils Priority: optional Maintainer: Barak A. Pearlmutter -Build-Depends: debhelper-compat (= 12), libicu-dev, pkg-config -Standards-Version: 4.3.0 -Homepage: http://os.ghalkes.nl/dwdiff.html +Build-Depends: debhelper-compat (= 13), libicu-dev, pkg-config +Standards-Version: 4.5.0 +Rules-Requires-Root: no +Homepage: https://os.ghalkes.nl/dwdiff.html Vcs-Git: https://salsa.debian.org/debian/dwdiff.git Vcs-Browser: https://salsa.debian.org/debian/dwdiff diff -Nru dwdiff-2.1.2/debian/copyright dwdiff-2.1.3/debian/copyright --- dwdiff-2.1.2/debian/copyright 2019-02-15 18:47:12.000000000 +0000 +++ dwdiff-2.1.3/debian/copyright 2020-07-18 13:55:14.000000000 +0000 @@ -4,13 +4,13 @@ Files: * Copyright: 2008-2015 Gertjan Halkes - 2006-2011, 2015 G.P. Halkes + 2006-2011, 2015 G.P. Halkes License: GPL-3+ Files: debian/* Copyright: 2008 Olexandr Kravchuk - 2010 Clint Adams - 2011-2015 Barak A. Pearlmutter + 2010 Clint Adams + 2011-2015 Barak A. Pearlmutter License: GPL-3+ License: GPL-3+ diff -Nru dwdiff-2.1.2/debian/rules dwdiff-2.1.3/debian/rules --- dwdiff-2.1.2/debian/rules 2019-02-15 20:53:28.000000000 +0000 +++ dwdiff-2.1.3/debian/rules 2020-07-18 13:55:11.000000000 +0000 @@ -37,6 +37,8 @@ override_dh_auto_install: dh_auto_install -- LINGUAS="$(LINGUAS)" docdir='$$(prefix)/share/doc/dwdiff' + +execute_after_dh_auto_install: echo "Work around Makefile installing Changelog and COPYING into docdir." -rm --verbose debian/dwdiff/usr/share/doc/dwdiff/Changelog -rm --verbose debian/dwdiff/usr/share/doc/dwdiff/COPYING diff -Nru dwdiff-2.1.2/debian/watch dwdiff-2.1.3/debian/watch --- dwdiff-2.1.2/debian/watch 2017-04-16 15:45:04.000000000 +0000 +++ dwdiff-2.1.3/debian/watch 2020-07-18 13:55:12.000000000 +0000 @@ -1,2 +1,2 @@ version=3 -http://os.ghalkes.nl/dist/dwdiff-([\d\.]*)\.(?:zip|tgz|tbz2|txz|tar\.(?:gz|bz2|xz)) +https://os.ghalkes.nl/dist/dwdiff-([\d\.]*)\.(?:zip|tgz|tbz2|txz|tar\.(?:gz|bz2|xz)) diff -Nru dwdiff-2.1.2/Makefile.in dwdiff-2.1.3/Makefile.in --- dwdiff-2.1.2/Makefile.in 2018-12-10 18:25:15.000000000 +0000 +++ dwdiff-2.1.3/Makefile.in 2020-07-18 06:57:36.000000000 +0000 @@ -54,7 +54,7 @@ # Miscelaneous install paths bindir=$(prefix)/bin -docdir=$(prefix)/share/doc/dwdiff-2.1.2 +docdir=$(prefix)/share/doc/dwdiff-2.1.3 mandir=$(prefix)/share/man all: dwdiff $(DWFILTER:yes=dwfilter) linguas diff -Nru dwdiff-2.1.2/po/messages.pot dwdiff-2.1.3/po/messages.pot --- dwdiff-2.1.2/po/messages.pot 2018-12-10 18:25:15.000000000 +0000 +++ dwdiff-2.1.3/po/messages.pot 2020-07-18 06:57:36.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-12-10 19:25+0100\n" +"POT-Creation-Date: 2020-07-18 08:57+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -23,7 +23,7 @@ msgstr "" #: doDiff.c:178 doDiff.c:226 doDiff.c:254 doDiff.c:276 doDiff.c:335 -#: doDiff.c:506 +#: doDiff.c:507 msgid "Error reading back input\n" msgstr "" @@ -84,12 +84,12 @@ "Licensed under the GNU General Public License version 3\n" msgstr "" -#: dwfilter.c:113 option.c:735 option.c:772 +#: dwfilter.c:113 option.c:737 option.c:774 #, c-format msgid "Option %.*s does not exist\n" msgstr "" -#: dwfilter.c:130 option.c:808 +#: dwfilter.c:130 option.c:810 msgid "Need two files to compare\n" msgstr "" @@ -287,78 +287,78 @@ msgid "--no-profile Disable profile reading\n" msgstr "" -#: option.c:39 +#: option.c:41 msgid "Black" msgstr "" -#: option.c:40 +#: option.c:42 msgid "Red" msgstr "" -#: option.c:41 +#: option.c:43 msgid "Green" msgstr "" -#: option.c:42 +#: option.c:44 msgid "Brown" msgstr "" -#: option.c:43 +#: option.c:45 msgid "Blue" msgstr "" -#: option.c:44 +#: option.c:46 msgid "Magenta" msgstr "" -#: option.c:45 +#: option.c:47 msgid "Cyan" msgstr "" -#: option.c:46 +#: option.c:48 msgid "Gray" msgstr "" -#: option.c:47 +#: option.c:49 msgid "Dark gray" msgstr "" -#: option.c:48 +#: option.c:50 msgid "Bright red" msgstr "" -#: option.c:49 +#: option.c:51 msgid "Bright green" msgstr "" -#: option.c:50 +#: option.c:52 msgid "Yellow" msgstr "" -#: option.c:51 +#: option.c:53 msgid "Bright blue" msgstr "" -#: option.c:52 +#: option.c:54 msgid "Bright magenta" msgstr "" -#: option.c:53 +#: option.c:55 msgid "Bright cyan" msgstr "" -#: option.c:54 +#: option.c:56 msgid "White" msgstr "" -#: option.c:89 +#: option.c:91 #, c-format msgid "Single backslash at end of %s argument\n" msgstr "" #. TRANSLATORS: #. The %s argument is a long option name without preceding dashes. -#: option.c:141 option.c:148 +#: option.c:143 option.c:150 #, c-format msgid "Invalid hexadecimal escape sequence in %s argument\n" msgstr "" @@ -366,45 +366,45 @@ #. TRANSLATORS: #. The %c argument will be either 'u' or 'U'. The %s argument is a long #. option name without preceding dashes. -#: option.c:182 option.c:188 +#: option.c:184 option.c:190 #, c-format msgid "Too short \\%c escape in %s argument\n" msgstr "" #. TRANSLATORS: #. The %s argument is a long option name without preceding dashes. -#: option.c:199 +#: option.c:201 #, c-format msgid "\\U escape out of range in %s argument\n" msgstr "" #. TRANSLATORS: #. The %s argument is a long option name without preceding dashes. -#: option.c:204 +#: option.c:206 #, c-format msgid "\\%c escapes for surrogate codepoints are not allowed in %s argument\n" msgstr "" -#: option.c:274 option.c:363 option.c:371 +#: option.c:276 option.c:365 option.c:373 msgid "Whitespace and delimiter sets overlap\n" msgstr "" -#: option.c:421 option.c:684 +#: option.c:423 option.c:686 #, c-format msgid "Invalid color specification %s\n" msgstr "" -#: option.c:434 +#: option.c:436 #, c-format msgid "Invalid color %s\n" msgstr "" -#: option.c:446 +#: option.c:448 #, c-format msgid "Invalid background color %s\n" msgstr "" -#: option.c:541 option_stripped.inc:10 +#: option.c:543 option_stripped.inc:10 #, c-format msgid "Usage: dwdiff [OPTIONS] \n" msgstr "" @@ -413,56 +413,56 @@ #. - If the (C) symbol (that is the c in a circle) is not available, #. leave as it as is. (Unicode code point 0x00A9) #. - G.P. Halkes is name and should be left as is. -#: option.c:554 +#: option.c:556 msgid "" "Copyright (C) 2006-2015 G.P. Halkes and others\n" "Licensed under the GNU General Public License version 3\n" msgstr "" -#: option.c:590 +#: option.c:592 #, c-format msgid "Option %.*s is only supported for UTF-8 mode\n" msgstr "" -#: option.c:593 +#: option.c:595 #, c-format msgid "Support for option %.*s is not compiled into this version of dwdiff\n" msgstr "" -#: option.c:602 option.c:624 option.c:643 +#: option.c:604 option.c:626 option.c:645 #, c-format msgid "Option %.*s is not supported\n" msgstr "" -#: option.c:652 +#: option.c:654 msgid "Can't read both files from standard input\n" msgstr "" -#: option.c:656 option.c:782 +#: option.c:658 option.c:784 msgid "Too many files to compare\n" msgstr "" #. TRANSLATORS: #. "Name" and "Description" are table headings for the color name list. #. Make sure you keep the alignment of the headings over the text. -#: option.c:673 +#: option.c:675 msgid "Name Description\n" msgstr "" -#: option.c:678 +#: option.c:680 msgid "The colors black through gray are also usable as background color\n" msgstr "" -#: option.c:731 +#: option.c:733 #, c-format msgid "Error opening temporary output file: %s\n" msgstr "" -#: option.c:758 +#: option.c:760 msgid "Invalid algorithm name\n" msgstr "" -#: option.c:803 +#: option.c:805 msgid "Only one input file accepted with --diff-input\n" msgstr "" diff -Nru dwdiff-2.1.2/src/buffer.c dwdiff-2.1.3/src/buffer.c --- dwdiff-2.1.2/src/buffer.c 2018-12-10 18:25:15.000000000 +0000 +++ dwdiff-2.1.3/src/buffer.c 2020-07-18 06:57:36.000000000 +0000 @@ -75,6 +75,7 @@ buffers after the current one, then print all buffers before the current. */ case BUFFERING: ignore = fwrite("--\n", 1, 3, option.output); + /* FALLTHROUGH */ case BUFFERING_INITIAL: for (i = bufferIndex + 1; i <= option.contextLines; i++) ignore = fwrite(contextBuffers[i].data, 1, contextBuffers[i].used, option.output); diff -Nru dwdiff-2.1.2/src/definitions.h dwdiff-2.1.3/src/definitions.h --- dwdiff-2.1.2/src/definitions.h 2018-12-10 18:25:15.000000000 +0000 +++ dwdiff-2.1.3/src/definitions.h 2020-07-18 06:57:36.000000000 +0000 @@ -56,7 +56,7 @@ #define strdupA strdup #endif -#define VERSION_STRING "2.1.2" +#define VERSION_STRING "2.1.3" typedef struct CharData CharData; diff -Nru dwdiff-2.1.2/src/doDiff.c dwdiff-2.1.3/src/doDiff.c --- dwdiff-2.1.2/src/doDiff.c 2018-12-10 18:25:15.000000000 +0000 +++ dwdiff-2.1.3/src/doDiff.c 2020-07-18 06:57:36.000000000 +0000 @@ -368,6 +368,7 @@ OLD_COMMON the line counter is not incremented. */ case COMMON: oldLineNumber++; + /* FALLTHROUGH */ case ADD: newLineNumber++; break; diff -Nru dwdiff-2.1.2/src/option.c dwdiff-2.1.3/src/option.c --- dwdiff-2.1.2/src/option.c 2018-12-10 18:25:15.000000000 +0000 +++ dwdiff-2.1.3/src/option.c 2020-07-18 06:57:36.000000000 +0000 @@ -28,6 +28,8 @@ #define DWDIFF_COMPILE #include "optionDescriptions.h" +option_t option; + typedef struct { const char *name; const char *description; diff -Nru dwdiff-2.1.2/src/option.h dwdiff-2.1.3/src/option.h --- dwdiff-2.1.2/src/option.h 2018-12-10 18:25:15.000000000 +0000 +++ dwdiff-2.1.3/src/option.h 2020-07-18 06:57:36.000000000 +0000 @@ -17,7 +17,7 @@ #define DEFAULT_LINENUMBER_WIDTH 4 #define BITMASK_SIZE (UCHAR_MAX+7)/8 -struct { +typedef struct { InputFile oldFile, newFile; const char *delStart, @@ -68,7 +68,9 @@ bool dwfilterMode; bool repeatMarkers; bool diffInput; -} option; +} option_t; + +extern option_t option; void parseCmdLine(int argc, char *argv[]);