summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2024-05-12 19:10:12 +0000
committer Eric Hameleers <alien@slackware.com>2024-05-12 21:28:58 +0200
commitabc3e67678d77c43fe739af3ed812d558cc83435 (patch)
treea9e061d3fd40a4bff2bf8e46d18117da5179abbd /source
parentafc0f1e9aaa780f00b61d8c42b3a77833fbbaff8 (diff)
downloadcurrent-abc3e67678d77c43fe739af3ed812d558cc83435.tar.gz
current-abc3e67678d77c43fe739af3ed812d558cc83435.tar.xz
Sun May 12 19:10:12 UTC 202420240512191012
a/less-654-x86_64-1.txz: Upgraded. d/ninja-1.12.1-x86_64-1.txz: Upgraded. n/whois-5.5.23-x86_64-1.txz: Upgraded. Updated the .sc, .********* (.xn--yfro4i67o, Singapore) and .********************************* (.xn--clchc0ea0b2g2a9gcd, Singapore) TLD servers. extra/bittornado/bittornado-0.3.18-noarch-3.txz: Removed. Obsolete and based on python2.
Diffstat (limited to 'source')
-rwxr-xr-xsource/a/coreutils/coreutils.SlackBuild3
-rwxr-xr-xsource/a/infozip/infozip.SlackBuild6
-rw-r--r--source/a/infozip/unzip-patches/unzip.gnu89.diff11
-rw-r--r--source/a/infozip/zip-patches/zip.gnu89.diff11
-rw-r--r--source/a/less/007521ac3c95bc76.patch73
-rwxr-xr-xsource/a/less/less.SlackBuild5
-rwxr-xr-xsource/a/libcgroup/libcgroup.SlackBuild3
-rwxr-xr-xsource/a/minicom/minicom.SlackBuild4
-rwxr-xr-xsource/a/nvi/nvi.SlackBuild5
-rw-r--r--source/a/nvi/patches/0039-Add-function-prototypes-to-fix-implicit-function-dec.patch87
-rwxr-xr-xsource/a/splitvt/splitvt.SlackBuild6
-rw-r--r--source/a/splitvt/splitvt.configure.gcc14.diff11
-rw-r--r--source/a/splitvt/splitvt.gcc14.diff11
-rw-r--r--source/a/sysvinit-functions/function-src.gcc14.diff9
-rwxr-xr-xsource/a/sysvinit-functions/sysvinit-functions.SlackBuild1
-rw-r--r--source/a/unarj/Makefile2
-rw-r--r--source/a/util-linux/bsdstrings.gcc14.diff12
-rwxr-xr-xsource/a/util-linux/util-linux.SlackBuild5
-rwxr-xr-xsource/a/zoo/zoo.SlackBuild1
-rw-r--r--source/a/zoo/zoo.gcc14.diff11
-rwxr-xr-xsource/ap/amp/amp.SlackBuild2
-rwxr-xr-xsource/ap/bpe/bpe.SlackBuild7
-rwxr-xr-xsource/ap/cdrtools/cdrtools.SlackBuild3
-rwxr-xr-xsource/ap/ghostscript/ghostscript.SlackBuild3
-rwxr-xr-xsource/ap/gutenprint/gutenprint.SlackBuild4
-rw-r--r--source/ap/hplip/hplip-covscan.patch615
-rw-r--r--source/ap/hplip/hplip-hpaio-gcc14.patch114
-rw-r--r--source/ap/hplip/hplip-pcardext-disable.patch16
-rw-r--r--source/ap/hplip/hplip-pserror-c99.patch17
-rw-r--r--source/ap/hplip/hplip-scan-hpaio-include.patch19
-rw-r--r--source/ap/hplip/hplip-scan-orblite-c99.patch21
-rwxr-xr-xsource/ap/hplip/hplip.SlackBuild14
-rwxr-xr-xsource/ap/libx86/libx86.SlackBuild3
-rwxr-xr-xsource/ap/rzip/rzip.SlackBuild3
-rwxr-xr-xsource/ap/sc-im/sc-im.SlackBuild3
-rwxr-xr-xsource/ap/sc/sc.SlackBuild1
-rw-r--r--source/ap/sc/sc.gcc14.diff11
-rwxr-xr-xsource/ap/seejpeg/seejpeg.SlackBuild3
-rwxr-xr-xsource/ap/sox/sox.SlackBuild3
-rwxr-xr-xsource/ap/vorbis-tools/vorbis-tools.SlackBuild3
-rw-r--r--source/ap/zsh/0007-zsh-configure-c99.patch44
-rwxr-xr-xsource/ap/zsh/zsh.SlackBuild2
-rwxr-xr-xsource/d/clisp/clisp.SlackBuild3
-rwxr-xr-xsource/d/dev86/dev86.SlackBuild4
-rwxr-xr-xsource/d/gnucobol/gnucobol.SlackBuild3
-rwxr-xr-xsource/d/oprofile/oprofile.SlackBuild3
-rwxr-xr-xsource/d/subversion/subversion.SlackBuild3
-rwxr-xr-xsource/kde/stellarsolver/stellarsolver.SlackBuild3
-rwxr-xr-xsource/l/GConf/GConf.SlackBuild3
-rwxr-xr-xsource/l/PyQt5_sip/PyQt5_sip.SlackBuild4
-rwxr-xr-xsource/l/aalib/aalib.SlackBuild3
-rwxr-xr-xsource/l/apr-util/apr-util.SlackBuild5
-rwxr-xr-xsource/l/chmlib/chmlib.SlackBuild3
-rwxr-xr-xsource/l/db48/db48.SlackBuild3
-rwxr-xr-xsource/l/esound/esound.SlackBuild3
-rwxr-xr-xsource/l/ffmpeg/ffmpeg.SlackBuild3
-rwxr-xr-xsource/l/glib/glib.SlackBuild3
-rwxr-xr-xsource/l/gtk+/gtk+.SlackBuild3
-rwxr-xr-xsource/l/gtk+2/gtk+2.SlackBuild3
-rwxr-xr-xsource/l/gtksourceview3/gtksourceview3.SlackBuild3
-rwxr-xr-xsource/l/lcms/lcms.SlackBuild3
-rwxr-xr-xsource/l/libao/libao.SlackBuild5
-rwxr-xr-xsource/l/libappindicator/libappindicator.SlackBuild3
-rwxr-xr-xsource/l/libcddb/libcddb.SlackBuild3
-rwxr-xr-xsource/l/libgpod/libgpod.SlackBuild3
-rwxr-xr-xsource/l/libmcrypt/libmcrypt.SlackBuild3
-rwxr-xr-xsource/l/netpbm/netpbm.SlackBuild3
-rw-r--r--source/l/netpbm/netpbm.gcc14.diff11
-rw-r--r--source/l/pilot-link/pilot-link-0.12.1-var.patch11
-rw-r--r--source/l/pilot-link/pilot-link-0.12.2-open.patch42
-rw-r--r--source/l/pilot-link/pilot-link-0.12.3-clio.patch11
-rw-r--r--source/l/pilot-link/pilot-link-0.12.5-aarch64.patch1348
-rw-r--r--source/l/pilot-link/pilot-link-0.12.5-compiler_warnings.patch3067
-rw-r--r--source/l/pilot-link/pilot-link-0.12.5-ftbfs-f19.patch24
-rw-r--r--source/l/pilot-link/pilot-link-0.12.5-ftbfs-f21.patch22
-rw-r--r--source/l/pilot-link/pilot-link-0.12.5-mp.patch13
-rw-r--r--source/l/pilot-link/pilot-link-c99.patch28
-rw-r--r--source/l/pilot-link/pilot-link-configure-c99.patch30
-rwxr-xr-xsource/l/pilot-link/pilot-link.SlackBuild13
-rw-r--r--source/l/pilot-link/pilot-link.png14.diff96
-rwxr-xr-xsource/l/pygtk/pygtk.SlackBuild3
-rwxr-xr-xsource/l/readline/readline.SlackBuild2
-rwxr-xr-xsource/l/sdl/sdl.SlackBuild3
-rwxr-xr-xsource/l/slang1/slang1.SlackBuild5
-rwxr-xr-xsource/l/svgalib/svgalib.SlackBuild7
-rwxr-xr-xsource/l/t1lib/t1lib.SlackBuild3
-rwxr-xr-xsource/n/alpine/alpine.SlackBuild3
-rwxr-xr-xsource/n/cyrus-sasl/cyrus-sasl.SlackBuild3
-rw-r--r--source/n/elm/config.sh2
-rwxr-xr-xsource/n/htdig/htdig.SlackBuild3
-rwxr-xr-xsource/n/icmpinfo/icmpinfo.SlackBuild2
-rwxr-xr-xsource/n/inetd/inetd.SlackBuild1
-rw-r--r--source/n/inetd/inetd.gcc14.diff9
-rwxr-xr-xsource/n/lftp/lftp.SlackBuild3
-rw-r--r--source/n/lftp/lftp.c99.patch22
-rwxr-xr-xsource/n/links/links.SlackBuild3
-rwxr-xr-xsource/n/metamail/metamail.SlackBuild5
-rw-r--r--source/n/metamail/metamail.gcc14.diff22
-rwxr-xr-xsource/n/nc/nc.SlackBuild3
-rwxr-xr-xsource/n/ncftp/ncftp.SlackBuild8
-rwxr-xr-xsource/n/netdate/netdate.SlackBuild1
-rw-r--r--source/n/netdate/netdate.gcc14.diff11
-rwxr-xr-xsource/n/netkit-rsh/netkit-rsh.SlackBuild2
-rwxr-xr-xsource/n/netkit-rusers/netkit-rusers.SlackBuild2
-rwxr-xr-xsource/n/netkit-rwho/netkit-rwho.SlackBuild3
-rwxr-xr-xsource/n/netkit-timed/netkit-timed.SlackBuild2
-rwxr-xr-xsource/n/netpipes/netpipes.SlackBuild3
-rwxr-xr-xsource/n/netwatch/netwatch.SlackBuild3
-rwxr-xr-xsource/n/nn/nn.SlackBuild3
-rwxr-xr-xsource/n/ntp/ntp.SlackBuild3
-rwxr-xr-xsource/n/obexftp/obexftp.SlackBuild3
-rwxr-xr-xsource/n/openldap/openldap.SlackBuild3
-rwxr-xr-xsource/n/php/php.SlackBuild3
-rwxr-xr-xsource/n/pidentd/pidentd.SlackBuild2
-rwxr-xr-xsource/n/popa3d/popa3d.SlackBuild2
-rw-r--r--source/n/popa3d/popa3d.gcc14.diff11
-rwxr-xr-xsource/n/ppp/ppp.SlackBuild2
-rw-r--r--source/n/ppp/ppp.gcc14.diff11
-rwxr-xr-xsource/n/procmail/procmail.SlackBuild3
-rw-r--r--source/n/procmail/procmail.gcc14.diff12
-rwxr-xr-xsource/n/rp-pppoe/rp-pppoe.SlackBuild3
-rwxr-xr-xsource/n/slrn/slrn.SlackBuild3
-rwxr-xr-xsource/n/tcp_wrappers/tcp_wrappers.SlackBuild2
-rwxr-xr-xsource/n/telnet/telnet.SlackBuild1
-rwxr-xr-xsource/n/tftp-hpa/tftp-hpa.SlackBuild3
-rw-r--r--source/n/tftp-hpa/tftp-hpa.gcc14.diff11
-rw-r--r--source/n/uucp/uucp-configure-c99.patch140
-rwxr-xr-xsource/n/uucp/uucp.SlackBuild6
-rwxr-xr-xsource/tcl/expect/expect.SlackBuild3
-rwxr-xr-xsource/tcl/hfsutils/hfsutils.SlackBuild3
-rwxr-xr-xsource/tcl/tix/tix.SlackBuild3
-rw-r--r--source/x/OpenCC/3b2441b8.patch22
-rwxr-xr-xsource/x/OpenCC/OpenCC.SlackBuild5
-rwxr-xr-xsource/x/compiz/compiz.SlackBuild3
-rwxr-xr-xsource/x/ibus-kkc/ibus-kkc.SlackBuild3
-rwxr-xr-xsource/x/libXaw3dXft/libXaw3dXft.SlackBuild3
-rwxr-xr-xsource/x/libgee/libgee.SlackBuild3
-rwxr-xr-xsource/x/libkkc/libkkc.SlackBuild3
-rwxr-xr-xsource/x/motif/motif.SlackBuild3
-rw-r--r--source/x/x11/configure/xf86-video-nouveau2
-rwxr-xr-xsource/xap/MPlayer/MPlayer.SlackBuild1
-rwxr-xr-xsource/xap/electricsheep/electricsheep.SlackBuild6
-rw-r--r--source/xap/electricsheep/electricsheep.evil.gcc14.diff11
-rwxr-xr-xsource/xap/freerdp/freerdp.SlackBuild3
-rwxr-xr-xsource/xap/fvwm/fvwm.SlackBuild3
-rwxr-xr-xsource/xap/gftp/gftp.SlackBuild3
-rwxr-xr-xsource/xap/gimp/gimp.SlackBuild3
-rwxr-xr-xsource/xap/gnuchess/gnuchess.SlackBuild3
-rwxr-xr-xsource/xap/pidgin/pidgin.SlackBuild5
-rwxr-xr-xsource/xap/rdesktop/rdesktop.SlackBuild3
-rwxr-xr-xsource/xap/sane/sane.SlackBuild3
-rwxr-xr-xsource/xap/seyon/seyon.SlackBuild2
-rwxr-xr-xsource/xap/xgames/xgames.SlackBuild8
-rwxr-xr-xsource/xap/xmms/xmms.SlackBuild5
-rwxr-xr-xsource/xap/xsane/xsane.SlackBuild3
-rwxr-xr-xsource/y/bsd-games/bsd-games.SlackBuild1
-rw-r--r--source/y/bsd-games/patches/bsd-games.gcc14.diff11
157 files changed, 6277 insertions, 204 deletions
diff --git a/source/a/coreutils/coreutils.SlackBuild b/source/a/coreutils/coreutils.SlackBuild
index 4805aa315..560948fe4 100755
--- a/source/a/coreutils/coreutils.SlackBuild
+++ b/source/a/coreutils/coreutils.SlackBuild
@@ -76,6 +76,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
# Don't use icecream:
PATH=$(echo $PATH | sed "s|/usr/libexec/icecc/bin||g" | tr -s : | sed "s/^://g" | sed "s/:$//g")
diff --git a/source/a/infozip/infozip.SlackBuild b/source/a/infozip/infozip.SlackBuild
index 29b89255d..9a63d9ea4 100755
--- a/source/a/infozip/infozip.SlackBuild
+++ b/source/a/infozip/infozip.SlackBuild
@@ -63,6 +63,8 @@ zcat $CWD/zip-patches/zip-3.0-time.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/zip-patches/man.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/zip-patches/zip-3.0-format-security.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/zip-patches/zipnote.patch.gz | patch -p1 --verbose || exit 1
+# GCC 14 fix:
+zcat $CWD/zip-patches/zip.gnu89.diff.gz | patch -p1 --verbose || exit 1
chown -R root:root .
mkdir -p $PKG/usr/doc/zip-$ZIP
@@ -112,6 +114,8 @@ zcat $CWD/unzip-patches/unzip-6.0-timestamp.patch.gz | patch -p1 --verbose || ex
zcat $CWD/unzip-patches/unzip-6.0-cve-2018-1000035-heap-based-overflow.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/unzip-patches/unzip-6.0-cve-2018-18384.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/unzip-patches/unzip-6.0-COVSCAN-fix-unterminated-string.patch.gz | patch -p1 --verbose || exit 1
+# GCC 14 fix:
+zcat $CWD/unzip-patches/unzip.gnu89.diff.gz | patch -p1 --verbose || exit 1
chown -R root:root .
mkdir -p $PKG/usr/doc/unzip-$VERSION
@@ -120,7 +124,7 @@ cp -a BUGS COPYING* Contents History.* INSTALL LICENSE README ToDo WHERE \
chmod 644 $PKG/usr/doc/unzip-$VERSION/*
# -DNO_LCHMOD because Linux systems do not have lchmod()
# -DNOMEMCPY is slower, but prevents file corruption
-make -f unix/Makefile generic LOCAL_UNZIP="-DIZ_HAVE_UXUIDGID -DNOMEMCPY -DNO_LCHMOD" || exit 1
+make -f unix/Makefile generic_gcc LOCAL_UNZIP="-DIZ_HAVE_UXUIDGID -DNOMEMCPY -DNO_LCHMOD" || exit 1
cat unzip > $PKG/usr/bin/unzip
cat unzipsfx > $PKG/usr/bin/unzipsfx
cat funzip > $PKG/usr/bin/funzip
diff --git a/source/a/infozip/unzip-patches/unzip.gnu89.diff b/source/a/infozip/unzip-patches/unzip.gnu89.diff
new file mode 100644
index 000000000..7bbb05031
--- /dev/null
+++ b/source/a/infozip/unzip-patches/unzip.gnu89.diff
@@ -0,0 +1,11 @@
+--- ./unix/Makefile.orig 2009-01-18 16:41:18.000000000 -0600
++++ ./unix/Makefile 2024-05-11 12:50:37.503835132 -0500
+@@ -545,7 +545,7 @@
+ # make $(MAKEF) unzips CF="${CF} `cat flags`"
+
+ generic_gcc:
+- $(MAKE) $(MAKEF) generic CC=gcc IZ_BZIP2="$(IZ_BZIP2)"
++ $(MAKE) $(MAKEF) generic CC="gcc -std=gnu89" IZ_BZIP2="$(IZ_BZIP2)"
+
+ # extensions to perform SVR4 package-creation after compilation
+ generic_pkg: generic svr4package
diff --git a/source/a/infozip/zip-patches/zip.gnu89.diff b/source/a/infozip/zip-patches/zip.gnu89.diff
new file mode 100644
index 000000000..58e5f0436
--- /dev/null
+++ b/source/a/infozip/zip-patches/zip.gnu89.diff
@@ -0,0 +1,11 @@
+--- ./unix/Makefile.orig 2024-05-11 12:47:26.628830862 -0500
++++ ./unix/Makefile 2024-05-11 12:48:43.705832586 -0500
+@@ -202,7 +202,7 @@
+ eval $(MAKE) $(MAKEF) zips `cat flags`
+
+ generic_gcc:
+- $(MAKE) $(MAKEF) generic CC=gcc CPP="gcc -E"
++ $(MAKE) $(MAKEF) generic CC="gcc -std=gnu89" CPP="gcc -E"
+
+ # AT&T 6300 PLUS (don't know yet how to allocate 64K bytes):
+ att6300nodir:
diff --git a/source/a/less/007521ac3c95bc76.patch b/source/a/less/007521ac3c95bc76.patch
deleted file mode 100644
index 663f222c0..000000000
--- a/source/a/less/007521ac3c95bc76.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 007521ac3c95bc76e3d59c6dbfe75d06c8075c33 Mon Sep 17 00:00:00 2001
-From: Mark Nudelman <markn@greenwoodsoftware.com>
-Date: Thu, 11 Apr 2024 17:49:48 -0700
-Subject: [PATCH] Fix bug when viewing a file whose name contains a newline.
-
----
- filename.c | 31 +++++++++++++++++++++++++------
- 1 file changed, 25 insertions(+), 6 deletions(-)
-
-diff --git a/filename.c b/filename.c
-index f90e0e82..a52c6354 100644
---- a/filename.c
-+++ b/filename.c
-@@ -127,11 +127,20 @@ static constant char * metachars(void)
- /*
- * Is this a shell metacharacter?
- */
--static int metachar(char c)
-+static lbool metachar(char c)
- {
- return (strchr(metachars(), c) != NULL);
- }
-
-+/*
-+ * Must use quotes rather than escape char for this metachar?
-+ */
-+static lbool must_quote(char c)
-+{
-+ /* {{ Maybe the set of must_quote chars should be configurable? }} */
-+ return (c == '\n');
-+}
-+
- /*
- * Insert a backslash before each metacharacter in a string.
- */
-@@ -164,6 +173,9 @@ public char * shell_quoten(constant char *s, size_t slen)
- * doesn't support escape chars. Use quotes.
- */
- use_quotes = TRUE;
-+ } else if (must_quote(*p))
-+ {
-+ len += 3; /* open quote + char + close quote */
- } else
- {
- /*
-@@ -194,15 +206,22 @@ public char * shell_quoten(constant char *s, size_t slen)
- constant char *es = s + slen;
- while (s < es)
- {
-- if (metachar(*s))
-+ if (!metachar(*s))
- {
-- /*
-- * Add the escape char.
-- */
-+ *np++ = *s++;
-+ } else if (must_quote(*s))
-+ {
-+ /* Surround the char with quotes. */
-+ *np++ = openquote;
-+ *np++ = *s++;
-+ *np++ = closequote;
-+ } else
-+ {
-+ /* Insert an escape char before the char. */
- strcpy(np, esc);
- np += esclen;
-+ *np++ = *s++;
- }
-- *np++ = *s++;
- }
- *np = '\0';
- }
diff --git a/source/a/less/less.SlackBuild b/source/a/less/less.SlackBuild
index b4ea88c72..1ea2e2077 100755
--- a/source/a/less/less.SlackBuild
+++ b/source/a/less/less.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=less
VERSION=${VERSION:-$(echo less-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -85,9 +85,6 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
-# newline in filenames patch for CVE-2024-32487:
-cat $CWD/007521ac3c95bc76.patch | patch -p1 --verbose || exit 1
-
if [ ! -r configure ]; then
if [ -x ./autogen.sh ]; then
NOCONFIGURE=1 ./autogen.sh
diff --git a/source/a/libcgroup/libcgroup.SlackBuild b/source/a/libcgroup/libcgroup.SlackBuild
index e093f2807..edaae94dc 100755
--- a/source/a/libcgroup/libcgroup.SlackBuild
+++ b/source/a/libcgroup/libcgroup.SlackBuild
@@ -63,6 +63,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=int-conversion"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
diff --git a/source/a/minicom/minicom.SlackBuild b/source/a/minicom/minicom.SlackBuild
index 454e2b28a..7fd52476c 100755
--- a/source/a/minicom/minicom.SlackBuild
+++ b/source/a/minicom/minicom.SlackBuild
@@ -59,6 +59,9 @@ else
SLKCFLAGS="-O2"
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int -Wno-error=implicit-function-declaration"
+
rm -rf $PKG
mkdir -p $TMP $PKG
@@ -123,6 +126,7 @@ zcat $CWD/lrzsz_0.12.21-5.diff.gz | patch -p1 --verbose || exit 1
rm -f debian/patches/{206499_ymodemg.diff.unchecked,206648_dszlog.diff.unchecked}
for i in debian/patches/* ; do patch -p1 < $i || exit 1 ; done
+CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--mandir=/usr/man \
diff --git a/source/a/nvi/nvi.SlackBuild b/source/a/nvi/nvi.SlackBuild
index ea7859e52..58b5d0a6b 100755
--- a/source/a/nvi/nvi.SlackBuild
+++ b/source/a/nvi/nvi.SlackBuild
@@ -68,6 +68,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
@@ -92,7 +95,7 @@ done
# Configure, build, and install:
cd build.unix
- CFLAGS="$SLKCFLAGS" \
+ OPTFLAG="$SLKCFLAGS" \
../dist/configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
diff --git a/source/a/nvi/patches/0039-Add-function-prototypes-to-fix-implicit-function-dec.patch b/source/a/nvi/patches/0039-Add-function-prototypes-to-fix-implicit-function-dec.patch
new file mode 100644
index 000000000..6e2f8226e
--- /dev/null
+++ b/source/a/nvi/patches/0039-Add-function-prototypes-to-fix-implicit-function-dec.patch
@@ -0,0 +1,87 @@
+From: Michael Hudson-Doyle <michael.hudson@ubuntu.com>
+Date: Thu, 11 Apr 2024 11:18:39 +0200
+Subject: Add function prototypes to fix implicit function declaration errors
+
+Reviewed-By: Tobias Heider <me@tobhe.de>
+Bug-Debian: https://bugs.debian.org/1066285
+---
+ cl/cl.h | 5 +++++
+ cl/cl_funcs.c | 6 ++++++
+ common/conv.h | 3 +++
+ common/multibyte.h | 6 ++++++
+ dist/configure | 1 +
+ 5 files changed, 21 insertions(+)
+
+diff --git a/cl/cl.h b/cl/cl.h
+index 3d71410..4ff232d 100644
+--- a/cl/cl.h
++++ b/cl/cl.h
+@@ -26,6 +26,11 @@
+ #endif
+ #endif
+
++/*
++ * for setupterm()
++ */
++#include <term.h>
++
+ typedef struct _cl_private {
+ char ibuf[256]; /* Input keys. */
+
+diff --git a/cl/cl_funcs.c b/cl/cl_funcs.c
+index c5fc597..b6174ef 100644
+--- a/cl/cl_funcs.c
++++ b/cl/cl_funcs.c
+@@ -31,6 +31,12 @@ static const char sccsid[] = "$Id: cl_funcs.c,v 10.72 2002/03/02 23:18:33 skimo
+ #include "../vi/vi.h"
+ #include "cl.h"
+
++/*
++ * This is declared by ncurses.h, but only if _XOPEN_SOURCE is set and lots of
++ * other things break if we define that.
++ */
++extern int waddnwstr (WINDOW *,const wchar_t *,int);
++
+ static void cl_rdiv __P((SCR *));
+
+ static int
+diff --git a/common/conv.h b/common/conv.h
+index 76b06c1..a7675c4 100644
+--- a/common/conv.h
++++ b/common/conv.h
+@@ -21,3 +21,6 @@ struct _conv {
+ char2wchar_t input2int;
+ wchar2char_t int2disp;
+ };
++
++extern int conv_enc (SCR *sp, int option, char *enc);
++extern void conv_init (SCR *orig, SCR *sp);
+diff --git a/common/multibyte.h b/common/multibyte.h
+index 820f4ec..2484521 100644
+--- a/common/multibyte.h
++++ b/common/multibyte.h
+@@ -5,6 +5,12 @@
+ #include <wchar.h>
+ #include <wctype.h>
+
++/*
++ * This is declared by wchar.h, but only if _XOPEN_SOURCE is set and lots of
++ * other things break if we define that.
++ */
++extern int wcwidth (wchar_t c);
++
+ typedef wchar_t RCHAR_T;
+ #define RCHAR_T_MAX ((1 << 24)-1)
+ typedef wchar_t CHAR_T;
+diff --git a/dist/configure b/dist/configure
+index b23e167..d7fb54f 100755
+--- a/dist/configure
++++ b/dist/configure
+@@ -27385,6 +27385,7 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <$CURSHEADER>
++#include <term.h>
+ int
+ main ()
+ {
diff --git a/source/a/splitvt/splitvt.SlackBuild b/source/a/splitvt/splitvt.SlackBuild
index 4b37790be..a02c5898e 100755
--- a/source/a/splitvt/splitvt.SlackBuild
+++ b/source/a/splitvt/splitvt.SlackBuild
@@ -55,7 +55,13 @@ rm -rf splitvt-1.6.6
tar xzvf $CWD/splitvt-1.6.6.tar.gz
cd splitvt-1.6.6
chown -R root:root .
+
+cat $CWD/splitvt.configure.gcc14.diff | patch -p1 --verbose || exit 1
+
./configure
+
+sed -i "s|DNEED_SELECT_H|DNEED_SELECT_H -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=return-mismatch|g" Makefile
+
make || exit 1
mkdir -p $PKG/usr/bin
cat splitvt > $PKG/usr/bin/splitvt
diff --git a/source/a/splitvt/splitvt.configure.gcc14.diff b/source/a/splitvt/splitvt.configure.gcc14.diff
new file mode 100644
index 000000000..e3652140b
--- /dev/null
+++ b/source/a/splitvt/splitvt.configure.gcc14.diff
@@ -0,0 +1,11 @@
+--- ./configure.orig 2007-04-01 10:22:48.000000000 -0500
++++ ./configure 2024-05-11 18:35:55.108298585 -0500
+@@ -4,7 +4,7 @@
+ QUIET="-v"
+ # use $CC if set, else set it to cc
+ : ${CC:=cc}
+-CFLAGS=
++CFLAGS="-Wno-error=implicit-function-declaration -Wno-error=implicit-int"
+ MAKE="echo \"Done. Type 'make' to build\""
+
+ echo "Making configuration..."
diff --git a/source/a/splitvt/splitvt.gcc14.diff b/source/a/splitvt/splitvt.gcc14.diff
new file mode 100644
index 000000000..2df39264f
--- /dev/null
+++ b/source/a/splitvt/splitvt.gcc14.diff
@@ -0,0 +1,11 @@
+--- ./configure.orig 2007-04-01 10:22:48.000000000 -0500
++++ ./configure 2024-05-11 18:30:49.454291747 -0500
+@@ -4,7 +4,7 @@
+ QUIET="-v"
+ # use $CC if set, else set it to cc
+ : ${CC:=cc}
+-CFLAGS=
++CFLAGS="-Wno-error=implicit-function-declaration -Wno-error=implicit-int"
+ MAKE="echo \"Done. Type 'make' to build\""
+
+ echo "Making configuration..."
diff --git a/source/a/sysvinit-functions/function-src.gcc14.diff b/source/a/sysvinit-functions/function-src.gcc14.diff
new file mode 100644
index 000000000..0f46f2805
--- /dev/null
+++ b/source/a/sysvinit-functions/function-src.gcc14.diff
@@ -0,0 +1,9 @@
+--- ./Makefile.orig 2007-04-29 13:15:50.000000000 -0500
++++ ./Makefile 2024-05-10 18:22:44.593348134 -0500
+@@ -1,5 +1,5 @@
+
+-CFLAGS=-O2 -Wall -D_GNU_SOURCE
++CFLAGS=-O2 -Wall -D_GNU_SOURCE -Wno-error=incompatible-pointer-types
+
+ PROGS=usleep initlog fstab-decode consoletype
+ PPPWATCH_OBJS=ppp-watch.o shvar.o
diff --git a/source/a/sysvinit-functions/sysvinit-functions.SlackBuild b/source/a/sysvinit-functions/sysvinit-functions.SlackBuild
index cfd18bc5e..ab7526cd9 100755
--- a/source/a/sysvinit-functions/sysvinit-functions.SlackBuild
+++ b/source/a/sysvinit-functions/sysvinit-functions.SlackBuild
@@ -66,6 +66,7 @@ rm -rf function-src-$VERSION
# A small patch was applied to initlog to shut it the %^@& up.
tar xjf $CWD/function-src-$VERSION.tar.bz2 || exit 1
cd function-src-$VERSION
+cat $CWD/function-src.gcc14.diff | patch -p1 --verbose || exit 1
make || exit 1
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
mkdir -p $PKG/bin $PKG/sbin $PKG/usr/man/man{1,8}
diff --git a/source/a/unarj/Makefile b/source/a/unarj/Makefile
index 95483e751..2445bb4ba 100644
--- a/source/a/unarj/Makefile
+++ b/source/a/unarj/Makefile
@@ -4,7 +4,7 @@
#
CC = gcc
-CFLAGS = -O2 -DUNIX
+CFLAGS = -O2 -DUNIX -Wno-error=implicit-function-declaration
INSTALLDIR=/usr/bin
unarj: unarj.o decode.o environ.o
diff --git a/source/a/util-linux/bsdstrings.gcc14.diff b/source/a/util-linux/bsdstrings.gcc14.diff
new file mode 100644
index 000000000..32cffe03f
--- /dev/null
+++ b/source/a/util-linux/bsdstrings.gcc14.diff
@@ -0,0 +1,12 @@
+--- ./Makefile.orig 2000-05-09 16:18:53.000000000 -0500
++++ ./Makefile 2024-05-12 12:42:00.509961363 -0500
+@@ -1,7 +1,8 @@
+ CC = gcc
++CFLAGS = -O -Wno-error=implicit-function-declaration -Wno-error=implicit-int
+
+ strings: strings.o getopt.o
+- gcc -O -o strings strings.c getopt.c
++ gcc $(CFLAGS) -o strings strings.c getopt.c
+
+ clean:
+ rm -f a.out core *~ *.o strings
diff --git a/source/a/util-linux/util-linux.SlackBuild b/source/a/util-linux/util-linux.SlackBuild
index 767804a2f..130c7d50b 100755
--- a/source/a/util-linux/util-linux.SlackBuild
+++ b/source/a/util-linux/util-linux.SlackBuild
@@ -254,6 +254,7 @@ rm -rf bsdstrings
tar xvf $CWD/bsdstrings.tar.gz || exit 1
cd bsdstrings || exit 1
zcat $CWD/bsdstrings-util-linux_overflow.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/bsdstrings.gcc14.diff.gz | patch -p1 --verbose || exit 1
make || exit 1
strip strings
cat strings > $PKG/usr/bin/strings-BSD
@@ -286,7 +287,8 @@ chown -R root:root .
zcat $CWD/setserial-rc.serial.diff.gz | patch -E -p1 --verbose || exit 1
zcat $CWD/setserial-undef_TIOCGHAYESESP.diff.gz | patch -E -p1 --verbose || exit 1
# The original config.{guess,sub} do not work on x86_64
-cp -p /usr/share/libtool/config/config.{guess,sub} .
+cp -p /usr/share/libtool/build-aux/config.{guess,sub} .
+CFLAGS="$SLKCFLAGS -Wno-error=implicit-int -Wno-error=implicit-function-declaration" \
./configure --prefix=/usr || exit 1
make || exit 1
strip setserial
@@ -370,4 +372,3 @@ zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $TMP/util-linux-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/a/zoo/zoo.SlackBuild b/source/a/zoo/zoo.SlackBuild
index cf3576065..863d084b0 100755
--- a/source/a/zoo/zoo.SlackBuild
+++ b/source/a/zoo/zoo.SlackBuild
@@ -67,6 +67,7 @@ tar xf $CWD/zoo_${VERSION}-${DEBPATCH}.debian.tar.?z
for diff in debian/patches/*patch ; do
cat $diff | patch -p1 --verbose --backup --suffix=.orig || exit 1
done
+zcat $CWD/zoo.gcc14.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
make linux || exit 1
mkdir -p $PKG/usr/bin
diff --git a/source/a/zoo/zoo.gcc14.diff b/source/a/zoo/zoo.gcc14.diff
new file mode 100644
index 000000000..5d507f423
--- /dev/null
+++ b/source/a/zoo/zoo.gcc14.diff
@@ -0,0 +1,11 @@
+--- ./makefile.orig 2024-05-11 01:34:14.429927290 -0500
++++ ./makefile 2024-05-11 01:35:16.723928683 -0500
+@@ -102,7 +102,7 @@
+
+ # Linux
+ linux:
+- $(MAKE) CC="gcc" CFLAGS="-c $(OPTIM) $(LINTFLAGS) -DLINUX -DANSI_HDRS" LDFLAGS="$(LDFLAGS)" $(TARGETS)
++ $(MAKE) CC="gcc" CFLAGS="-c $(OPTIM) $(LINTFLAGS) -DLINUX -DANSI_HDRS -Wno-error=implicit-int" LDFLAGS="$(LDFLAGS)" $(TARGETS)
+
+ # Linux64
+ linux64:
diff --git a/source/ap/amp/amp.SlackBuild b/source/ap/amp/amp.SlackBuild
index 1f955b2a9..85ee4749d 100755
--- a/source/ap/amp/amp.SlackBuild
+++ b/source/ap/amp/amp.SlackBuild
@@ -58,7 +58,7 @@ zcat $CWD/amp-gcc34.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exi
# Avoid crashes caused by using agressive optimization with newer compilers:
zcat $CWD/amp.do.not.overoptimize.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
chown -R root:root .
-./configure --prefix=/usr $ARCH-slackware-linux || exit 1
+CFLAGS="-Wno-error=implicit-int" ./configure --prefix=/usr $ARCH-slackware-linux || exit 1
make || exit 1
mkdir -p $PKG/usr/doc $PKG/usr/bin $PKG/usr/man/man1
strip amp
diff --git a/source/ap/bpe/bpe.SlackBuild b/source/ap/bpe/bpe.SlackBuild
index f353c1430..3ed4529e1 100755
--- a/source/ap/bpe/bpe.SlackBuild
+++ b/source/ap/bpe/bpe.SlackBuild
@@ -54,6 +54,9 @@ else
SLKCFLAGS="-O2"
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-bpe
@@ -71,7 +74,8 @@ zcat $CWD/bpe.port.to.strerror.diff.gz | patch -p1 --verbose || exit 1
CFLAGS="$SLKCFLAGS" \
./configure \
- --prefix=/usr || exit 1
+ --prefix=/usr \
+ $ARCH-slackware-linux-gnu || exit 1
make || exit 1
make install DESTDIR=$PKG || exit 1
( cd $PKG
@@ -88,4 +92,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
makepkg -l y -c n $TMP/bpe-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/ap/cdrtools/cdrtools.SlackBuild b/source/ap/cdrtools/cdrtools.SlackBuild
index 34334abbf..fe4f79166 100755
--- a/source/ap/cdrtools/cdrtools.SlackBuild
+++ b/source/ap/cdrtools/cdrtools.SlackBuild
@@ -66,6 +66,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+# GCC 14 "fix":
+export CFLAGS="-Wno-error=implicit-int -Wno-error=implicit-function-declaration"
+
# When running make below, you'll see "errors" like these:
# config.h:34:10: fatal error: lconfig.h: No such file or directory
# 34 | #include "lconfig.h"
diff --git a/source/ap/ghostscript/ghostscript.SlackBuild b/source/ap/ghostscript/ghostscript.SlackBuild
index af557de3e..fde47b4b3 100755
--- a/source/ap/ghostscript/ghostscript.SlackBuild
+++ b/source/ap/ghostscript/ghostscript.SlackBuild
@@ -68,6 +68,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types -Wno-error=int-conversion"
+
cd $TMP
rm -rf ${SRCPREFIX}${PKGNAM}-${VERSION}
tar xvf $CWD/${SRCPREFIX}${PKGNAM}-$VERSION.tar.?z || exit 1
diff --git a/source/ap/gutenprint/gutenprint.SlackBuild b/source/ap/gutenprint/gutenprint.SlackBuild
index 90c829319..2904ee44c 100755
--- a/source/ap/gutenprint/gutenprint.SlackBuild
+++ b/source/ap/gutenprint/gutenprint.SlackBuild
@@ -60,6 +60,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=int-conversion"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-gutenprint
rm -rf $PKG
@@ -76,6 +79,7 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
diff --git a/source/ap/hplip/hplip-covscan.patch b/source/ap/hplip/hplip-covscan.patch
new file mode 100644
index 000000000..6c8858165
--- /dev/null
+++ b/source/ap/hplip/hplip-covscan.patch
@@ -0,0 +1,615 @@
+diff -up hplip-3.23.3/common/utils.c.covscan hplip-3.23.3/common/utils.c
+--- hplip-3.23.3/common/utils.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/common/utils.c 2023-05-29 13:58:10.969395214 +0200
+@@ -1,5 +1,9 @@
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
++
+ #include "utils.h"
+-#include "string.h"
++#include <string.h>
+ #include <dlfcn.h>
+ #include <sys/stat.h>
+ #include <errno.h>
+diff -up hplip-3.23.3/io/hpmud/hpmud.c.covscan hplip-3.23.3/io/hpmud/hpmud.c
+--- hplip-3.23.3/io/hpmud/hpmud.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/io/hpmud/hpmud.c 2023-05-29 13:58:10.970395208 +0200
+@@ -759,6 +759,7 @@ enum HPMUD_RESULT hpmud_get_dstat(HPMUD_
+ }
+
+ strncpy(ds->uri, msp->device[dd].uri, sizeof(ds->uri));
++ ds->uri[sizeof(ds->uri)-1] = '\0';
+ ds->io_mode = msp->device[dd].io_mode;
+ ds->channel_cnt = msp->device[dd].channel_cnt;
+ ds->mlc_up = msp->device[dd].mlc_up;
+diff -up hplip-3.23.3/io/hpmud/jd.c.covscan hplip-3.23.3/io/hpmud/jd.c
+--- hplip-3.23.3/io/hpmud/jd.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/io/hpmud/jd.c 2023-05-29 13:58:10.970395208 +0200
+@@ -31,6 +31,7 @@
+ #endif
+
+ #include <signal.h>
++#include <stdlib.h>
+ #include "hpmud.h"
+ #include "hpmudi.h"
+
+diff -up hplip-3.23.3/io/hpmud/model.c.covscan hplip-3.23.3/io/hpmud/model.c
+--- hplip-3.23.3/io/hpmud/model.c.covscan 2023-05-29 13:58:10.958395279 +0200
++++ hplip-3.23.3/io/hpmud/model.c 2023-05-29 13:58:10.970395208 +0200
+@@ -117,6 +117,7 @@ static int ReadConfig()
+ if (rcbuf[0] == '[')
+ {
+ strncpy(section, rcbuf, sizeof(section)); /* found new section */
++ section[sizeof(section)-1] = '\0';
+ continue;
+ }
+
+@@ -125,6 +126,7 @@ static int ReadConfig()
+ if ((strncasecmp(section, "[dirs]", 6) == 0) && (strcasecmp(key, "home") == 0))
+ {
+ strncpy(homedir, value, sizeof(homedir));
++ homedir[sizeof(homedir)-1] = '\0';
+ break; /* done */
+ }
+ }
+diff -up hplip-3.23.3/io/hpmud/musb.c.covscan hplip-3.23.3/io/hpmud/musb.c
+--- hplip-3.23.3/io/hpmud/musb.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/io/hpmud/musb.c 2023-05-29 13:58:10.970395208 +0200
+@@ -776,7 +776,7 @@ static int device_id(int fd, unsigned ch
+ len = size-1; /* leave byte for zero termination */
+ if (len > 2)
+ len -= 2;
+- memcpy(buffer, buffer+2, len); /* remove length */
++ memmove(buffer, buffer+2, len); /* remove length */
+ buffer[len]=0;
+ DBG("read actual device_id successfully fd=%d len=%d\n", fd, len);
+
+diff -up hplip-3.23.3/io/hpmud/pp.c.covscan hplip-3.23.3/io/hpmud/pp.c
+--- hplip-3.23.3/io/hpmud/pp.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/io/hpmud/pp.c 2023-05-29 13:58:10.970395208 +0200
+@@ -632,7 +632,7 @@ static int device_id(int fd, char *buffe
+ len = size-1; /* leave byte for zero termination */
+ if (len > 2)
+ len -= 2;
+- memcpy(buffer, buffer+2, len); /* remove length */
++ memmove(buffer, buffer+2, len); /* remove length */
+ buffer[len]=0;
+
+ DBG("read actual device_id successfully fd=%d len=%d\n", fd, len);
+diff -up hplip-3.23.3/Makefile.am.covscan hplip-3.23.3/Makefile.am
+--- hplip-3.23.3/Makefile.am.covscan 2023-05-29 13:58:10.944395361 +0200
++++ hplip-3.23.3/Makefile.am 2023-05-29 13:58:10.969395214 +0200
+@@ -3,7 +3,7 @@
+ #
+ # (c) 2004-2015 Copyright HP Development Company, LP
+ # Author: David Suffield, Naga Samrat Chowdary Narla, Sarbeswar Meher
+-INCLUDES = -Iip -Iio/hpmud -Iscan/sane -Iprnt/hpijs -Icommon/
++INCLUDES = -Iip -Iio/hpmud -Iscan/sane -Iprnt/hpijs -Icommon/ -Iprotocol
+ CFLAGS+= -DCONFDIR=\"$(hplip_confdir)\"
+ CXXFLAGS+= -DCONFDIR=\"$(hplip_confdir)\"
+
+@@ -310,7 +310,7 @@ dist_pcard_DATA = pcard/__init__.py pcar
+ pcardextdir = $(pyexecdir)
+ pcardext_LTLIBRARIES = pcardext.la
+ pcardext_la_LDFLAGS = -module -avoid-version
+-pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c
++pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c pcard/pcardext/pcardext.h
+ pcardext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
+
+ # prnt
+@@ -322,7 +322,7 @@ lib_LTLIBRARIES += libhpipp.la
+ #hpipp_LTLIBRARIES = hpipp.la
+ #hpipp_la_LDFLAGS = -module -avoid-version
+ libhpipp_la_SOURCES = protocol/hp_ipp.c protocol/hp_ipp.h protocol/hp_ipp_i.h
+-libhpipp_la_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\"
++libhpipp_la_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\" -D_GNU_SOURCE
+ libhpipp_la_LDFLAGS = -version-info 0:1:0
+ libhpipp_la_LIBADD = libhpmud.la
+
+diff -up hplip-3.23.3/pcard/fat.c.covscan hplip-3.23.3/pcard/fat.c
+--- hplip-3.23.3/pcard/fat.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/pcard/fat.c 2023-05-29 13:58:10.971395203 +0200
+@@ -519,14 +519,17 @@ int FatFreeSpace(void)
+
+ int FatDiskAttributes( PHOTO_CARD_ATTRIBUTES * pa )
+ {
+- strncpy( pa->OEMID, bpb.OEMID, 8 );
++ strncpy(pa->OEMID, bpb.OEMID, sizeof(pa->OEMID));
++ pa->OEMID[sizeof(pa->OEMID)-1] = '\0';
+ pa->BytesPerSector = bpb.BytesPerSector;
+ pa->SectorsPerCluster = bpb.SectorsPerCluster;
+ pa->ReservedSectors = bpb.ReservedSectors;
+ pa->SectorsPerFat = bpb.SectorsPerFat;
+ pa->RootEntries = bpb.RootEntries;
+- strncpy( pa->SystemID, (char *)bpb.SystemID, 8 );
+- strncpy( pa->VolumeLabel, (char *)bpb.VolumeLabel, 11 );
++ strncpy(pa->SystemID, (char *)bpb.SystemID, sizeof(pa->SystemID));
++ pa->SystemID[sizeof(pa->SystemID)-1] = '\0';
++ strncpy(pa->VolumeLabel, (char *)bpb.VolumeLabel, sizeof(pa->VolumeLabel));
++ pa->VolumeLabel[sizeof(pa->VolumeLabel)-1] = '\0';
+ pa->WriteProtect = da.WriteProtect;
+
+ return 0;
+@@ -741,6 +744,7 @@ int FatSetCWD(char *dir)
+ return 1;
+
+ strncpy(cwd.Name, fa.Name, sizeof(cwd.Name));
++ cwd.Name[sizeof(cwd.Name)-1] = '\0';
+ cwd.StartSector = ConvertClusterToSector(fa.StartCluster);
+ cwd.CurrSector = cwd.StartSector;
+ cwd.StartCluster = fa.StartCluster;
+diff -up hplip-3.23.3/prnt/hpijs/context2.cpp.covscan hplip-3.23.3/prnt/hpijs/context2.cpp
+--- hplip-3.23.3/prnt/hpijs/context2.cpp.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/prnt/hpijs/context2.cpp 2023-05-29 13:58:10.971395203 +0200
+@@ -1302,6 +1302,7 @@ DRIVER_ERROR PrintContext::SelectDevice
+ if(0 == strnlen((const char *)pSS->strDevID, DevIDBuffSize))
+ {
+ strncpy((char *)pSS->strDevID,szDeviceId,DevIDBuffSize);
++ pSS->strDevID[sizeof(pSS->strDevID)-1] = '\0';
+ }
+ thePrinter = pPFI->CreatePrinter (pSS, familyHandle);
+ if (thePrinter->constructor_error != NO_ERROR)
+diff -up hplip-3.23.3/prnt/hpijs/systemservices.cpp.covscan hplip-3.23.3/prnt/hpijs/systemservices.cpp
+--- hplip-3.23.3/prnt/hpijs/systemservices.cpp.covscan 2023-03-28 09:26:27.000000000 +0200
++++ hplip-3.23.3/prnt/hpijs/systemservices.cpp 2023-05-29 13:58:10.971395203 +0200
+@@ -396,7 +396,10 @@ void SystemServices::AdjustIO(IO_MODE IM
+ IOMode.bDevID =IM.bDevID && IOMode.bDevID;
+
+ if (model)
++ {
+ strncpy(strModel,model, sizeof(strModel));
++ strModel[sizeof(strModel)-1] = '\0';
++ }
+ }
+
+ APDK_END_NAMESPACE
+diff -up hplip-3.23.3/prnt/hpps/hppsfilter.c.covscan hplip-3.23.3/prnt/hpps/hppsfilter.c
+--- hplip-3.23.3/prnt/hpps/hppsfilter.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/prnt/hpps/hppsfilter.c 2023-05-29 13:58:10.972395197 +0200
+@@ -274,13 +274,13 @@ static void WriteHeader(char **argument)
+ /* Writing Header Information
+ argument[1] = JOB ID , argument[2]= USERNAME, argument[3] = TITLE */
+ hpwrite("\x1b%-12345X@PJL JOBNAME=", strlen("\x1b%-12345X@PJL JOBNAME="));
+- sprintf(buffer, "hplip_%s_%s\x0a", argument[2], argument[1]);
++ snprintf(buffer, MAX_BUFFER-1, "hplip_%s_%s\x0a", argument[2], argument[1]);
+ hpwrite(buffer, strlen(buffer));
+ memset(buffer, 0, sizeof(buffer));
+- sprintf(buffer, "@PJL SET USERNAME=\"%s\"\x0a", argument[2]);
++ snprintf(buffer, MAX_BUFFER-1, "@PJL SET USERNAME=\"%s\"\x0a", argument[2]);
+ hpwrite(buffer, strlen(buffer));
+ memset(buffer, 0, sizeof(buffer));
+- sprintf(buffer, "@PJL SET JOBNAME=\"%s\"\x0a", argument[3]);
++ snprintf(buffer, MAX_BUFFER-1, "@PJL SET JOBNAME=\"%s\"\x0a", argument[3]);
+ hpwrite(buffer, strlen(buffer));
+ fprintf(stderr, "HP PS filter func = WriteHeader : WRITING PJL HEADER INFO\n");
+ return;
+diff -up hplip-3.23.3/protocol/hp_ipp.h.covscan hplip-3.23.3/protocol/hp_ipp.h
+--- hplip-3.23.3/protocol/hp_ipp.h.covscan 2023-05-29 13:58:10.972395197 +0200
++++ hplip-3.23.3/protocol/hp_ipp.h 2023-05-29 13:59:03.645085468 +0200
+@@ -168,6 +168,11 @@ HPIPP_RESULT parseResponseHeader(char* h
+ HPIPP_RESULT prepend_http_header(raw_ipp *raw_request,const char *resource);
+ enum HPMUD_RESULT sendUSBRequest(char *buf, int size, raw_ipp *responseptr, char * device_uri);
+ enum HPMUD_RESULT sendUSBFileRequest(char *buf, int size, int fileHandle,raw_ipp *responseptr, char *device_uri);
++void _releaseCupsInstance();
++int addCupsPrinter(char *name, char *device_uri, char *location, char *ppd_file, char *model, char *info);
++int delCupsPrinter(char *pr_name);
++int setDefaultCupsPrinter(char *pr_name);
++int controlCupsPrinter(char *pr_name, int op);
+
+ ipp_t * createFaxDetailRequest(const char *printer_name);
+ ipp_t * getDeviceFaxModemAttributes(char* device_uri,char* printer_name, int *count);
+diff -up hplip-3.23.3/scan/sane/bb_ledm.c.covscan hplip-3.23.3/scan/sane/bb_ledm.c
+--- hplip-3.23.3/scan/sane/bb_ledm.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/bb_ledm.c 2023-05-29 13:58:10.972395197 +0200
+@@ -26,6 +26,7 @@
+ # include "http.h"
+ # include "xml.h"
+ # include <stdlib.h>
++# include <unistd.h>
+
+ # include <stdint.h>
+
+diff -up hplip-3.23.3/scan/sane/common.h.covscan hplip-3.23.3/scan/sane/common.h
+--- hplip-3.23.3/scan/sane/common.h.covscan 2023-05-29 13:58:10.727396637 +0200
++++ hplip-3.23.3/scan/sane/common.h 2023-05-29 13:58:10.972395197 +0200
+@@ -36,7 +36,7 @@
+ #define _STRINGIZE(x) #x
+ #define STRINGIZE(x) _STRINGIZE(x)
+
+-#define BUG(args...) {syslog(LOG_ERR, __FILE__ " " STRINGIZE(__LINE__) ": " args); DBG(2, __FILE__ " " STRINGIZE(__LINE__) ": " args);}
++#define BUG_SCAN(args...) {syslog(LOG_ERR, __FILE__ " " STRINGIZE(__LINE__) ": " args); DBG(2, __FILE__ " " STRINGIZE(__LINE__) ": " args);}
+ #define BUG_DUMP(data, size) bugdump((data), (size))
+ #define BUG_SZ(args...) {syslog(LOG_ERR, args); DBG(2, args);}
+
+diff -up hplip-3.23.3/scan/sane/escl.c.covscan hplip-3.23.3/scan/sane/escl.c
+--- hplip-3.23.3/scan/sane/escl.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/escl.c 2023-05-29 13:58:10.972395197 +0200
+@@ -849,7 +849,7 @@ SANE_Status escl_control_option(SANE_Han
+ //DBG8("escl_control_option (option=%s) action=%d\n", ps->option[option].name, action);
+ if (stat != SANE_STATUS_GOOD)
+ {
+- BUG("control_option failed: option=%s action=%s\n", ps->option[option].name, action==SANE_ACTION_GET_VALUE ? "get" : action==SANE_ACTION_SET_VALUE ? "set" : "auto");
++ BUG_SCAN("control_option failed: option=%s action=%s\n", ps->option[option].name, action==SANE_ACTION_GET_VALUE ? "get" : action==SANE_ACTION_SET_VALUE ? "set" : "auto");
+ }
+
+ return stat;
+@@ -1159,7 +1159,7 @@ void escl_close(SANE_Handle handle)
+
+ if (ps == NULL || ps != session)
+ {
+- BUG("invalid sane_close\n");
++ BUG_SCAN("invalid sane_close\n");
+ return;
+ }
+
+diff -up hplip-3.23.3/scan/sane/http.c.covscan hplip-3.23.3/scan/sane/http.c
+--- hplip-3.23.3/scan/sane/http.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/http.c 2023-05-29 13:58:10.973395191 +0200
+@@ -36,6 +36,7 @@
+ #include <string.h>
+ #include <syslog.h>
+ #include <ctype.h>
++#include <unistd.h>
+ #include "hpmud.h"
+ #include "http.h"
+
+diff -up hplip-3.23.3/scan/sane/io.c.covscan hplip-3.23.3/scan/sane/io.c
+--- hplip-3.23.3/scan/sane/io.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/io.c 2023-05-29 13:58:10.973395191 +0200
+@@ -50,7 +50,7 @@ int __attribute__ ((visibility ("hidden"
+
+ if (dbus_error_is_set(&dbus_err))
+ {
+- BUG("dBus Connection Error (%s)!\n", dbus_err.message);
++ BUG_SCAN("dBus Connection Error (%s)!\n", dbus_err.message);
+ dbus_error_free(&dbus_err);
+ }
+
+@@ -79,7 +79,7 @@ int __attribute__ ((visibility ("hidden"
+
+ if (NULL == msg)
+ {
+- BUG("dbus message is NULL!\n");
++ BUG_SCAN("dbus message is NULL!\n");
+ return 0;
+ }
+
+@@ -94,7 +94,7 @@ int __attribute__ ((visibility ("hidden"
+
+ if (!dbus_connection_send(dbus_conn, msg, NULL))
+ {
+- BUG("dbus message send failed!\n");
++ BUG_SCAN("dbus message send failed!\n");
+ return 0;
+ }
+
+diff -up hplip-3.23.3/scan/sane/ledm.c.covscan hplip-3.23.3/scan/sane/ledm.c
+--- hplip-3.23.3/scan/sane/ledm.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/ledm.c 2023-05-29 13:58:10.973395191 +0200
+@@ -813,7 +813,7 @@ SANE_Status ledm_control_option(SANE_Han
+
+ if (stat != SANE_STATUS_GOOD)
+ {
+- BUG("control_option failed: option=%s action=%s\n", ps->option[option].name, action==SANE_ACTION_GET_VALUE ? "get" : action==SANE_ACTION_SET_VALUE ? "set" : "auto");
++ BUG_SCAN("control_option failed: option=%s action=%s\n", ps->option[option].name, action==SANE_ACTION_GET_VALUE ? "get" : action==SANE_ACTION_SET_VALUE ? "set" : "auto");
+ }
+
+ return stat;
+@@ -1078,7 +1078,7 @@ void ledm_close(SANE_Handle handle)
+
+ if (ps == NULL || ps != session)
+ {
+- BUG("invalid sane_close\n");
++ BUG_SCAN("invalid sane_close\n");
+ return;
+ }
+
+diff -up hplip-3.23.3/scan/sane/marvell.c.covscan hplip-3.23.3/scan/sane/marvell.c
+--- hplip-3.23.3/scan/sane/marvell.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/marvell.c 2023-05-29 13:58:10.976395173 +0200
+@@ -134,7 +134,7 @@ static int get_ip_data(struct marvell_se
+
+ if (!ps->ip_handle)
+ {
+- BUG("invalid ipconvert state\n");
++ BUG_SCAN("invalid ipconvert state\n");
+ goto bugout;
+ }
+
+@@ -335,7 +335,7 @@ static struct marvell_session *create_se
+
+ if ((ps = malloc(sizeof(struct marvell_session))) == NULL)
+ {
+- BUG("malloc failed: %m\n");
++ BUG_SCAN("malloc failed: %m\n");
+ return NULL;
+ }
+ memset(ps, 0, sizeof(struct marvell_session));
+@@ -402,7 +402,7 @@ SANE_Status marvell_open(SANE_String_Con
+
+ if (session)
+ {
+- BUG("session in use\n");
++ BUG_SCAN("session in use\n");
+ return SANE_STATUS_DEVICE_BUSY;
+ }
+
+@@ -431,7 +431,7 @@ SANE_Status marvell_open(SANE_String_Con
+
+ if (hpmud_open_device(session->uri, ma.mfp_mode, &session->dd) != HPMUD_R_OK)
+ {
+- BUG("unable to open device %s\n", session->uri);
++ BUG_SCAN("unable to open device %s\n", session->uri);
+ goto bugout;
+
+ free(session);
+@@ -441,7 +441,7 @@ SANE_Status marvell_open(SANE_String_Con
+
+ if (hpmud_open_channel(session->dd, HPMUD_S_MARVELL_SCAN_CHANNEL, &session->cd) != HPMUD_R_OK)
+ {
+- BUG("unable to open %s channel %s\n", HPMUD_S_MARVELL_SCAN_CHANNEL, session->uri);
++ BUG_SCAN("unable to open %s channel %s\n", HPMUD_S_MARVELL_SCAN_CHANNEL, session->uri);
+ stat = SANE_STATUS_DEVICE_BUSY;
+ goto bugout;
+ }
+@@ -554,7 +554,7 @@ void marvell_close(SANE_Handle handle)
+
+ if (ps == NULL || ps != session)
+ {
+- BUG("invalid sane_close\n");
++ BUG_SCAN("invalid sane_close\n");
+ return;
+ }
+
+@@ -849,7 +849,7 @@ SANE_Status marvell_control_option(SANE_
+ stat = SANE_STATUS_GOOD;
+ break;
+ }
+- BUG("value=%d brymin=%d brymax=%d\n", *int_value, ps->bryRange.min, ps->bryRange.max);
++ BUG_SCAN("value=%d brymin=%d brymax=%d\n", *int_value, ps->bryRange.min, ps->bryRange.max);
+ }
+ else
+ { /* Set default. */
+@@ -866,7 +866,7 @@ SANE_Status marvell_control_option(SANE_
+
+ if (stat != SANE_STATUS_GOOD)
+ {
+- BUG("control_option failed: option=%s action=%s\n", ps->option[option].name,
++ BUG_SCAN("control_option failed: option=%s action=%s\n", ps->option[option].name,
+ action==SANE_ACTION_GET_VALUE ? "get" : action==SANE_ACTION_SET_VALUE ? "set" : "auto");
+ }
+
+@@ -905,7 +905,7 @@ SANE_Status marvell_start(SANE_Handle ha
+
+ if (set_extents(ps))
+ {
+- BUG("invalid extents: tlx=%d brx=%d tly=%d bry=%d minwidth=%d minheight%d maxwidth=%d maxheight=%d\n",
++ BUG_SCAN("invalid extents: tlx=%d brx=%d tly=%d bry=%d minwidth=%d minheight%d maxwidth=%d maxheight=%d\n",
+ ps->currentTlx, ps->currentTly, ps->currentBrx, ps->currentBry, ps->min_width, ps->min_height, ps->tlxRange.max, ps->tlyRange.max);
+ stat = SANE_STATUS_INVAL;
+ goto bugout;
+@@ -963,7 +963,7 @@ SANE_Status marvell_start(SANE_Handle ha
+ /* Open image processor. */
+ if ((ret = ipOpen(pXform-xforms, xforms, 0, &ps->ip_handle)) != IP_DONE)
+ {
+- BUG("unable open image processor: err=%d\n", ret);
++ BUG_SCAN("unable open image processor: err=%d\n", ret);
+ stat = SANE_STATUS_INVAL;
+ goto bugout;
+ }
+@@ -1023,7 +1023,7 @@ SANE_Status marvell_read(SANE_Handle han
+
+ if(ret & (IP_INPUT_ERROR | IP_FATAL_ERROR))
+ {
+- BUG("ipConvert error=%x\n", ret);
++ BUG_SCAN("ipConvert error=%x\n", ret);
+ goto bugout;
+ }
+
+diff -up hplip-3.23.3/scan/sane/sclpml.c.covscan hplip-3.23.3/scan/sane/sclpml.c
+--- hplip-3.23.3/scan/sane/sclpml.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/sclpml.c 2023-05-29 13:58:10.976395173 +0200
+@@ -30,6 +30,7 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <string.h>
++#include <sys/time.h>
+ #include "sane.h"
+ #include "saneopts.h"
+ #include "common.h"
+@@ -2090,7 +2091,7 @@ void sclpml_close(SANE_Handle handle)
+ DBG(8, "sane_hpaio_close(): %s %d\n", __FILE__, __LINE__);
+ if (hpaio == NULL || hpaio != session)
+ {
+- BUG("invalid sane_close\n");
++ BUG_SCAN("invalid sane_close\n");
+ return;
+ }
+
+diff -up hplip-3.23.3/scan/sane/soap.c.covscan hplip-3.23.3/scan/sane/soap.c
+--- hplip-3.23.3/scan/sane/soap.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/soap.c 2023-05-29 13:58:10.977395167 +0200
+@@ -142,7 +142,7 @@ static int get_ip_data(struct soap_sessi
+
+ if (!ps->ip_handle)
+ {
+- BUG("invalid ipconvert state\n");
++ BUG_SCAN("invalid ipconvert state\n");
+ goto bugout;
+ }
+
+@@ -219,7 +219,7 @@ static struct soap_session *create_sessi
+
+ if ((ps = malloc(sizeof(struct soap_session))) == NULL)
+ {
+- BUG("malloc failed: %m\n");
++ BUG_SCAN("malloc failed: %m\n");
+ return NULL;
+ }
+ memset(ps, 0, sizeof(struct soap_session));
+@@ -418,7 +418,7 @@ SANE_Status soap_open(SANE_String_Const
+
+ if (session)
+ {
+- BUG("session in use\n");
++ BUG_SCAN("session in use\n");
+ return SANE_STATUS_DEVICE_BUSY;
+ }
+
+@@ -434,7 +434,7 @@ SANE_Status soap_open(SANE_String_Const
+
+ if (hpmud_open_device(session->uri, ma.mfp_mode, &session->dd) != HPMUD_R_OK)
+ {
+- BUG("unable to open device %s\n", session->uri);
++ BUG_SCAN("unable to open device %s\n", session->uri);
+ goto bugout;
+
+ free(session);
+@@ -519,7 +519,7 @@ void soap_close(SANE_Handle handle)
+
+ if (ps == NULL || ps != session)
+ {
+- BUG("invalid sane_close\n");
++ BUG_SCAN("invalid sane_close\n");
+ return;
+ }
+
+@@ -824,7 +824,7 @@ SANE_Status soap_control_option(SANE_Han
+
+ if (stat != SANE_STATUS_GOOD)
+ {
+- BUG("control_option failed: option=%s action=%s\n", ps->option[option].name,
++ BUG_SCAN("control_option failed: option=%s action=%s\n", ps->option[option].name,
+ action==SANE_ACTION_GET_VALUE ? "get" : action==SANE_ACTION_SET_VALUE ? "set" : "auto");
+ }
+
+@@ -862,7 +862,7 @@ SANE_Status soap_start(SANE_Handle handl
+ ps->user_cancel = 0;
+ if (set_extents(ps))
+ {
+- BUG("invalid extents: tlx=%d brx=%d tly=%d bry=%d minwidth=%d minheight%d maxwidth=%d maxheight=%d\n",
++ BUG_SCAN("invalid extents: tlx=%d brx=%d tly=%d bry=%d minwidth=%d minheight%d maxwidth=%d maxheight=%d\n",
+ ps->currentTlx, ps->currentTly, ps->currentBrx, ps->currentBry, ps->min_width, ps->min_height, ps->tlxRange.max, ps->tlyRange.max);
+ stat = SANE_STATUS_INVAL;
+ goto bugout;
+@@ -913,7 +913,7 @@ SANE_Status soap_start(SANE_Handle handl
+ /* Open image processor. */
+ if ((ret = ipOpen(pXform-xforms, xforms, 0, &ps->ip_handle)) != IP_DONE)
+ {
+- BUG("unable open image processor: err=%d\n", ret);
++ BUG_SCAN("unable open image processor: err=%d\n", ret);
+ stat = SANE_STATUS_INVAL;
+ goto bugout;
+ }
+@@ -955,7 +955,7 @@ SANE_Status soap_start(SANE_Handle handl
+
+ if (ret & (IP_INPUT_ERROR | IP_FATAL_ERROR | IP_DONE))
+ {
+- BUG("ipConvert error=%x\n", ret);
++ BUG_SCAN("ipConvert error=%x\n", ret);
+ stat = SANE_STATUS_IO_ERROR;
+ goto bugout;
+ }
+@@ -1007,7 +1007,7 @@ SANE_Status soap_read(SANE_Handle handle
+
+ if(ret & (IP_INPUT_ERROR | IP_FATAL_ERROR))
+ {
+- BUG("ipConvert error=%x\n", ret);
++ BUG_SCAN("ipConvert error=%x\n", ret);
+ goto bugout;
+ }
+
+diff -up hplip-3.23.3/scan/sane/soapht.c.covscan hplip-3.23.3/scan/sane/soapht.c
+--- hplip-3.23.3/scan/sane/soapht.c.covscan 2023-03-28 09:26:11.000000000 +0200
++++ hplip-3.23.3/scan/sane/soapht.c 2023-05-29 13:58:10.977395167 +0200
+@@ -136,7 +136,7 @@ static int get_ip_data(struct soap_sessi
+
+ if (!ps->ip_handle)
+ {
+- BUG("invalid ipconvert state\n");
++ BUG_SCAN("invalid ipconvert state\n");
+ goto bugout;
+ }
+
+@@ -435,7 +435,7 @@ static struct soap_session *create_sessi
+
+ if ((ps = malloc(sizeof(struct soap_session))) == NULL)
+ {
+- BUG("malloc failed: %m\n");
++ BUG_SCAN("malloc failed: %m\n");
+ return NULL;
+ }
+ memset(ps, 0, sizeof(struct soap_session));
+@@ -459,7 +459,7 @@ SANE_Status soapht_open(SANE_String_Cons
+
+ if (session)
+ {
+- BUG("session in use\n");
++ BUG_SCAN("session in use\n");
+ return SANE_STATUS_DEVICE_BUSY;
+ }
+
+@@ -475,7 +475,7 @@ SANE_Status soapht_open(SANE_String_Cons
+
+ if (hpmud_open_device(session->uri, ma.mfp_mode, &session->dd) != HPMUD_R_OK)
+ {
+- BUG("unable to open device %s\n", session->uri);
++ BUG_SCAN("unable to open device %s\n", session->uri);
+ goto bugout;
+
+ free(session);
+@@ -554,7 +554,7 @@ void soapht_close(SANE_Handle handle)
+
+ if (ps == NULL || ps != session)
+ {
+- BUG("invalid sane_close\n");
++ BUG_SCAN("invalid sane_close\n");
+ return;
+ }
+
+@@ -904,7 +904,7 @@ SANE_Status soapht_control_option(SANE_H
+
+ if (stat != SANE_STATUS_GOOD)
+ {
+- BUG("control_option failed: option=%s action=%s\n", ps->option[option].name,
++ BUG_SCAN("control_option failed: option=%s action=%s\n", ps->option[option].name,
+ action==SANE_ACTION_GET_VALUE ? "get" : action==SANE_ACTION_SET_VALUE ? "set" : "auto");
+ }
+
+@@ -946,7 +946,7 @@ SANE_Status soapht_start(SANE_Handle han
+
+ if (set_extents(ps))
+ {
+- BUG("invalid extents: tlx=%d brx=%d tly=%d bry=%d minwidth=%d minheight%d maxwidth=%d maxheight=%d\n",
++ BUG_SCAN("invalid extents: tlx=%d brx=%d tly=%d bry=%d minwidth=%d minheight%d maxwidth=%d maxheight=%d\n",
+ ps->currentTlx, ps->currentTly, ps->currentBrx, ps->currentBry, ps->min_width, ps->min_height, ps->tlxRange.max, ps->tlyRange.max);
+ stat = SANE_STATUS_INVAL;
+ goto bugout;
+@@ -1032,7 +1032,7 @@ SANE_Status soapht_start(SANE_Handle han
+ /* Open image processor. */
+ if ((ret = ipOpen(pXform-xforms, xforms, 0, &ps->ip_handle)) != IP_DONE)
+ {
+- BUG("unable open image processor: err=%d\n", ret);
++ BUG_SCAN("unable open image processor: err=%d\n", ret);
+ stat = SANE_STATUS_INVAL;
+ goto bugout;
+ }
+@@ -1075,7 +1075,7 @@ SANE_Status soapht_start(SANE_Handle han
+
+ if (ret & (IP_INPUT_ERROR | IP_FATAL_ERROR | IP_DONE))
+ {
+- BUG("ipConvert error=%x\n", ret);
++ BUG_SCAN("ipConvert error=%x\n", ret);
+ stat = SANE_STATUS_IO_ERROR;
+ goto bugout;
+ }
+@@ -1124,7 +1124,7 @@ SANE_Status soapht_read(SANE_Handle hand
+
+ if(ret & (IP_INPUT_ERROR | IP_FATAL_ERROR))
+ {
+- BUG("ipConvert error=%x\n", ret);
++ BUG_SCAN("ipConvert error=%x\n", ret);
+ goto bugout;
+ }
+
diff --git a/source/ap/hplip/hplip-hpaio-gcc14.patch b/source/ap/hplip/hplip-hpaio-gcc14.patch
new file mode 100644
index 000000000..f7d195ed1
--- /dev/null
+++ b/source/ap/hplip/hplip-hpaio-gcc14.patch
@@ -0,0 +1,114 @@
+diff --git a/scan/sane/hpaio.c b/scan/sane/hpaio.c
+index 57d1dde..3475929 100644
+--- a/scan/sane/hpaio.c
++++ b/scan/sane/hpaio.c
+@@ -379,7 +379,7 @@ extern SANE_Status sane_hpaio_get_devices(const SANE_Device ***deviceList, SANE_
+ ResetDeviceList(&DeviceList);
+ DevDiscovery(localOnly);
+ *deviceList = (const SANE_Device **)DeviceList;
+- SANE_Device*** devList;
++ const SANE_Device*** devList;
+ orblite_get_devices(devList, localOnly);
+
+ return SANE_STATUS_GOOD;
+diff --git a/scan/sane/orblite.c b/scan/sane/orblite.c
+index 2eb7aba..4eaa468 100644
+--- a/scan/sane/orblite.c
++++ b/scan/sane/orblite.c
+@@ -64,28 +64,28 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
+ SANE_NAME_SCAN_TL_X, SANE_TITLE_SCAN_TL_X, SANE_DESC_SCAN_TL_X, // name, title, desc
+ SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size
+ SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
+- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeLeft // constraint_type, constraint
++ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeLeft // constraint_type, constraint
+ },
+
+ {
+ SANE_NAME_SCAN_TL_Y, SANE_TITLE_SCAN_TL_Y, SANE_DESC_SCAN_TL_Y, // name, title, desc
+ SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size
+ SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
+- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeTop // constraint_type, constraint
++ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeTop // constraint_type, constraint
+ },
+
+ {
+ SANE_NAME_SCAN_BR_X, SANE_TITLE_SCAN_BR_X, SANE_DESC_SCAN_BR_X, // name, title, desc
+ SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size
+ SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
+- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeRight // constraint_type, constraint
++ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeRight // constraint_type, constraint
+ },
+
+ {
+ SANE_NAME_SCAN_BR_Y, SANE_TITLE_SCAN_BR_Y, SANE_DESC_SCAN_BR_Y, // name, title, desc
+ SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size
+ SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
+- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeBottom // constraint_type, constraint
++ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeBottom // constraint_type, constraint
+ },
+
+ // optResolution, // resolution group
+@@ -93,7 +93,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
+ SANE_NAME_SCAN_RESOLUTION, SANE_TITLE_SCAN_RESOLUTION, SANE_DESC_SCAN_RESOLUTION, // name, title, desc
+ SANE_TYPE_INT, SANE_UNIT_DPI, sizeof(SANE_Word), // type, unit, size,
+ SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
+- SANE_CONSTRAINT_WORD_LIST, (SANE_Char**)SANE_resolutions // constraint type, constraint
++ SANE_CONSTRAINT_WORD_LIST, (const SANE_Char**)SANE_resolutions // constraint type, constraint
+ },
+
+ // optMode, // color/depth group
+@@ -101,7 +101,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
+ SANE_NAME_SCAN_MODE, SANE_TITLE_SCAN_MODE, SANE_DESC_SCAN_MODE, // name, title, desc
+ SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size,
+ SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
+- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_modes // constraint type, constraint
++ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_modes // constraint type, constraint
+ },
+
+ // optSource,
+@@ -109,7 +109,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
+ SANE_NAME_SCAN_SOURCE, SANE_TITLE_SCAN_SOURCE, SANE_DESC_SCAN_SOURCE, // name, title, desc
+ SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size,
+ SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
+- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_sources // constraint type, constraint
++ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_sources // constraint type, constraint
+ },
+
+ // optPaperSize,
+@@ -117,7 +117,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
+ SANE_NAME_PAPER_SIZE, SANE_TITLE_PAPER_SIZE, SANE_DESC_PAPER_SIZE, // name, title, desc
+ SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size,
+ SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
+- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_paper_sizes // constraint type, constraint
++ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_paper_sizes // constraint type, constraint
+ },
+
+ // optPaperSize,
+@@ -125,7 +125,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
+ SANE_NAME_PAPER_SIZE, SANE_TITLE_PAPER_SIZE, SANE_DESC_PAPER_SIZE, // name, title, desc
+ SANE_TYPE_INT, SANE_UNIT_DPI, sizeof(SANE_Word), // type, unit, size,
+ SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
+- SANE_CONSTRAINT_WORD_LIST, (SANE_Char**)SANE_resolutions // constraint type, constraint
++ SANE_CONSTRAINT_WORD_LIST, (const SANE_Char**)SANE_resolutions // constraint type, constraint
+ },
+ #ifdef NOTDEF
+ // default template
+@@ -274,6 +274,7 @@ orblite_open (SANE_String_Const devicename, SANE_Handle * handle)
+ SANE_Auth_Callback authorize;
+ const SANE_Device *** device_list;
+ SANE_Bool local_only;
++ void * temp_handle;
+
+
+ // Allocate handle, set all handle values to zero
+@@ -305,7 +306,9 @@ orblite_open (SANE_String_Const devicename, SANE_Handle * handle)
+ if (stat != SANE_STATUS_GOOD)
+ return stat;
+
+- stat = g_handle->bb_orblite_open(devicename, &g_handle);
++ temp_handle = g_handle;
++ stat = g_handle->bb_orblite_open(devicename, &temp_handle);
++ g_handle = temp_handle;
+ if (stat == SANE_STATUS_GOOD)
+ *handle = g_handle;
+
diff --git a/source/ap/hplip/hplip-pcardext-disable.patch b/source/ap/hplip/hplip-pcardext-disable.patch
new file mode 100644
index 000000000..c16fb5a25
--- /dev/null
+++ b/source/ap/hplip/hplip-pcardext-disable.patch
@@ -0,0 +1,16 @@
+--- ./Makefile.am.orig 2024-05-10 18:14:51.431337550 -0500
++++ ./Makefile.am 2024-05-10 18:15:37.078338571 -0500
+@@ -306,13 +306,6 @@
+ pcarddir = $(hplipdir)/pcard
+ dist_pcard_DATA = pcard/__init__.py pcard/photocard.py
+
+-# pcardext
+-pcardextdir = $(pyexecdir)
+-pcardext_LTLIBRARIES = pcardext.la
+-pcardext_la_LDFLAGS = -module -avoid-version
+-pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c pcard/pcardext/pcardext.h
+-pcardext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
+-
+ # prnt
+ prntdir = $(hplipdir)/prnt
+ dist_prnt_DATA = prnt/cups.py prnt/__init__.py prnt/ldl.py prnt/pcl.py prnt/colorcal.py
diff --git a/source/ap/hplip/hplip-pserror-c99.patch b/source/ap/hplip/hplip-pserror-c99.patch
new file mode 100644
index 000000000..747af3abf
--- /dev/null
+++ b/source/ap/hplip/hplip-pserror-c99.patch
@@ -0,0 +1,17 @@
+prnt/pserror.c: Replace an implicit int with an explicit int
+
+Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
+
+diff --git a/prnt/hpps/pserror.c b/prnt/hpps/pserror.c
+index 114d7e1b5fa364fb..493b49c27917a7e6 100644
+--- a/prnt/hpps/pserror.c
++++ b/prnt/hpps/pserror.c
+@@ -24,7 +24,7 @@ extern char *program ; /* Defined by main program, giving program name */
+ void message(int flags, char *format, ...)
+ {
+ va_list args ;
+- static column = 0 ; /* current screen column for message wrap */
++ static int column = 0 ; /* current screen column for message wrap */
+ char msgbuf[MAX_MESSAGE] ; /* buffer in which to put the message */
+ char *bufptr = msgbuf ; /* message buffer pointer */
+
diff --git a/source/ap/hplip/hplip-scan-hpaio-include.patch b/source/ap/hplip/hplip-scan-hpaio-include.patch
new file mode 100644
index 000000000..79d1d94b7
--- /dev/null
+++ b/source/ap/hplip/hplip-scan-hpaio-include.patch
@@ -0,0 +1,19 @@
+scam/sane/hpaio.c: Include orblite.h for more function prototypes
+
+Otherwise the build fails with compilers which do not support
+implicit function declarations.
+
+Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
+
+diff --git a/scan/sane/hpaio.c b/scan/sane/hpaio.c
+index d342626822fc2190..57d1ddea32fb5816 100644
+--- a/scan/sane/hpaio.c
++++ b/scan/sane/hpaio.c
+@@ -50,6 +50,7 @@
+ #include "sclpml.h"
+ #include "escl.h"
+ #include "io.h"
++#include "orblite.h"
+ #include "orblitei.h"
+
+
diff --git a/source/ap/hplip/hplip-scan-orblite-c99.patch b/source/ap/hplip/hplip-scan-orblite-c99.patch
new file mode 100644
index 000000000..c921f22f1
--- /dev/null
+++ b/source/ap/hplip/hplip-scan-orblite-c99.patch
@@ -0,0 +1,21 @@
+diff --git a/scan/sane/orblite.c b/scan/sane/orblite.c
+index ba86640..2eb7aba 100644
+--- a/scan/sane/orblite.c
++++ b/scan/sane/orblite.c
+@@ -20,6 +20,7 @@
+ #include "orblitei.h"
+ #include "orblite.h"//Added New
+ #include <math.h>
++#include <dlfcn.h>
+ #include "utils.h"
+ #include "io.h"
+
+@@ -195,7 +196,7 @@ bugout:
+
+ static int bb_unload(SANE_THandle ps)
+ {
+- _DBG("Calling orblite bb_unload: \n");
++ DBG("Calling orblite bb_unload: \n");
+ if (ps->bb_handle)
+ {
+ dlclose(ps->bb_handle);
diff --git a/source/ap/hplip/hplip.SlackBuild b/source/ap/hplip/hplip.SlackBuild
index 682377996..c39b0f047 100755
--- a/source/ap/hplip/hplip.SlackBuild
+++ b/source/ap/hplip/hplip.SlackBuild
@@ -63,6 +63,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+#SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int -Wno-error=incompatible-pointer-types"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
@@ -86,6 +89,16 @@ zcat $CWD/hplip.python3.shebang.diff.gz | patch -p1 --verbose || exit 1
# Fix the desktop file to show correct icon and category
zcat $CWD/fix-desktop-file.patch.gz | patch -p1 --verbose || exit 1
+# GCC 14 fixes:
+cat $CWD/hplip-pserror-c99.patch | patch -p1 --verbose || exit 1
+cat $CWD/hplip-hpaio-gcc14.patch | patch -p1 --verbose || exit 1
+cat $CWD/hplip-covscan.patch | patch -p1 --verbose || exit 1
+cat $CWD/hplip-scan-orblite-c99.patch | patch -p1 --verbose || exit 1
+cat $CWD/hplip-scan-hpaio-include.patch | patch -p1 --verbose || exit 1
+
+# This extension was never ported to python3:
+cat $CWD/hplip-pcardext-disable.patch | patch -p1 --verbose || exit 1
+
# Choose correct options depending on whether PAM is installed:
if [ -L /lib${LIBDIRSUFFIX}/libpam.so.? ]; then
unset SHADOW_OPTIONS
@@ -203,4 +216,3 @@ zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/ap/libx86/libx86.SlackBuild b/source/ap/libx86/libx86.SlackBuild
index cbf9f9867..2c6dfcd0f 100755
--- a/source/ap/libx86/libx86.SlackBuild
+++ b/source/ap/libx86/libx86.SlackBuild
@@ -64,6 +64,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=int-conversion -Wno-error=incompatible-pointer-types"
+
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
diff --git a/source/ap/rzip/rzip.SlackBuild b/source/ap/rzip/rzip.SlackBuild
index 716b98ec0..352efbce2 100755
--- a/source/ap/rzip/rzip.SlackBuild
+++ b/source/ap/rzip/rzip.SlackBuild
@@ -55,6 +55,9 @@ else
SLKCFLAGS="-O2"
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-rzip
diff --git a/source/ap/sc-im/sc-im.SlackBuild b/source/ap/sc-im/sc-im.SlackBuild
index b48e8fa7f..b9f380143 100755
--- a/source/ap/sc-im/sc-im.SlackBuild
+++ b/source/ap/sc-im/sc-im.SlackBuild
@@ -67,6 +67,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+export CFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
diff --git a/source/ap/sc/sc.SlackBuild b/source/ap/sc/sc.SlackBuild
index 77f5cbf98..b815dd55f 100755
--- a/source/ap/sc/sc.SlackBuild
+++ b/source/ap/sc/sc.SlackBuild
@@ -87,6 +87,7 @@ find . \
# Old software, modern compiler:
zcat $CWD/sc-7.16-3.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/sc.gcc14.diff.gz | patch -p1 --verbose || exit 1
# Build:
make $NUMJOBS || exit 1
diff --git a/source/ap/sc/sc.gcc14.diff b/source/ap/sc/sc.gcc14.diff
new file mode 100644
index 000000000..25c9f1e0b
--- /dev/null
+++ b/source/ap/sc/sc.gcc14.diff
@@ -0,0 +1,11 @@
+--- ./Makefile.orig 2024-05-11 16:51:27.919158388 -0500
++++ ./Makefile 2024-05-11 16:53:10.235160676 -0500
+@@ -336,7 +336,7 @@
+ # real effect on the reliability of the program, but may concern some
+ # people who don't understand them.
+ #CFLAGS=-DSYSV3 -O2 -Wall -pipe
+-CFLAGS=-DSYSV3 -O2 -pipe
++CFLAGS=-DSYSV3 -O2 -pipe -Wno-error=implicit-function-declaration -Wno-error=implicit-int
+ LIB=-lm -lncurses
+
+ # All of the source files
diff --git a/source/ap/seejpeg/seejpeg.SlackBuild b/source/ap/seejpeg/seejpeg.SlackBuild
index cb3ba4adb..6bb06e2a1 100755
--- a/source/ap/seejpeg/seejpeg.SlackBuild
+++ b/source/ap/seejpeg/seejpeg.SlackBuild
@@ -73,7 +73,7 @@ find . \
( cd libjpeg-6a ; ./configure ; make || exit 1 ) || exit 1
ln -sf libjpeg-6a jpeglib
-make seejpeg || exit 1
+CFLAGS="-Wno-error=incompatible-pointer-types" make seejpeg || exit 1
strip seejpeg
cat seejpeg > $PKG/usr/bin/seejpeg
@@ -89,4 +89,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
# Build the package:
cd $PKG
/sbin/makepkg -l y -c n $TMP/seejpeg-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/ap/sox/sox.SlackBuild b/source/ap/sox/sox.SlackBuild
index fa8c4d363..2cc0fb7ce 100755
--- a/source/ap/sox/sox.SlackBuild
+++ b/source/ap/sox/sox.SlackBuild
@@ -52,6 +52,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
# If this package is being built for ALSA (no PulseAudio), use the _alsa $TAG:
if [ ! -r /usr/lib${LIBDIRSUFFIX}/pkgconfig/libpulse.pc ]; then
TAG="_alsa"
diff --git a/source/ap/vorbis-tools/vorbis-tools.SlackBuild b/source/ap/vorbis-tools/vorbis-tools.SlackBuild
index 7f23e008e..41d813480 100755
--- a/source/ap/vorbis-tools/vorbis-tools.SlackBuild
+++ b/source/ap/vorbis-tools/vorbis-tools.SlackBuild
@@ -69,6 +69,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
rm -rf $PKG
mkdir -p $TMP $PKG
diff --git a/source/ap/zsh/0007-zsh-configure-c99.patch b/source/ap/zsh/0007-zsh-configure-c99.patch
new file mode 100644
index 000000000..c4b36231b
--- /dev/null
+++ b/source/ap/zsh/0007-zsh-configure-c99.patch
@@ -0,0 +1,44 @@
+Avoid incompatible pointer types in terminfo global variable checks.
+Some compilers reject these incompatible pointer types, causing the
+checks to always fail, when these variables are in fact available.
+
+Submitted upstream: <https://www.zsh.org/mla/workers/2023/msg01112.html>
+
+diff --git a/configure.ac b/configure.ac
+index a58242f453b4a8f3..5534f42df14eb28c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1769,27 +1769,27 @@ if test x$zsh_cv_path_term_header != xnone; then
+ fi
+
+ AC_MSG_CHECKING(if boolcodes is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no])
+ AC_MSG_RESULT($boolcodes)
+
+ AC_MSG_CHECKING(if numcodes is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no])
+ AC_MSG_RESULT($numcodes)
+
+ AC_MSG_CHECKING(if strcodes is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no])
+ AC_MSG_RESULT($strcodes)
+
+ AC_MSG_CHECKING(if boolnames is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no])
+ AC_MSG_RESULT($boolnames)
+
+ AC_MSG_CHECKING(if numnames is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no])
+ AC_MSG_RESULT($numnames)
+
+ AC_MSG_CHECKING(if strnames is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no])
+ AC_MSG_RESULT($strnames)
+
+ dnl There are apparently defective terminal library headers on some
diff --git a/source/ap/zsh/zsh.SlackBuild b/source/ap/zsh/zsh.SlackBuild
index 3a5aa5c69..361b365ab 100755
--- a/source/ap/zsh/zsh.SlackBuild
+++ b/source/ap/zsh/zsh.SlackBuild
@@ -77,6 +77,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+cat $CWD/0007-zsh-configure-c99.patch | patch -p1 --verbose || exit 1
+
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
diff --git a/source/d/clisp/clisp.SlackBuild b/source/d/clisp/clisp.SlackBuild
index f567d2f0c..f3a48d430 100755
--- a/source/d/clisp/clisp.SlackBuild
+++ b/source/d/clisp/clisp.SlackBuild
@@ -61,6 +61,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types -Wno-error=int-conversion"
+
# Don't use icecream:
PATH=$(echo $PATH | sed "s|/usr/libexec/icecc/bin||g" | tr -s : | sed "s/^://g" | sed "s/:$//g")
diff --git a/source/d/dev86/dev86.SlackBuild b/source/d/dev86/dev86.SlackBuild
index 82470b14b..99f07ae9d 100755
--- a/source/d/dev86/dev86.SlackBuild
+++ b/source/d/dev86/dev86.SlackBuild
@@ -64,6 +64,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=return-mismatch"
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -79,6 +82,7 @@ find . \
#Does not compile with changed CFLAGS
#CC="gcc" make CFLAGS="-Wall -Wstrict-prototypes $SLKCFLAGS -g" DIST=$PKG || exit 1
+GCCFLAG="$SLKCFLAGS" \
CC="gcc" \
make \
DIST=$PKG MANDIR=/usr/man LIBDIR=/usr/lib${LIBDIRSUFFIX}/bcc \
diff --git a/source/d/gnucobol/gnucobol.SlackBuild b/source/d/gnucobol/gnucobol.SlackBuild
index 0ef415688..e605ab137 100755
--- a/source/d/gnucobol/gnucobol.SlackBuild
+++ b/source/d/gnucobol/gnucobol.SlackBuild
@@ -67,6 +67,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
diff --git a/source/d/oprofile/oprofile.SlackBuild b/source/d/oprofile/oprofile.SlackBuild
index d9d3e46a4..8b640019a 100755
--- a/source/d/oprofile/oprofile.SlackBuild
+++ b/source/d/oprofile/oprofile.SlackBuild
@@ -63,6 +63,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -fpermissive"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-oprofile
diff --git a/source/d/subversion/subversion.SlackBuild b/source/d/subversion/subversion.SlackBuild
index 2023e81fd..4863bfa6b 100755
--- a/source/d/subversion/subversion.SlackBuild
+++ b/source/d/subversion/subversion.SlackBuild
@@ -60,6 +60,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types -Wno-error=int-conversion"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-subversion
diff --git a/source/kde/stellarsolver/stellarsolver.SlackBuild b/source/kde/stellarsolver/stellarsolver.SlackBuild
index de4dbc90d..8fa52b301 100755
--- a/source/kde/stellarsolver/stellarsolver.SlackBuild
+++ b/source/kde/stellarsolver/stellarsolver.SlackBuild
@@ -67,6 +67,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
diff --git a/source/l/GConf/GConf.SlackBuild b/source/l/GConf/GConf.SlackBuild
index a8f8962a0..399a92ce9 100755
--- a/source/l/GConf/GConf.SlackBuild
+++ b/source/l/GConf/GConf.SlackBuild
@@ -60,6 +60,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types"
+
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
diff --git a/source/l/PyQt5_sip/PyQt5_sip.SlackBuild b/source/l/PyQt5_sip/PyQt5_sip.SlackBuild
index f10ff7f7e..ad4327b8e 100755
--- a/source/l/PyQt5_sip/PyQt5_sip.SlackBuild
+++ b/source/l/PyQt5_sip/PyQt5_sip.SlackBuild
@@ -64,6 +64,10 @@ else
SLKCFLAGS="-O2"
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types"
+export CFLAGS="$SLKCFLAGS"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
diff --git a/source/l/aalib/aalib.SlackBuild b/source/l/aalib/aalib.SlackBuild
index 4e1ff6e3b..6fde3f4f4 100755
--- a/source/l/aalib/aalib.SlackBuild
+++ b/source/l/aalib/aalib.SlackBuild
@@ -84,6 +84,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int"
+
# Configure:
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/source/l/apr-util/apr-util.SlackBuild b/source/l/apr-util/apr-util.SlackBuild
index f41d51986..87e0660b8 100755
--- a/source/l/apr-util/apr-util.SlackBuild
+++ b/source/l/apr-util/apr-util.SlackBuild
@@ -60,6 +60,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-apr-util
@@ -84,7 +87,7 @@ CFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--with-apr=/usr \
--with-dbm=db44 \
- --with-berkeley-db \
+ --with-berkeley-db=/usr \
--with-mysql=/usr \
--disable-util-dso \
--without-gdbm \
diff --git a/source/l/chmlib/chmlib.SlackBuild b/source/l/chmlib/chmlib.SlackBuild
index 720e6ccad..0c60b57c3 100755
--- a/source/l/chmlib/chmlib.SlackBuild
+++ b/source/l/chmlib/chmlib.SlackBuild
@@ -64,6 +64,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
diff --git a/source/l/db48/db48.SlackBuild b/source/l/db48/db48.SlackBuild
index 9bf8933f9..6390f7d25 100755
--- a/source/l/db48/db48.SlackBuild
+++ b/source/l/db48/db48.SlackBuild
@@ -63,6 +63,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
diff --git a/source/l/esound/esound.SlackBuild b/source/l/esound/esound.SlackBuild
index ba7b41510..52a52ab4f 100755
--- a/source/l/esound/esound.SlackBuild
+++ b/source/l/esound/esound.SlackBuild
@@ -65,6 +65,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z || exit 1
diff --git a/source/l/ffmpeg/ffmpeg.SlackBuild b/source/l/ffmpeg/ffmpeg.SlackBuild
index ca1e1356c..b66afc46d 100755
--- a/source/l/ffmpeg/ffmpeg.SlackBuild
+++ b/source/l/ffmpeg/ffmpeg.SlackBuild
@@ -59,6 +59,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=int-conversion"
+
# If PulseAudio is not found, use the _alsa $TAG and disable it in the build:
if [ ! -r /usr/lib${LIBDIRSUFFIX}/pkgconfig/libpulse.pc ]; then
TAG="_alsa"
diff --git a/source/l/glib/glib.SlackBuild b/source/l/glib/glib.SlackBuild
index c15392644..6fec48212 100755
--- a/source/l/glib/glib.SlackBuild
+++ b/source/l/glib/glib.SlackBuild
@@ -90,6 +90,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int -Wno-error=implicit-function-declaration"
+
# Configure:
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/source/l/gtk+/gtk+.SlackBuild b/source/l/gtk+/gtk+.SlackBuild
index 6c03cabdf..54956b383 100755
--- a/source/l/gtk+/gtk+.SlackBuild
+++ b/source/l/gtk+/gtk+.SlackBuild
@@ -65,6 +65,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types"
+
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
diff --git a/source/l/gtk+2/gtk+2.SlackBuild b/source/l/gtk+2/gtk+2.SlackBuild
index a0ceb0f05..c5f8519c3 100755
--- a/source/l/gtk+2/gtk+2.SlackBuild
+++ b/source/l/gtk+2/gtk+2.SlackBuild
@@ -63,6 +63,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types -Wno-error=implicit-int"
+
rm -rf $PKG
mkdir -p $TMP $PKG/usr
cd $TMP
diff --git a/source/l/gtksourceview3/gtksourceview3.SlackBuild b/source/l/gtksourceview3/gtksourceview3.SlackBuild
index a16b6a2f2..ce47243f5 100755
--- a/source/l/gtksourceview3/gtksourceview3.SlackBuild
+++ b/source/l/gtksourceview3/gtksourceview3.SlackBuild
@@ -69,6 +69,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
diff --git a/source/l/lcms/lcms.SlackBuild b/source/l/lcms/lcms.SlackBuild
index 4bd50d511..638a54832 100755
--- a/source/l/lcms/lcms.SlackBuild
+++ b/source/l/lcms/lcms.SlackBuild
@@ -60,6 +60,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-lcms
diff --git a/source/l/libao/libao.SlackBuild b/source/l/libao/libao.SlackBuild
index 05449dd4c..9faddbd11 100755
--- a/source/l/libao/libao.SlackBuild
+++ b/source/l/libao/libao.SlackBuild
@@ -44,6 +44,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
# If this package is being built for ALSA (no PulseAudio), use the _alsa $TAG:
if [ ! -r /usr/lib${LIBDIRSUFFIX}/pkgconfig/libpulse.pc ]; then
TAG="_alsa"
@@ -73,8 +76,10 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+CFLAGS="$SLKCFLAGS" \
./autogen.sh || exit 1
+CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
diff --git a/source/l/libappindicator/libappindicator.SlackBuild b/source/l/libappindicator/libappindicator.SlackBuild
index 649589179..fe5998e53 100755
--- a/source/l/libappindicator/libappindicator.SlackBuild
+++ b/source/l/libappindicator/libappindicator.SlackBuild
@@ -68,6 +68,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
diff --git a/source/l/libcddb/libcddb.SlackBuild b/source/l/libcddb/libcddb.SlackBuild
index 3ad6a3a73..ad267d6a6 100755
--- a/source/l/libcddb/libcddb.SlackBuild
+++ b/source/l/libcddb/libcddb.SlackBuild
@@ -65,6 +65,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types"
+
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z || exit 1
diff --git a/source/l/libgpod/libgpod.SlackBuild b/source/l/libgpod/libgpod.SlackBuild
index 599c4257f..f180e9247 100755
--- a/source/l/libgpod/libgpod.SlackBuild
+++ b/source/l/libgpod/libgpod.SlackBuild
@@ -65,6 +65,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types -Wno-error=implicit-int"
+
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
diff --git a/source/l/libmcrypt/libmcrypt.SlackBuild b/source/l/libmcrypt/libmcrypt.SlackBuild
index a20faa0d2..0f71b6c03 100755
--- a/source/l/libmcrypt/libmcrypt.SlackBuild
+++ b/source/l/libmcrypt/libmcrypt.SlackBuild
@@ -65,6 +65,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration -Wno-error=implicit-int"
+
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
diff --git a/source/l/netpbm/netpbm.SlackBuild b/source/l/netpbm/netpbm.SlackBuild
index 7004a028a..84fb12e16 100755
--- a/source/l/netpbm/netpbm.SlackBuild
+++ b/source/l/netpbm/netpbm.SlackBuild
@@ -88,6 +88,9 @@ zcat $CWD/netpbm-manfix.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/netpbm-manual-pages.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/netpbm-libdir-so.patch.gz | patch -p1 --verbose || exit 1
+# GCC 14 "fix":
+cat $CWD/netpbm.gcc14.diff | patch -p1 --verbose || exit 1
+
# Send blank lines to "configure" to just take defaults:
./configure << EOF
diff --git a/source/l/netpbm/netpbm.gcc14.diff b/source/l/netpbm/netpbm.gcc14.diff
new file mode 100644
index 000000000..ad1ee9f0b
--- /dev/null
+++ b/source/l/netpbm/netpbm.gcc14.diff
@@ -0,0 +1,11 @@
+--- ./buildtools/configure.pl.orig 2024-04-12 12:11:55.000000000 -0500
++++ ./buildtools/configure.pl 2024-05-10 19:05:04.538404953 -0500
+@@ -1537,7 +1537,7 @@
+ " -pedantic -fno-common " .
+ "-Wall -Wno-uninitialized -Wmissing-declarations -Wimplicit " .
+ "-Wwrite-strings -Wmissing-prototypes -Wundef " .
+- "-Wno-unknown-pragmas ";
++ "-Wno-unknown-pragmas -Wno-error=incompatible-pointer-types ";
+
+ if (wnostrictoverflowWorks($gccCommandName)) {
+ # The compiler generates some optimizations based on the assumption
diff --git a/source/l/pilot-link/pilot-link-0.12.1-var.patch b/source/l/pilot-link/pilot-link-0.12.1-var.patch
new file mode 100644
index 000000000..e1e6c6c5e
--- /dev/null
+++ b/source/l/pilot-link/pilot-link-0.12.1-var.patch
@@ -0,0 +1,11 @@
+--- pilot-link-0.12.1/libpisock/dlp.c.pom 2006-08-27 18:20:17.000000000 +0200
++++ pilot-link-0.12.1/libpisock/dlp.c 2006-11-30 13:39:29.000000000 +0100
+@@ -2268,7 +2268,7 @@
+ if (errCode) {
+ LOG((PI_DBG_DLP, PI_DBG_LVL_INFO,
+ "DLP ReadFeature FtrGet error 0x%8.8lX\n",
+- res));
++ errCode));
+ pi_set_palmos_error(sd, (int)errCode);
+ return pi_set_error(sd, PI_ERR_DLP_PALMOS);
+ }
diff --git a/source/l/pilot-link/pilot-link-0.12.2-open.patch b/source/l/pilot-link/pilot-link-0.12.2-open.patch
new file mode 100644
index 000000000..5766e66be
--- /dev/null
+++ b/source/l/pilot-link/pilot-link-0.12.2-open.patch
@@ -0,0 +1,42 @@
+diff -up pilot-link-0.12.5/libpisock/serial.c.pom pilot-link-0.12.5/libpisock/serial.c
+--- pilot-link-0.12.5/libpisock/serial.c.pom 2006-10-12 16:21:22.000000000 +0200
++++ pilot-link-0.12.5/libpisock/serial.c 2010-06-24 10:35:48.000000000 +0200
+@@ -286,7 +286,7 @@ pi_serial_connect(pi_socket_t *ps, struc
+ data->establishrate = data->rate = 57600;
+ }
+
+- if ((err = data->impl.open(ps, pa, addrlen)) < 0)
++ if ((err = (data->impl.open)(ps, pa, addrlen)) < 0)
+ return err; /* errno already set */
+
+ ps->raddr = malloc(addrlen);
+@@ -362,7 +362,7 @@ pi_serial_bind(pi_socket_t *ps, struct s
+ }
+
+ begin:
+- if ((err = data->impl.open(ps, pa, addrlen)) < 0) {
++ if ((err = (data->impl.open)(ps, pa, addrlen)) < 0) {
+ int save_errno = errno;
+ #ifdef MAXPATHLEN
+ char realport[MAXPATHLEN];
+diff -up pilot-link-0.12.5/libpisock/usb.c.pom pilot-link-0.12.5/libpisock/usb.c
+--- pilot-link-0.12.5/libpisock/usb.c.pom 2010-06-24 09:24:56.000000000 +0200
++++ pilot-link-0.12.5/libpisock/usb.c 2010-06-24 10:36:08.000000000 +0200
+@@ -267,7 +267,7 @@ pi_usb_connect(pi_socket_t *ps, struct s
+ data->establishrate = data->rate = 57600;
+ }
+
+- result = data->impl.open(ps, pa, addrlen);
++ result = (data->impl.open)(ps, pa, addrlen);
+ if (result < 0)
+ goto fail;
+
+@@ -343,7 +343,7 @@ pi_usb_bind(pi_socket_t *ps, struct sock
+ data->establishrate = data->rate = 57600;
+ }
+
+- result = data->impl.open(ps, pa, addrlen);
++ result = (data->impl.open)(ps, pa, addrlen);
+ if (result < 0)
+ return result;
+
diff --git a/source/l/pilot-link/pilot-link-0.12.3-clio.patch b/source/l/pilot-link/pilot-link-0.12.3-clio.patch
new file mode 100644
index 000000000..a752c43d1
--- /dev/null
+++ b/source/l/pilot-link/pilot-link-0.12.3-clio.patch
@@ -0,0 +1,11 @@
+diff -up pilot-link-0.12.4/libpisock/usb.c.clio pilot-link-0.12.4/libpisock/usb.c
+--- pilot-link-0.12.4/libpisock/usb.c.clio 2009-05-28 14:55:43.000000000 +0200
++++ pilot-link-0.12.4/libpisock/usb.c 2009-05-28 14:56:57.000000000 +0200
+@@ -655,6 +655,7 @@ pi_usb_dev_t known_devices[] = {
+ .vendor = 0x054c,
+ .product = 0x0066,
+ .idstr = "Sony T, SJ series, and other Palm OS 4.0 devices",
++ .flags = USB_INIT_SONY_CLIE,
+ },
+
+ {
diff --git a/source/l/pilot-link/pilot-link-0.12.5-aarch64.patch b/source/l/pilot-link/pilot-link-0.12.5-aarch64.patch
new file mode 100644
index 000000000..97651e0b9
--- /dev/null
+++ b/source/l/pilot-link/pilot-link-0.12.5-aarch64.patch
@@ -0,0 +1,1348 @@
+diff -urN pilot-link-0.12.5/config.guess pilot-link-0.12.5-aarch64/config.guess
+--- pilot-link-0.12.5/config.guess 2009-11-03 20:06:26.000000000 -0600
++++ pilot-link-0.12.5-aarch64/config.guess 2013-03-08 06:00:41.342509645 -0600
+@@ -1,10 +1,10 @@
+ #! /bin/sh
+ # Attempt to guess a canonical system name.
+ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+-# Free Software Foundation, Inc.
++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
++# 2011, 2012 Free Software Foundation, Inc.
+
+-timestamp='2009-06-10'
++timestamp='2012-09-25'
+
+ # This file is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU General Public License as published by
+@@ -17,9 +17,7 @@
+ # General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+-# 02110-1301, USA.
++# along with this program; if not, see <http://www.gnu.org/licenses/>.
+ #
+ # As a special exception to the GNU General Public License, if you
+ # distribute this file as part of a program that contains a
+@@ -27,16 +25,16 @@
+ # the same distribution terms that you use for the rest of that program.
+
+
+-# Originally written by Per Bothner <per@bothner.com>.
+-# Please send patches to <config-patches@gnu.org>. Submit a context
+-# diff and a properly formatted ChangeLog entry.
++# Originally written by Per Bothner. Please send patches (context
++# diff format) to <config-patches@gnu.org> and include a ChangeLog
++# entry.
+ #
+ # This script attempts to guess a canonical system name similar to
+ # config.sub. If it succeeds, it prints the system name on stdout, and
+ # exits with 0. Otherwise, it exits with 1.
+ #
+-# The plan is that this can be called by configure scripts if you
+-# don't specify an explicit build system type.
++# You can get the latest version of this script from:
++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+ me=`echo "$0" | sed -e 's,.*/,,'`
+
+@@ -56,8 +54,9 @@
+ GNU config.guess ($timestamp)
+
+ Originally written by Per Bothner.
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
++Free Software Foundation, Inc.
+
+ This is free software; see the source for copying conditions. There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -144,7 +143,7 @@
+ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
++ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+@@ -180,7 +179,7 @@
+ fi
+ ;;
+ *)
+- os=netbsd
++ os=netbsd
+ ;;
+ esac
+ # The OS release
+@@ -201,6 +200,10 @@
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
++ *:Bitrig:*:*)
++ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
++ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
++ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+@@ -223,7 +226,7 @@
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+@@ -269,7 +272,10 @@
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+- exit ;;
++ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
++ exitcode=$?
++ trap '' 0
++ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+@@ -295,12 +301,12 @@
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+- echo powerpc-ibm-os400
++ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+- arm:riscos:*:*|arm:RISCOS:*:*)
++ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+@@ -333,6 +339,9 @@
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
++ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
++ echo i386-pc-auroraux${UNAME_RELEASE}
++ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+@@ -391,23 +400,23 @@
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+- echo m68k-atari-mint${UNAME_RELEASE}
++ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+- exit ;;
++ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+- echo m68k-atari-mint${UNAME_RELEASE}
++ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+- echo m68k-milan-mint${UNAME_RELEASE}
+- exit ;;
++ echo m68k-milan-mint${UNAME_RELEASE}
++ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+- echo m68k-hades-mint${UNAME_RELEASE}
+- exit ;;
++ echo m68k-hades-mint${UNAME_RELEASE}
++ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+- echo m68k-unknown-mint${UNAME_RELEASE}
+- exit ;;
++ echo m68k-unknown-mint${UNAME_RELEASE}
++ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+@@ -477,8 +486,8 @@
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+- # DG/UX returns AViiON for all architectures
+- UNAME_PROCESSOR=`/usr/bin/uname -p`
++ # DG/UX returns AViiON for all architectures
++ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+@@ -491,7 +500,7 @@
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+- exit ;;
++ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+@@ -548,7 +557,7 @@
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+- *:AIX:*:[456])
++ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+@@ -591,52 +600,52 @@
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+- case "${sc_cpu_version}" in
+- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+- 532) # CPU_PA_RISC2_0
+- case "${sc_kernel_bits}" in
+- 32) HP_ARCH="hppa2.0n" ;;
+- 64) HP_ARCH="hppa2.0w" ;;
++ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
++ case "${sc_cpu_version}" in
++ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
++ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
++ 532) # CPU_PA_RISC2_0
++ case "${sc_kernel_bits}" in
++ 32) HP_ARCH="hppa2.0n" ;;
++ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+- esac ;;
+- esac
++ esac ;;
++ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+- sed 's/^ //' << EOF >$dummy.c
++ sed 's/^ //' << EOF >$dummy.c
++
++ #define _HPUX_SOURCE
++ #include <stdlib.h>
++ #include <unistd.h>
++
++ int main ()
++ {
++ #if defined(_SC_KERNEL_BITS)
++ long bits = sysconf(_SC_KERNEL_BITS);
++ #endif
++ long cpu = sysconf (_SC_CPU_VERSION);
+
+- #define _HPUX_SOURCE
+- #include <stdlib.h>
+- #include <unistd.h>
+-
+- int main ()
+- {
+- #if defined(_SC_KERNEL_BITS)
+- long bits = sysconf(_SC_KERNEL_BITS);
+- #endif
+- long cpu = sysconf (_SC_CPU_VERSION);
+-
+- switch (cpu)
+- {
+- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+- case CPU_PA_RISC2_0:
+- #if defined(_SC_KERNEL_BITS)
+- switch (bits)
+- {
+- case 64: puts ("hppa2.0w"); break;
+- case 32: puts ("hppa2.0n"); break;
+- default: puts ("hppa2.0"); break;
+- } break;
+- #else /* !defined(_SC_KERNEL_BITS) */
+- puts ("hppa2.0"); break;
+- #endif
+- default: puts ("hppa1.0"); break;
+- }
+- exit (0);
+- }
++ switch (cpu)
++ {
++ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
++ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
++ case CPU_PA_RISC2_0:
++ #if defined(_SC_KERNEL_BITS)
++ switch (bits)
++ {
++ case 64: puts ("hppa2.0w"); break;
++ case 32: puts ("hppa2.0n"); break;
++ default: puts ("hppa2.0"); break;
++ } break;
++ #else /* !defined(_SC_KERNEL_BITS) */
++ puts ("hppa2.0"); break;
++ #endif
++ default: puts ("hppa1.0"); break;
++ }
++ exit (0);
++ }
+ EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+@@ -727,22 +736,22 @@
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+- exit ;;
++ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+- exit ;;
++ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+- exit ;;
++ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+- exit ;;
++ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+- exit ;;
++ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+@@ -766,14 +775,14 @@
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+- exit ;;
++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
++ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
++ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+@@ -785,34 +794,39 @@
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+- case ${UNAME_MACHINE} in
+- pc98)
+- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ UNAME_PROCESSOR=`/usr/bin/uname -p`
++ case ${UNAME_PROCESSOR} in
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
++ *:MINGW64*:*)
++ echo ${UNAME_MACHINE}-pc-mingw64
++ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
++ i*:MSYS*:*)
++ echo ${UNAME_MACHINE}-pc-msys
++ exit ;;
+ i*:windows32*:*)
+- # uname -m includes "-pc" on this system.
+- echo ${UNAME_MACHINE}-mingw32
++ # uname -m includes "-pc" on this system.
++ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+- *:Interix*:[3456]*)
+- case ${UNAME_MACHINE} in
++ *:Interix*:*)
++ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+- EM64T | authenticamd | genuineintel)
++ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+@@ -854,6 +868,27 @@
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
++ aarch64:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
++ aarch64_be:Linux:*:*)
++ UNAME_MACHINE=aarch64_be
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
++ alpha:Linux:*:*)
++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
++ EV5) UNAME_MACHINE=alphaev5 ;;
++ EV56) UNAME_MACHINE=alphaev56 ;;
++ PCA56) UNAME_MACHINE=alphapca56 ;;
++ PCA57) UNAME_MACHINE=alphapca56 ;;
++ EV6) UNAME_MACHINE=alphaev6 ;;
++ EV67) UNAME_MACHINE=alphaev67 ;;
++ EV68*) UNAME_MACHINE=alphaev68 ;;
++ esac
++ objdump --private-headers /bin/sh | grep -q ld.so.1
++ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
++ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
++ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+@@ -861,20 +896,40 @@
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
++ | grep -q __ARM_PCS_VFP
++ then
++ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++ else
++ echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
++ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+- echo cris-axis-linux-gnu
++ echo ${UNAME_MACHINE}-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+- echo crisv32-axis-linux-gnu
++ echo ${UNAME_MACHINE}-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+- echo frv-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
++ hexagon:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
++ i*86:Linux:*:*)
++ LIBC=gnu
++ eval $set_cc_for_build
++ sed 's/^ //' << EOF >$dummy.c
++ #ifdef __dietlibc__
++ LIBC=dietlibc
++ #endif
++EOF
++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+@@ -901,39 +956,18 @@
+ #endif
+ #endif
+ EOF
+- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+- /^CPU/{
+- s: ::g
+- p
+- }'`"
++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+- echo or32-unknown-linux-gnu
+- exit ;;
+- ppc:Linux:*:*)
+- echo powerpc-unknown-linux-gnu
+- exit ;;
+- ppc64:Linux:*:*)
+- echo powerpc64-unknown-linux-gnu
+- exit ;;
+- alpha:Linux:*:*)
+- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+- EV5) UNAME_MACHINE=alphaev5 ;;
+- EV56) UNAME_MACHINE=alphaev56 ;;
+- PCA56) UNAME_MACHINE=alphapca56 ;;
+- PCA57) UNAME_MACHINE=alphapca56 ;;
+- EV6) UNAME_MACHINE=alphaev6 ;;
+- EV67) UNAME_MACHINE=alphaev67 ;;
+- EV68*) UNAME_MACHINE=alphaev68 ;;
+- esac
+- objdump --private-headers /bin/sh | grep -q ld.so.1
+- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
++ parisc64:Linux:*:* | hppa64:Linux:*:*)
++ echo hppa64-unknown-linux-gnu
++ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+@@ -942,14 +976,17 @@
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+- parisc64:Linux:*:* | hppa64:Linux:*:*)
+- echo hppa64-unknown-linux-gnu
++ ppc64:Linux:*:*)
++ echo powerpc64-unknown-linux-gnu
++ exit ;;
++ ppc:Linux:*:*)
++ echo powerpc-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+@@ -957,67 +994,18 @@
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
++ tile*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+- echo x86_64-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+- i*86:Linux:*:*)
+- # The BFD linker knows what the default object file format is, so
+- # first see if it will tell us. cd to the root directory to prevent
+- # problems with other programs or directories called `ld' in the path.
+- # Set LC_ALL=C to ensure ld outputs messages in English.
+- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+- | sed -ne '/supported targets:/!d
+- s/[ ][ ]*/ /g
+- s/.*supported targets: *//
+- s/ .*//
+- p'`
+- case "$ld_supported_targets" in
+- elf32-i386)
+- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+- ;;
+- esac
+- # Determine whether the default compiler is a.out or elf
+- eval $set_cc_for_build
+- sed 's/^ //' << EOF >$dummy.c
+- #include <features.h>
+- #ifdef __ELF__
+- # ifdef __GLIBC__
+- # if __GLIBC__ >= 2
+- LIBC=gnu
+- # else
+- LIBC=gnulibc1
+- # endif
+- # else
+- LIBC=gnulibc1
+- # endif
+- #else
+- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+- LIBC=gnu
+- #else
+- LIBC=gnuaout
+- #endif
+- #endif
+- #ifdef __dietlibc__
+- LIBC=dietlibc
+- #endif
+-EOF
+- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+- /^LIBC/{
+- s: ::g
+- p
+- }'`"
+- test x"${LIBC}" != x && {
+- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+- exit
+- }
+- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+- ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+@@ -1025,11 +1013,11 @@
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+- # Unixware is an offshoot of SVR4, but it has its own version
+- # number series starting with 2...
+- # I am not positive that other SVR4 systems won't match this,
++ # Unixware is an offshoot of SVR4, but it has its own version
++ # number series starting with 2...
++ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+- # Use sysv4.2uw... so that sysv4* matches it.
++ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+@@ -1061,7 +1049,7 @@
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+- # UnixWare 7.x, OpenUNIX and OpenServer 6.
++ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+@@ -1089,13 +1077,13 @@
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+- # uname -m prints for DJGPP always 'pc', but it prints nothing about
+- # the processor, so we play safe by assuming i586.
++ # uname -m prints for DJGPP always 'pc', but it prints nothing about
++ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+- exit ;;
++ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+@@ -1130,8 +1118,8 @@
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+- && { echo i486-ncr-sysv4; exit; } ;;
++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
++ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+@@ -1174,10 +1162,10 @@
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+- # says <Richard.M.Bartel@ccMail.Census.GOV>
+- echo i586-unisys-sysv4
+- exit ;;
++ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
++ # says <Richard.M.Bartel@ccMail.Census.GOV>
++ echo i586-unisys-sysv4
++ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+@@ -1203,11 +1191,11 @@
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+- echo mips-nec-sysv${UNAME_RELEASE}
++ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+- echo mips-unknown-sysv${UNAME_RELEASE}
++ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+- exit ;;
++ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+@@ -1220,6 +1208,9 @@
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
++ x86_64:Haiku:*:*)
++ echo x86_64-unknown-haiku
++ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+@@ -1247,6 +1238,16 @@
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
++ i386)
++ eval $set_cc_for_build
++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
++ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
++ grep IS_64BIT_ARCH >/dev/null
++ then
++ UNAME_PROCESSOR="x86_64"
++ fi
++ fi ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+@@ -1262,7 +1263,10 @@
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+- NSE-?:NONSTOP_KERNEL:*:*)
++ NEO-?:NONSTOP_KERNEL:*:*)
++ echo neo-tandem-nsk${UNAME_RELEASE}
++ exit ;;
++ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+@@ -1307,13 +1311,13 @@
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+- echo mips-sei-seiux${UNAME_RELEASE}
++ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+- UNAME_MACHINE=`(uname -p) 2>/dev/null`
++ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+@@ -1331,11 +1335,11 @@
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
++ x86_64:VMkernel:*:*)
++ echo ${UNAME_MACHINE}-unknown-esx
++ exit ;;
+ esac
+
+-#echo '(No uname command or uname output not recognized.)' 1>&2
+-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+-
+ eval $set_cc_for_build
+ cat >$dummy.c <<EOF
+ #ifdef _SEQUENT_
+@@ -1353,11 +1357,11 @@
+ #include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+ #ifdef NEWSOS4
+- "4"
++ "4"
+ #else
+- ""
++ ""
+ #endif
+- ); exit (0);
++ ); exit (0);
+ #endif
+ #endif
+
+diff -urN pilot-link-0.12.5/config.sub pilot-link-0.12.5-aarch64/config.sub
+--- pilot-link-0.12.5/config.sub 2009-11-03 20:06:26.000000000 -0600
++++ pilot-link-0.12.5-aarch64/config.sub 2013-03-08 06:00:41.379505372 -0600
+@@ -1,10 +1,10 @@
+ #! /bin/sh
+ # Configuration validation subroutine script.
+ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+-# Free Software Foundation, Inc.
++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
++# 2011, 2012 Free Software Foundation, Inc.
+
+-timestamp='2009-06-11'
++timestamp='2012-10-10'
+
+ # This file is (in principle) common to ALL GNU software.
+ # The presence of a machine in this file suggests that SOME GNU software
+@@ -21,9 +21,7 @@
+ # GNU General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+-# 02110-1301, USA.
++# along with this program; if not, see <http://www.gnu.org/licenses/>.
+ #
+ # As a special exception to the GNU General Public License, if you
+ # distribute this file as part of a program that contains a
+@@ -32,13 +30,16 @@
+
+
+ # Please send patches to <config-patches@gnu.org>. Submit a context
+-# diff and a properly formatted ChangeLog entry.
++# diff and a properly formatted GNU ChangeLog entry.
+ #
+ # Configuration subroutine to validate and canonicalize a configuration type.
+ # Supply the specified configuration type as an argument.
+ # If it is invalid, we print an error message on stderr and exit with code 1.
+ # Otherwise, we print the canonical config type on stdout and succeed.
+
++# You can get the latest version of this script from:
++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
++
+ # This file is supposed to be the same for all GNU packages
+ # and recognize all the CPU types, system types and aliases
+ # that are meaningful with *any* GNU software.
+@@ -72,8 +73,9 @@
+ version="\
+ GNU config.sub ($timestamp)
+
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
++Free Software Foundation, Inc.
+
+ This is free software; see the source for copying conditions. There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -120,13 +122,18 @@
+ # Here we must recognize all the valid KERNEL-OS combinations.
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
++ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
++ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
++ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
++ android-linux)
++ os=-linux-android
++ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
++ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+@@ -149,12 +156,12 @@
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+- -apple | -axis | -knuth | -cray)
++ -apple | -axis | -knuth | -cray | -microblaze*)
+ os=
+ basic_machine=$1
+ ;;
+- -bluegene*)
+- os=-cnk
++ -bluegene*)
++ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+@@ -170,10 +177,10 @@
+ os=-chorusos
+ basic_machine=$1
+ ;;
+- -chorusrdb)
+- os=-chorusrdb
++ -chorusrdb)
++ os=-chorusrdb
+ basic_machine=$1
+- ;;
++ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+@@ -218,6 +225,12 @@
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
++ -lynx*178)
++ os=-lynxos178
++ ;;
++ -lynx*5)
++ os=-lynxos5
++ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+@@ -242,20 +255,25 @@
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
++ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
++ | be32 | be64 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
++ | epiphany \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
++ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
++ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+- | maxq | mb | microblaze | mcore | mep | metag \
++ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+@@ -278,27 +296,39 @@
+ | moxie \
+ | mt \
+ | msp430 \
++ | nds32 | nds32le | nds32be \
+ | nios | nios2 \
+ | ns16k | ns32k \
++ | open8 \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
++ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
++ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+- | spu | strongarm \
+- | tahoe | thumb | tic4x | tic80 | tron \
+- | v850 | v850e \
++ | spu \
++ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
++ | ubicom32 \
++ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | we32k \
+- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
++ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+- m6811 | m68hc11 | m6812 | m68hc12)
+- # Motorola 68HC11/12.
++ c54x)
++ basic_machine=tic54x-unknown
++ ;;
++ c55x)
++ basic_machine=tic55x-unknown
++ ;;
++ c6x)
++ basic_machine=tic6x-unknown
++ ;;
++ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+@@ -308,6 +338,21 @@
+ basic_machine=mt-unknown
+ ;;
+
++ strongarm | thumb | xscale)
++ basic_machine=arm-unknown
++ ;;
++ xgate)
++ basic_machine=$basic_machine-unknown
++ os=-none
++ ;;
++ xscaleeb)
++ basic_machine=armeb-unknown
++ ;;
++
++ xscaleel)
++ basic_machine=armel-unknown
++ ;;
++
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+@@ -322,25 +367,30 @@
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
++ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
++ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
++ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
++ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
++ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
++ | microblaze-* | microblazeel-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+@@ -362,24 +412,29 @@
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
++ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
++ | open8-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
++ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+- | romp-* | rs6000-* \
++ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+- | tahoe-* | thumb-* \
+- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
++ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
++ | tahoe-* \
++ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
++ | tile*-* \
+ | tron-* \
+- | v850-* | v850e-* | vax-* \
++ | ubicom32-* \
++ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
++ | vax-* \
+ | we32k-* \
+- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
++ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+@@ -404,7 +459,7 @@
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+- abacus)
++ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+@@ -474,11 +529,20 @@
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
++ c54x-*)
++ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
++ c55x-*)
++ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
++ c6x-*)
++ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+- cegcc)
++ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+@@ -510,7 +574,7 @@
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+- cr16)
++ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+@@ -668,7 +732,6 @@
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+@@ -726,6 +789,13 @@
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
++ microblaze*)
++ basic_machine=microblaze-xilinx
++ ;;
++ mingw64)
++ basic_machine=x86_64-pc
++ os=-mingw64
++ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+@@ -762,10 +832,18 @@
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
++ msys)
++ basic_machine=i386-pc
++ os=-msys
++ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
++ nacl)
++ basic_machine=le32-unknown
++ os=-nacl
++ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+@@ -830,6 +908,12 @@
+ np1)
+ basic_machine=np1-gould
+ ;;
++ neo-tandem)
++ basic_machine=neo-tandem
++ ;;
++ nse-tandem)
++ basic_machine=nse-tandem
++ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+@@ -912,9 +996,10 @@
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+- ppc) basic_machine=powerpc-unknown
++ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ppc-* | ppcbe-*)
++ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+@@ -1008,6 +1093,9 @@
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
++ strongarm-* | thumb-*)
++ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+@@ -1064,20 +1152,8 @@
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+- tic54x | c54x*)
+- basic_machine=tic54x-unknown
+- os=-coff
+- ;;
+- tic55x | c55x*)
+- basic_machine=tic55x-unknown
+- os=-coff
+- ;;
+- tic6x | c6x*)
+- basic_machine=tic6x-unknown
+- os=-coff
+- ;;
+ tile*)
+- basic_machine=tile-unknown
++ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+@@ -1147,6 +1223,9 @@
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
++ xscale-* | xscalee[bl]-*)
++ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
++ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+@@ -1244,9 +1323,12 @@
+ if [ x"$os" != x"" ]
+ then
+ case $os in
+- # First match some system type aliases
+- # that might get confused with valid system types.
++ # First match some system type aliases
++ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
++ -auroraux)
++ os=-auroraux
++ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+@@ -1268,21 +1350,22 @@
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+- | -kopensolaris* \
++ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
++ | -sym* | -kopensolaris* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+- | -openbsd* | -solidbsd* \
++ | -bitrig* | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
++ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
++ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
++ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+@@ -1290,7 +1373,7 @@
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+@@ -1329,7 +1412,7 @@
+ -opened*)
+ os=-openedition
+ ;;
+- -os400*)
++ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+@@ -1378,7 +1461,7 @@
+ -sinix*)
+ os=-sysv4
+ ;;
+- -tpf*)
++ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+@@ -1423,6 +1506,8 @@
+ -dicos*)
+ os=-dicos
+ ;;
++ -nacl*)
++ ;;
+ -none)
+ ;;
+ *)
+@@ -1445,10 +1530,10 @@
+ # system, and we'll never get to this point.
+
+ case $basic_machine in
+- score-*)
++ score-*)
+ os=-elf
+ ;;
+- spu-*)
++ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+@@ -1460,8 +1545,20 @@
+ arm*-semi)
+ os=-aout
+ ;;
+- c4x-* | tic4x-*)
+- os=-coff
++ c4x-* | tic4x-*)
++ os=-coff
++ ;;
++ hexagon-*)
++ os=-elf
++ ;;
++ tic54x-*)
++ os=-coff
++ ;;
++ tic55x-*)
++ os=-coff
++ ;;
++ tic6x-*)
++ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+@@ -1481,14 +1578,11 @@
+ ;;
+ m68000-sun)
+ os=-sunos3
+- # This also exists in the configure program, but was not the
+- # default.
+- # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+- mep-*)
++ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+@@ -1515,7 +1609,7 @@
+ *-ibm)
+ os=-aix
+ ;;
+- *-knuth)
++ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
diff --git a/source/l/pilot-link/pilot-link-0.12.5-compiler_warnings.patch b/source/l/pilot-link/pilot-link-0.12.5-compiler_warnings.patch
new file mode 100644
index 000000000..017a51c29
--- /dev/null
+++ b/source/l/pilot-link/pilot-link-0.12.5-compiler_warnings.patch
@@ -0,0 +1,3067 @@
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/bindings/Perl/Pilot.xs pilot-link-0.12.5/bindings/Perl/Pilot.xs
+--- pilot-link-0.12.5-old/bindings/Perl/Pilot.xs 2011-12-19 18:30:45.000000000 +0100
++++ pilot-link-0.12.5/bindings/Perl/Pilot.xs 2011-12-19 17:51:55.364828217 +0100
+@@ -642,7 +642,7 @@ Unpack(record)
+ STRLEN len;
+ int i;
+ AV * e;
+- HV * ret, *h;
++ HV * ret;
+ struct Appointment a;
+ char *str;
+
+@@ -740,7 +740,6 @@ Pack(record)
+ {
+ SV ** s;
+ HV * h;
+- long advance;
+ struct Appointment a;
+
+ if (!SvOK(record) || !SvRV(record) || (SvTYPE(h=(HV*)SvRV(record))!=SVt_PVHV))
+@@ -881,9 +880,7 @@ UnpackAppBlock(record)
+ CODE:
+ {
+ STRLEN len;
+- AV * e;
+ HV * ret;
+- int i;
+ struct AppointmentAppInfo a;
+
+ if (SvOK(record) && SvRV(record) && (SvTYPE(SvRV(record)) == SVt_PVHV)) {
+@@ -917,11 +914,9 @@ PackAppBlock(record)
+ SV * record
+ CODE:
+ {
+- int i;
+ int len;
+ SV ** s;
+ HV * h;
+- AV * av;
+ struct AppointmentAppInfo a;
+
+ if (!SvRV(record) || (SvTYPE(h=(HV*)SvRV(record))!=SVt_PVHV))
+@@ -953,8 +948,6 @@ Unpack(record)
+ CODE:
+ {
+ STRLEN len;
+- int i;
+- AV * e;
+ HV * ret;
+ struct ToDo a;
+ char *str;
+@@ -1049,9 +1042,7 @@ UnpackAppBlock(record)
+ CODE:
+ {
+ STRLEN len;
+- AV * e;
+ HV * ret;
+- int i;
+ struct ToDoAppInfo a;
+
+ if (SvOK(record) && SvRV(record) && (SvTYPE(SvRV(record)) == SVt_PVHV)) {
+@@ -1086,11 +1077,9 @@ PackAppBlock(record)
+ SV * record
+ CODE:
+ {
+- int i;
+ int len;
+ SV ** s;
+ HV * h;
+- AV * av;
+ struct ToDoAppInfo a;
+
+ if (!SvRV(record) || (SvTYPE(h=(HV*)SvRV(record))!=SVt_PVHV))
+@@ -1342,8 +1331,6 @@ Unpack(record)
+ CODE:
+ {
+ STRLEN len;
+- int i;
+- AV * e;
+ HV * ret;
+ struct Memo a;
+ char *str;
+@@ -1422,9 +1409,7 @@ UnpackAppBlock(record)
+ CODE:
+ {
+ STRLEN len;
+- AV * e;
+ HV * ret;
+- int i;
+ struct MemoAppInfo a;
+
+ if (SvOK(record) && SvRV(record) && (SvTYPE(SvRV(record)) == SVt_PVHV)) {
+@@ -1457,11 +1442,9 @@ PackAppBlock(record)
+ SV * record
+ CODE:
+ {
+- int i;
+ int len;
+ SV ** s;
+ HV * h;
+- AV * av;
+ struct MemoAppInfo a;
+
+ if (!SvRV(record) || (SvTYPE(h=(HV*)SvRV(record))!=SVt_PVHV))
+@@ -1494,7 +1477,6 @@ Unpack(record)
+ CODE:
+ {
+ STRLEN len;
+- int i;
+ HV * ret;
+ struct Expense e;
+
+@@ -1665,15 +1647,15 @@ PackAppBlock(record)
+ for(i=0;i<4;i++) {
+ HV * hv;
+ if ((s=av_fetch(av, i, 0)) && SvOK(*s) && SvRV(*s) && (SvTYPE(hv=(HV*)SvRV(*s))==SVt_PVHV)) {
+- if (s = hv_fetch(hv, "name", 4, 0)) {
++ if ((s = hv_fetch(hv, "name", 4, 0))) {
+ strncpy(e.currencies[i].name, SvPV(*s, PL_na), 16);
+ e.currencies[i].name[15] = 0;
+ }
+- if (s = hv_fetch(hv, "symbol", 6, 0)) {
++ if ((s = hv_fetch(hv, "symbol", 6, 0))) {
+ strncpy(e.currencies[i].symbol, SvPV(*s, PL_na), 4);
+ e.currencies[i].symbol[3] = 0;
+ }
+- if (s = hv_fetch(hv, "rate", 4, 0)) {
++ if ((s = hv_fetch(hv, "rate", 4, 0))) {
+ strncpy(e.currencies[i].rate, SvPV(*s, PL_na), 8);
+ e.currencies[i].rate[7] = 0;
+ }
+@@ -1794,8 +1776,6 @@ Unpack(record)
+ CODE:
+ {
+ STRLEN len;
+- int i;
+- AV * e;
+ HV * ret;
+ struct Mail a;
+
+@@ -1897,9 +1877,7 @@ UnpackAppBlock(record)
+ CODE:
+ {
+ STRLEN len;
+- AV * e;
+ HV * ret;
+- int i;
+ struct MailAppInfo a;
+
+ if (SvOK(record) && SvRV(record) && (SvTYPE(SvRV(record)) == SVt_PVHV)) {
+@@ -1935,11 +1913,9 @@ PackAppBlock(record)
+ SV * record
+ CODE:
+ {
+- int i;
+ int len;
+ SV ** s;
+ HV * h;
+- AV * av;
+ struct MailAppInfo a;
+
+ if (!SvRV(record) || (SvTYPE(h=(HV*)SvRV(record))!=SVt_PVHV))
+@@ -1973,9 +1949,7 @@ UnpackSyncPref(record)
+ CODE:
+ {
+ STRLEN len;
+- AV * e;
+ HV * ret;
+- int i;
+ struct MailSyncPref a;
+
+ if (SvOK(record) && SvRV(record) && (SvTYPE(SvRV(record)) == SVt_PVHV)) {
+@@ -2017,11 +1991,9 @@ PackSyncPref(record, id)
+ int id
+ CODE:
+ {
+- int i;
+ int len;
+ SV ** s;
+ HV * h;
+- AV * av;
+ struct MailSyncPref a;
+
+ if (!SvRV(record) || (SvTYPE(h=(HV*)SvRV(record))!=SVt_PVHV))
+@@ -2057,9 +2029,7 @@ UnpackSignaturePref(record)
+ CODE:
+ {
+ STRLEN len;
+- AV * e;
+ HV * ret;
+- int i;
+ struct MailSignaturePref a;
+
+ if (SvOK(record) && SvRV(record) && (SvTYPE(SvRV(record)) == SVt_PVHV)) {
+@@ -2092,11 +2062,9 @@ PackSignaturePref(record, id)
+ int id
+ CODE:
+ {
+- int i;
+ int len;
+ SV ** s;
+ HV * h;
+- AV * av;
+ struct MailSignaturePref a;
+
+ if (!SvRV(record) || (SvTYPE(h=(HV*)SvRV(record))!=SVt_PVHV))
+@@ -2599,7 +2567,6 @@ getRecordIDs(self, sort=0)
+ int start;
+ int count;
+ int i;
+- AV * list = newAV();
+
+ start = 0;
+ for(;;) {
+@@ -2784,7 +2751,6 @@ getPref(self, id=0, backup=1)
+ Char4 creator;
+ int version, result;
+ size_t len;
+- SV * c, n, v;
+ int r;
+ if (self->Class) {
+ int count;
+@@ -2846,7 +2812,7 @@ setPrefRaw(self, data, number, version,
+ {
+ STRLEN len;
+ Char4 creator;
+- int version, result;
++ int result;
+ void * buf;
+ PackRaw;
+ buf = SvPV(data, len);
+@@ -3063,8 +3029,6 @@ delete(self, name, cardno=0)
+ int cardno
+ CODE:
+ {
+- UserInfo info;
+- int result;
+ RETVAL = dlp_DeleteDB(self->socket, cardno, name);
+ }
+ OUTPUT:
+@@ -3113,7 +3077,6 @@ open(self, name, mode=0, cardno=0)
+ self->errnop = result;
+ RETVAL = &PL_sv_undef;
+ } else {
+- int type;
+ PDA__Pilot__DLP__DB * x = malloc(sizeof(PDA__Pilot__DLP__DB));
+ SV * sv = newSViv((IV)(void*)x);
+ SvREFCNT_inc(ST(0));
+@@ -3205,7 +3168,6 @@ getPref(self, creator, id=0, backup=1)
+ {
+ int version, result;
+ size_t len;
+- SV * c, n, v;
+ result = dlp_ReadAppPreference(self->socket, creator, id, backup, 0xFFFF, mybuf, &len, &version);
+ ReturnReadPref(mybuf, len);
+ }
+@@ -3245,7 +3207,7 @@ setPrefRaw(self, data, creator, number,
+ PPCODE:
+ {
+ STRLEN len;
+- int version, result;
++ int result;
+ void * buf;
+ PackRaw;
+ buf = SvPV(data, len);
+@@ -3323,8 +3285,6 @@ getDBInfo(self, start, RAM=1, ROM=0, car
+ int cardno
+ CODE:
+ {
+- struct DBInfo info;
+-
+ int where = (RAM ? dlpDBListRAM : 0) | (ROM ? dlpDBListROM : 0);
+ int result = dlp_ReadDBList(self->socket, cardno, where, start, &pibuf);
+ pack_dbinfo(RETVAL,(*(struct DBInfo *)(pibuf.data)), result);
+@@ -3388,7 +3348,6 @@ getROMToken(self,token)
+ PPCODE:
+ {
+ char buffer[50];
+- long long_token;
+ size_t size;
+ int result;
+
+@@ -3592,7 +3551,7 @@ getRecords(self)
+ PDA::Pilot::File *self
+ CODE:
+ {
+- int len, result = 0;
++ int len;
+ pi_file_get_entries(self->pf, &len);
+ RETVAL = newSViv((int)len);
+ }
+@@ -3715,7 +3674,6 @@ addResource(self, data, type, id)
+ CODE:
+ {
+ STRLEN len;
+- int result;
+ void * buf;
+ PackResource;
+ buf = SvPV(data, len);
+@@ -3733,7 +3691,6 @@ addRecord(self, data)
+ STRLEN len;
+ unsigned long id;
+ int attr, category;
+- int result;
+ void * buf;
+ PackRecord;
+ buf = SvPV(data, len);
+@@ -3752,7 +3709,6 @@ addRecordRaw(self, data, uid, attr, cate
+ CODE:
+ {
+ STRLEN len;
+- int result;
+ void * buf;
+ PackRaw;
+ buf = SvPV(data, len);
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/include/pi-debug.h pilot-link-0.12.5/include/pi-debug.h
+--- pilot-link-0.12.5-old/include/pi-debug.h 2008-11-06 11:45:33.000000000 +0100
++++ pilot-link-0.12.5/include/pi-debug.h 2011-12-12 16:04:53.892605487 +0100
+@@ -57,10 +57,10 @@ extern void pi_debug_set_file PI_ARGS((c
+ extern void pi_log PI_ARGS((int type, int level, PI_CONST char *format, ...));
+
+ extern void pi_dumpline
+- PI_ARGS((PI_CONST char *buf, size_t len, unsigned int addr));
++ PI_ARGS((PI_CONST unsigned char *buf, size_t len, unsigned int addr));
+
+ extern void pi_dumpdata
+- PI_ARGS((PI_CONST char *buf, size_t len));
++ PI_ARGS((PI_CONST unsigned char *buf, size_t len));
+
+ #ifdef PI_DEBUG
+ #define ASSERT(expr) \
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/include/pi-header.h pilot-link-0.12.5/include/pi-header.h
+--- pilot-link-0.12.5-old/include/pi-header.h 2006-10-17 15:24:07.000000000 +0200
++++ pilot-link-0.12.5/include/pi-header.h 2011-12-19 16:44:54.555489570 +0100
+@@ -25,7 +25,7 @@
+
+ #ifndef SWIG
+ /* Print the version splash */
+-void print_splash(const char *progname) PI_DEPRECATED;
++void print_splash(const char *progname);
+
+ /* Connect to the Palm device */
+ int pilot_connect(const char *port) PI_DEPRECATED;
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/include/pi-md5.h pilot-link-0.12.5/include/pi-md5.h
+--- pilot-link-0.12.5-old/include/pi-md5.h 2010-02-07 04:42:37.000000000 +0100
++++ pilot-link-0.12.5/include/pi-md5.h 2011-12-14 17:40:52.551602121 +0100
+@@ -23,7 +23,7 @@
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+-#ifdef HAVE_INTTYPES_H || HAVE_STDINT_H
++#if defined(HAVE_INTTYPES_H) || defined(HAVE_STDINT_H)
+ #define UINT8 uint8_t
+ #define UINT32 uint32_t
+ #else
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/include/pi-md5.h.in pilot-link-0.12.5/include/pi-md5.h.in
+--- pilot-link-0.12.5-old/include/pi-md5.h.in 2010-02-07 04:42:49.000000000 +0100
++++ pilot-link-0.12.5/include/pi-md5.h.in 2011-12-20 16:40:09.826454843 +0100
+@@ -22,7 +22,7 @@
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+-#ifdef HAVE_INTTYPES_H || HAVE_STDINT_H
++#if defined(HAVE_INTTYPES_H) || defined(HAVE_STDINT_H)
+ #define UINT8 uint8_t
+ #define UINT32 uint32_t
+ #else
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/include/pi-source.h pilot-link-0.12.5/include/pi-source.h
+--- pilot-link-0.12.5-old/include/pi-source.h 2006-10-17 15:24:07.000000000 +0200
++++ pilot-link-0.12.5/include/pi-source.h 2011-12-14 13:03:26.571720585 +0100
+@@ -145,10 +145,10 @@ extern "C" {
+ pi_dumpline() and pi_dumpdata() */
+
+ extern void dumpline
+- PI_ARGS((PI_CONST char *buf, size_t len, unsigned int addr)) PI_DEPRECATED;
++ PI_ARGS((PI_CONST unsigned char *buf, size_t len, unsigned int addr)) PI_DEPRECATED;
+
+ extern void dumpdata
+- PI_ARGS((PI_CONST char *buf, size_t len)) PI_DEPRECATED;
++ PI_ARGS((PI_CONST unsigned char *buf, size_t len)) PI_DEPRECATED;
+
+
+ #ifdef __cplusplus
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/include/pi-util.h pilot-link-0.12.5/include/pi-util.h
+--- pilot-link-0.12.5-old/include/pi-util.h 2006-10-17 15:24:07.000000000 +0200
++++ pilot-link-0.12.5/include/pi-util.h 2011-12-07 21:25:14.513131657 +0100
+@@ -64,19 +64,19 @@ extern "C" {
+ PI_ARGS((int *establishrate, int *establishhighrate));
+
+ extern int convert_ToPilotChar_WithCharset
+- PI_ARGS((const char *charset, const char *text, int bytes,
++ PI_ARGS((const char *charset, char *text, int bytes,
+ char **ptext, const char *pi_charset));
+
+ extern int convert_ToPilotChar
+- PI_ARGS((const char *charset, const char *text, int bytes,
++ PI_ARGS((const char *charset, char *text, int bytes,
+ char **ptext));
+
+ extern int convert_FromPilotChar_WithCharset
+- PI_ARGS((const char *charset, const char *ptext, int bytes,
++ PI_ARGS((const char *charset, char *ptext, int bytes,
+ char **text, const char *pi_charset));
+
+ extern int convert_FromPilotChar
+- PI_ARGS((const char *charset, const char *ptext, int bytes,
++ PI_ARGS((const char *charset, char *ptext, int bytes,
+ char **text));
+
+ /** @brief Convert a milliseconds timeout value to an absolute timespec
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/address.c pilot-link-0.12.5/libpisock/address.c
+--- pilot-link-0.12.5-old/libpisock/address.c 2007-01-15 01:29:59.000000000 +0100
++++ pilot-link-0.12.5/libpisock/address.c 2011-12-07 20:24:45.951236249 +0100
+@@ -209,7 +209,7 @@ unpack_AddressAppInfo(AddressAppInfo_t *
+ size_t i,
+ destlen = 4 + 16 * 22 + 2 + 2;
+
+- unsigned char *start = record;
++ const unsigned char *start = record;
+ unsigned long r;
+
+ ai->type = address_v1;
+@@ -276,11 +276,6 @@ pack_AddressAppInfo(const AddressAppInfo
+ pos += i;
+ len -= i;
+
+- for (i = 3; i < 8; i++)
+- strcpy(ai->phoneLabels[i - 3], ai->labels[i]);
+- for (i = 19; i < 22; i++)
+- strcpy(ai->phoneLabels[i - 19 + 5], ai->labels[i]);
+-
+ memset(pos, 0, destlen);
+
+ r = 0;
+@@ -297,11 +292,6 @@ pack_AddressAppInfo(const AddressAppInfo
+ set_byte(pos, ai->sortByCompany);
+ pos += 2;
+
+- for (i = 3; i < 8; i++)
+- strcpy(ai->phoneLabels[i - 3], ai->labels[i]);
+- for (i = 19; i < 22; i++)
+- strcpy(ai->phoneLabels[i - 19 + 5], ai->labels[i]);
+-
+ return (pos - record);
+ }
+
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/bluetooth.c pilot-link-0.12.5/libpisock/bluetooth.c
+--- pilot-link-0.12.5-old/libpisock/bluetooth.c 2008-05-03 22:21:22.000000000 +0200
++++ pilot-link-0.12.5/libpisock/bluetooth.c 2012-01-04 19:54:41.494267929 +0100
+@@ -286,14 +286,11 @@ static pi_protocol_t*
+ pi_bluetooth_protocol (pi_device_t *dev)
+ {
+ pi_protocol_t *prot;
+- struct pi_bluetooth_data *data;
+
+ ASSERT (dev != NULL);
+
+ prot = (pi_protocol_t *) malloc(sizeof (pi_protocol_t));
+
+- data = (struct pi_bluetooth_data *)(dev->data);
+-
+ if (prot != NULL) {
+ prot->level = PI_LEVEL_DEV;
+ prot->dup = pi_bluetooth_protocol_dup;
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/calendar.c pilot-link-0.12.5/libpisock/calendar.c
+--- pilot-link-0.12.5-old/libpisock/calendar.c 2010-02-07 03:21:18.000000000 +0100
++++ pilot-link-0.12.5/libpisock/calendar.c 2012-01-13 16:07:09.096320373 +0100
+@@ -461,7 +461,7 @@ unpack_CalendarEvent(CalendarEvent_t *a,
+ }
+ }
+ if(p2 - buf->data < buf->used) {
+- printf("Extra data found %ld bytes\n", (buf->used - (p2 - buf->data)));
++ printf("Extra data found %zu bytes\n", (buf->used - (p2 - buf->data)));
+ return -1;
+ }
+ } else {
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/darwinusb.c pilot-link-0.12.5/libpisock/darwinusb.c
+--- pilot-link-0.12.5-old/libpisock/darwinusb.c 2007-01-15 01:29:59.000000000 +0100
++++ pilot-link-0.12.5/libpisock/darwinusb.c 2011-12-13 16:25:22.825510660 +0100
+@@ -1096,7 +1096,7 @@ find_interfaces(usb_connection_t *c,
+ {
+ /* got something! */
+ LOG((PI_DBG_DEV, PI_DBG_LVL_DEBUG, "darwinusb: got %d bytes there!\n", (int)size));
+- CHECK(PI_DBG_DEV, PI_DBG_LVL_DEBUG, pi_dumpdata(c->read_buffer, size));
++ CHECK(PI_DBG_DEV, PI_DBG_LVL_DEBUG, pi_dumpdata((unsigned char *)c->read_buffer, size));
+ if (!memcmp(c->read_buffer, "VNDR10", 6))
+ {
+ /* VNDR version 1.0 */
+@@ -1235,7 +1235,7 @@ read_visor_connection_information (IOUSB
+ }
+ else
+ {
+- CHECK(PI_DBG_DEV, PI_DBG_LVL_DEBUG, pi_dumpdata((const char *)&ci, sizeof(ci)));
++ CHECK(PI_DBG_DEV, PI_DBG_LVL_DEBUG, pi_dumpdata((unsigned char *)&ci, sizeof(ci)));
+ ci.num_ports = CFSwapInt16LittleToHost(ci.num_ports); /* number of ports is little-endian */
+ if (ci.num_ports > 8)
+ ci.num_ports = 8;
+@@ -1280,7 +1280,7 @@ decode_generic_connection_information(pa
+ {
+ int i;
+
+- CHECK(PI_DBG_DEV, PI_DBG_LVL_DEBUG, pi_dumpdata((const char *)ci, sizeof(palm_ext_connection_info)));
++ CHECK(PI_DBG_DEV, PI_DBG_LVL_DEBUG, pi_dumpdata((unsigned char *)ci, sizeof(palm_ext_connection_info)));
+ LOG((PI_DBG_DEV, PI_DBG_LVL_DEBUG, "darwinusb: decode_generic_connection_information num_ports=%d, endpoint_numbers_different=%d\n", ci->num_ports, ci->endpoint_numbers_different));
+
+ for (i=0; i < ci->num_ports; i++)
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/debug.c pilot-link-0.12.5/libpisock/debug.c
+--- pilot-link-0.12.5-old/libpisock/debug.c 2006-10-12 16:21:22.000000000 +0200
++++ pilot-link-0.12.5/libpisock/debug.c 2011-12-14 13:03:16.364897382 +0100
+@@ -173,7 +173,7 @@ pi_log (int type, int level, const char
+ }
+
+ void
+-pi_dumpline(const char *buf, size_t len, unsigned int addr)
++pi_dumpline(const unsigned char *buf, size_t len, unsigned int addr)
+ {
+ unsigned int i;
+ int offset;
+@@ -212,14 +212,14 @@ pi_dumpline(const char *buf, size_t len,
+ }
+
+ void
+-dumpline(const char *buf, size_t len, unsigned int addr)
++dumpline(const unsigned char *buf, size_t len, unsigned int addr)
+ {
+ /* this function will be removed in 0.13. Use pi_dumpline() instead. */
+ pi_dumpline(buf, len, addr);
+ }
+
+ void
+-pi_dumpdata(const char *buf, size_t len)
++pi_dumpdata(const unsigned char *buf, size_t len)
+ {
+ unsigned int i;
+
+@@ -228,7 +228,7 @@ pi_dumpdata(const char *buf, size_t len)
+ }
+
+ void
+-dumpdata(const char *buf, size_t len)
++dumpdata(const unsigned char *buf, size_t len)
+ {
+ /* this function will be removed in 0.13. Use pi_dumpdata() instead */
+ pi_dumpdata(buf, len);
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/dlp.c pilot-link-0.12.5/libpisock/dlp.c
+--- pilot-link-0.12.5-old/libpisock/dlp.c 2011-12-19 18:30:44.000000000 +0100
++++ pilot-link-0.12.5/libpisock/dlp.c 2011-12-13 18:12:50.807265809 +0100
+@@ -173,7 +173,7 @@ static void record_dump (unsigned long r
+ (flags & dlpRecAttrArchived) ? " Archive" : "",
+ (!flags) ? " None" : "",
+ flags, data_len));
+- pi_dumpdata(data, (size_t)data_len);
++ pi_dumpdata((unsigned char *)data, (size_t)data_len);
+ }
+ #endif
+
+@@ -1663,7 +1663,7 @@ dlp_CallApplication(int sd, unsigned lon
+ get_long(DLP_RESPONSE_DATA(res, 0, 0)),
+ data_len));
+ CHECK(PI_DBG_DLP, PI_DBG_LVL_DEBUG,
+- pi_dumpdata(DLP_RESPONSE_DATA(res, 0, 16),
++ pi_dumpdata((unsigned char *)DLP_RESPONSE_DATA(res, 0, 16),
+ (size_t)data_len));
+ }
+
+@@ -1711,7 +1711,7 @@ dlp_CallApplication(int sd, unsigned lon
+ (unsigned int)get_short(DLP_RESPONSE_DATA(res, 0, 2)),
+ data_len));
+ CHECK(PI_DBG_DLP, PI_DBG_LVL_DEBUG,
+- pi_dumpdata(DLP_RESPONSE_DATA(res, 0, 6),
++ pi_dumpdata((unsigned char *)DLP_RESPONSE_DATA(res, 0, 6),
+ (size_t)data_len));
+ }
+ }
+@@ -2497,7 +2497,7 @@ dlp_ReadRecordIDList(int sd, int dbhandl
+ LOG((PI_DBG_DLP, PI_DBG_LVL_INFO,
+ "DLP ReadRecordIDList %d IDs:\n", ret));
+ CHECK(PI_DBG_DLP, PI_DBG_LVL_DEBUG,
+- pi_dumpdata(DLP_RESPONSE_DATA(res, 0, 2),
++ pi_dumpdata((unsigned char *)DLP_RESPONSE_DATA(res, 0, 2),
+ (size_t)(ret * 4)));
+ }
+
+@@ -2731,7 +2731,7 @@ dlp_ReadResourceByType(int sd, int dbhan
+ printlong(type), resID,
+ get_short(DLP_RESPONSE_DATA(res, 0, 6)),(size_t)data_len));
+ CHECK(PI_DBG_DLP, PI_DBG_LVL_DEBUG,
+- pi_dumpdata(DLP_RESPONSE_DATA(res, 0, 10),(size_t)data_len));
++ pi_dumpdata((unsigned char *)DLP_RESPONSE_DATA(res, 0, 10),(size_t)data_len));
+ } else {
+ data_len = result;
+ }
+@@ -2830,7 +2830,7 @@ dlp_ReadResourceByIndex(int sd, int dbha
+ get_short(DLP_RESPONSE_DATA(res, 0, 4)),
+ resindex, data_len));
+ CHECK(PI_DBG_DLP, PI_DBG_LVL_DEBUG,
+- pi_dumpdata(DLP_RESPONSE_DATA(res, 0, (large ? 12 : 10)),
++ pi_dumpdata((unsigned char *)DLP_RESPONSE_DATA(res, 0, (large ? 12 : 10)),
+ (size_t)data_len));
+ } else {
+ data_len = result;
+@@ -2961,7 +2961,7 @@ dlp_ReadAppBlock(int sd, int dbhandle, i
+ LOG((PI_DBG_DLP, PI_DBG_LVL_INFO,
+ "DLP ReadAppBlock %d bytes\n", data_len));
+ CHECK(PI_DBG_DLP, PI_DBG_LVL_DEBUG,
+- pi_dumpdata(DLP_RESPONSE_DATA(res, 0, 2),
++ pi_dumpdata((unsigned char *)DLP_RESPONSE_DATA(res, 0, 2),
+ (size_t)data_len));
+ }
+ } else {
+@@ -3048,7 +3048,7 @@ dlp_ReadSortBlock(int sd, int dbhandle,
+ LOG((PI_DBG_DLP, PI_DBG_LVL_INFO,
+ "DLP ReadSortBlock %d bytes\n", data_len));
+ CHECK(PI_DBG_DLP, PI_DBG_LVL_DEBUG,
+- pi_dumpdata(DLP_RESPONSE_DATA(res, 0, 2),
++ pi_dumpdata((unsigned char *)DLP_RESPONSE_DATA(res, 0, 2),
+ (size_t)data_len));
+ }
+ } else {
+@@ -3254,7 +3254,7 @@ dlp_ReadNextRecInCategory(int sd, int db
+ (!flags) ? " None" : "",
+ flags, data_len));
+ CHECK(PI_DBG_DLP, PI_DBG_LVL_DEBUG,
+- pi_dumpdata(DLP_RESPONSE_DATA(res, 0, 10),
++ pi_dumpdata((unsigned char *)DLP_RESPONSE_DATA(res, 0, 10),
+ (size_t)data_len));
+ } else {
+ data_len = result;
+@@ -3362,7 +3362,7 @@ dlp_ReadAppPreference(int sd, unsigned l
+ get_short(DLP_RESPONSE_DATA(res, 0, 2)),
+ get_short(DLP_RESPONSE_DATA(res, 0, 4))));
+ CHECK(PI_DBG_DLP, PI_DBG_LVL_DEBUG,
+- pi_dumpdata(DLP_RESPONSE_DATA(res, 0, 6),
++ pi_dumpdata((unsigned char *)DLP_RESPONSE_DATA(res, 0, 6),
+ (size_t)data_len));
+ } else {
+ data_len = result;
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/hinote.c pilot-link-0.12.5/libpisock/hinote.c
+--- pilot-link-0.12.5-old/libpisock/hinote.c 2006-10-12 16:21:22.000000000 +0200
++++ pilot-link-0.12.5/libpisock/hinote.c 2012-01-04 20:01:27.297338187 +0100
+@@ -121,8 +121,7 @@ pack_HiNoteNote(HiNoteNote_t *hinote, un
+ int
+ unpack_HiNoteAppInfo(HiNoteAppInfo_t *appinfo, unsigned char *record, size_t len)
+ {
+- int i,
+- idx;
++ int i;
+ unsigned char *start;
+
+ start = record;
+@@ -133,7 +132,7 @@ unpack_HiNoteAppInfo(HiNoteAppInfo_t *ap
+ len -= i;
+ if (len < 48)
+ return 0;
+- for (idx = 0; i < 48; i++)
++ for (i = 0; i < 48; i++)
+ appinfo->reserved[i] = *record++;
+ return (record - start);
+ }
+@@ -153,8 +152,7 @@ unpack_HiNoteAppInfo(HiNoteAppInfo_t *ap
+ int
+ pack_HiNoteAppInfo(HiNoteAppInfo_t *appinfo, unsigned char *record, size_t len)
+ {
+- int i,
+- idx;
++ int i;
+ unsigned char *start = record;
+
+ i = pack_CategoryAppInfo(&appinfo->category, record, len);
+@@ -166,7 +164,7 @@ pack_HiNoteAppInfo(HiNoteAppInfo_t *appi
+ len -= i;
+ if (len < 48)
+ return (record - start);
+- for (idx = 0; i < 48; i++)
++ for (i = 0; i < 48; i++)
+ *record++ = appinfo->reserved[i];
+
+ return (record - start);
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/inet.c pilot-link-0.12.5/libpisock/inet.c
+--- pilot-link-0.12.5-old/libpisock/inet.c 2006-10-12 16:21:22.000000000 +0200
++++ pilot-link-0.12.5/libpisock/inet.c 2012-01-04 19:11:50.256766421 +0100
+@@ -112,12 +112,9 @@ static pi_protocol_t*
+ pi_inet_protocol (pi_device_t *dev)
+ {
+ pi_protocol_t *prot;
+- pi_inet_data_t *data;
+
+ ASSERT (dev != NULL);
+
+- data = dev->data;
+-
+ prot = (pi_protocol_t *)malloc (sizeof (pi_protocol_t));
+
+ if (prot != NULL) {
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/libusb.c pilot-link-0.12.5/libpisock/libusb.c
+--- pilot-link-0.12.5-old/libpisock/libusb.c 2007-02-09 17:06:22.000000000 +0100
++++ pilot-link-0.12.5/libpisock/libusb.c 2012-01-04 19:57:15.495647341 +0100
+@@ -468,7 +468,7 @@ u_write(struct pi_socket *ps, const unsi
+ if (len <= 0)
+ return 0;
+
+- ret = usb_bulk_write (USB_handle, USB_out_endpoint, buf, len, timeout);
++ ret = usb_bulk_write (USB_handle, USB_out_endpoint, (char *)buf, len, timeout);
+ LOG((PI_DBG_DEV, PI_DBG_LVL_DEBUG, "Wrote: %d.\n", ret));
+ if (ret > 0)
+ CHECK (PI_DBG_DEV, PI_DBG_LVL_DEBUG, pi_dumpdata (buf, ret));
+@@ -505,7 +505,6 @@ u_read_i(struct pi_socket *ps, pi_buffer
+ if (RD_buffer_used < len) {
+ struct timeval now;
+ struct timespec when, nownow;
+- int last_used;
+ gettimeofday(&now, NULL);
+ when.tv_sec = now.tv_sec + timeout / 1000;
+ when.tv_nsec = (now.tv_usec + (timeout % 1000) * 1000) * 1000;
+@@ -516,8 +515,6 @@ u_read_i(struct pi_socket *ps, pi_buffer
+
+ RD_wanted = len;
+ do {
+- last_used = RD_buffer_used;
+-
+ LOG((PI_DBG_DEV, PI_DBG_LVL_DEBUG, "%s %d (%s): %d %d.\n",
+ __FILE__, __LINE__, __FUNCTION__, len, RD_buffer_used));
+
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/linuxusb.c pilot-link-0.12.5/libpisock/linuxusb.c
+--- pilot-link-0.12.5-old/libpisock/linuxusb.c 2006-10-12 16:21:22.000000000 +0200
++++ pilot-link-0.12.5/libpisock/linuxusb.c 2011-12-07 16:52:23.942559596 +0100
+@@ -27,6 +27,7 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/socket.h>
+
+ #include "pi-debug.h"
+ #include "pi-source.h"
+@@ -48,8 +49,8 @@
+
+ static int u_open(pi_socket_t *ps, struct pi_sockaddr *addr, size_t addrlen);
+ static int u_close(pi_socket_t *ps);
+-static int u_write(pi_socket_t *ps, unsigned char *buf, size_t len, int flags);
+-static int u_read(pi_socket_t *ps, pi_buffer_t *buf, size_t len, int flags);
++static ssize_t u_write(pi_socket_t *ps, const unsigned char *buf, size_t len, int flags);
++static ssize_t u_read(pi_socket_t *ps, pi_buffer_t *buf, size_t len, int flags);
+ static int u_poll(pi_socket_t *ps, int timeout);
+ static int u_flush(pi_socket_t *ps, int flags);
+
+@@ -188,8 +189,8 @@ u_poll(pi_socket_t *ps, int timeout)
+ * Returns: Nothing
+ *
+ ***********************************************************************/
+-static int
+-u_write(pi_socket_t *ps, unsigned char *buf, size_t len, int flags)
++static ssize_t
++u_write(pi_socket_t *ps, const unsigned char *buf, size_t len, int flags)
+ {
+ int total,
+ nwrote;
+@@ -281,7 +282,7 @@ u_read_buf (pi_socket_t *ps, pi_buffer_t
+ * Returns: number of bytes read or negative otherwise
+ *
+ ***********************************************************************/
+-static int
++static ssize_t
+ u_read(pi_socket_t *ps, pi_buffer_t *buf, size_t len, int flags)
+ {
+ ssize_t rbuf = 0,
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/Makefile.am pilot-link-0.12.5/libpisock/Makefile.am
+--- pilot-link-0.12.5-old/libpisock/Makefile.am 2009-05-25 05:22:55.000000000 +0200
++++ pilot-link-0.12.5/libpisock/Makefile.am 2011-12-19 13:22:17.375486115 +0100
+@@ -1,5 +1,4 @@
+ INCLUDES = \
+- -I../include \
+ -I$(top_srcdir)/include
+
+ bluetooth_FILES = \
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/Makefile.in pilot-link-0.12.5/libpisock/Makefile.in
+--- pilot-link-0.12.5-old/libpisock/Makefile.in 2012-01-04 17:53:04.413603881 +0100
++++ pilot-link-0.12.5/libpisock/Makefile.in 2012-01-04 22:52:56.453905685 +0100
+@@ -317,7 +317,6 @@ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ usb_libs = @usb_libs@
+ INCLUDES = \
+- -I../include \
+ -I$(top_srcdir)/include
+
+ bluetooth_FILES = \
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/memo.c pilot-link-0.12.5/libpisock/memo.c
+--- pilot-link-0.12.5-old/libpisock/memo.c 2007-01-15 01:30:00.000000000 +0100
++++ pilot-link-0.12.5/libpisock/memo.c 2011-12-07 20:35:30.203369247 +0100
+@@ -122,7 +122,7 @@ unpack_MemoAppInfo(struct MemoAppInfo *a
+ size_t len)
+ {
+ int i = unpack_CategoryAppInfo(&appinfo->category, record, len);
+- unsigned char *start = record;
++ const unsigned char *start = record;
+
+ appinfo->type = memo_v1;
+
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/net.c pilot-link-0.12.5/libpisock/net.c
+--- pilot-link-0.12.5-old/libpisock/net.c 2006-10-12 16:21:22.000000000 +0200
++++ pilot-link-0.12.5/libpisock/net.c 2011-12-13 18:18:46.987142736 +0100
+@@ -382,7 +382,7 @@ net_tx(pi_socket_t *ps, const unsigned c
+ }
+
+ CHECK(PI_DBG_NET, PI_DBG_LVL_INFO, net_dump_header(buf, 1, ps->sd));
+- CHECK(PI_DBG_NET, PI_DBG_LVL_DEBUG, pi_dumpdata((char *)msg, len));
++ CHECK(PI_DBG_NET, PI_DBG_LVL_DEBUG, pi_dumpdata(msg, len));
+
+ free(buf);
+ return len;
+@@ -513,7 +513,7 @@ net_rx(pi_socket_t *ps, pi_buffer_t *msg
+ LOG ((PI_DBG_NET, PI_DBG_LVL_ERR,
+ "NET RX (%i): Unknown packet type\n",
+ ps->sd));
+- CHECK(PI_DBG_NET, PI_DBG_LVL_INFO, pi_dumpdata((char *)header->data, PI_NET_HEADER_LEN));
++ CHECK(PI_DBG_NET, PI_DBG_LVL_INFO, pi_dumpdata(header->data, PI_NET_HEADER_LEN));
+ pi_buffer_free(header);
+ return pi_set_error(ps->sd, PI_ERR_PROT_BADPACKET);
+ }
+@@ -704,7 +704,7 @@ net_dump(unsigned char *header, unsigned
+ size_t size;
+
+ size = get_long(&header[PI_NET_OFFSET_SIZE]);
+- pi_dumpdata((char *)data, size);
++ pi_dumpdata(data, size);
+ }
+
+ /* vi: set ts=8 sw=4 sts=4 noexpandtab: cin */
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/padp.c pilot-link-0.12.5/libpisock/padp.c
+--- pilot-link-0.12.5-old/libpisock/padp.c 2007-02-16 17:25:43.000000000 +0100
++++ pilot-link-0.12.5/libpisock/padp.c 2011-12-12 16:18:02.112726207 +0100
+@@ -959,7 +959,7 @@ padp_dump(const unsigned char *data)
+ if (size > PI_PADP_MTU)
+ size = PI_PADP_MTU;
+ if (type != padAck)
+- pi_dumpdata((char *)&data[header_size], size);
++ pi_dumpdata(&data[header_size], size);
+ }
+
+ /* vi: set ts=8 sw=4 sts=4 noexpandtab: cin */
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/palmpix.c pilot-link-0.12.5/libpisock/palmpix.c
+--- pilot-link-0.12.5-old/libpisock/palmpix.c 2006-10-12 16:21:22.000000000 +0200
++++ pilot-link-0.12.5/libpisock/palmpix.c 2012-01-04 19:26:38.628945553 +0100
+@@ -1609,22 +1609,24 @@ static int
+ int
+ unpack_PalmPixHeader (struct PalmPixHeader *h, const unsigned char *p, int len)
+ {
+- int magic1, magic2;
++ /* int magic1, magic2; */
+
+ if (len != 196)
+ return 0;
+
++ /*
+ magic1 = p[1];
+ magic2 = get_le_short (&p[46]);
+-
++ */
++
+ /* FIXME For now, don't check the magic. I've seen 0x0002 and 0x0201.
+ I'm not sure that the endianness is right on this one. Possibly it
+ should be interpreted as two bytes instead (major and minor?). */
+- #if 0
++ /*
+ if (magic1 != 0 || (magic2 != 0x0102 && magic2 != 0x0002))
+ return 0;
+- #endif
+-
++ */
++
+ h->numRec= p[0];
+ h->month= p[2];
+ h->day= p[3];
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/pi-file.c pilot-link-0.12.5/libpisock/pi-file.c
+--- pilot-link-0.12.5-old/libpisock/pi-file.c 2006-10-12 16:21:22.000000000 +0200
++++ pilot-link-0.12.5/libpisock/pi-file.c 2011-12-21 16:00:10.858944394 +0100
+@@ -382,7 +382,7 @@ pi_file_read_resource_by_type_id(pi_file
+ int resid, void **bufp, size_t *sizep,
+ int *resindex)
+ {
+- int i,
++ int i = 0,
+ result;
+
+ result = pi_file_find_resource_by_type_id(pf, restype, resid, &i);
+@@ -1351,7 +1351,9 @@ pi_file_close_for_write(pi_file_t *pf)
+ }
+
+ /* This may just be packing */
+- fwrite("\0\0", 1, 2, f);
++ if (fwrite("\0\0", 1, 2, f) != 2) {
++ goto bad;
++ }
+
+ if (pf->app_info
+ && (fwrite(pf->app_info, 1,(size_t) pf->app_info_size, f) !=
+@@ -1364,7 +1366,9 @@ pi_file_close_for_write(pi_file_t *pf)
+ goto bad;
+
+
+- fwrite(pf->tmpbuf->data, pf->tmpbuf->used, 1, f);
++ if (fwrite(pf->tmpbuf->data, pf->tmpbuf->used, 1, f) != 1) {
++ goto bad;
++ }
+ fflush(f);
+
+ if (ferror(f) || feof(f))
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/serial.c pilot-link-0.12.5/libpisock/serial.c
+--- pilot-link-0.12.5-old/libpisock/serial.c 2011-12-19 18:30:44.000000000 +0100
++++ pilot-link-0.12.5/libpisock/serial.c 2011-12-20 17:38:49.101508096 +0100
+@@ -374,7 +374,9 @@ begin:
+ # endif /* PATH_MAX */
+ #endif /* MAXPATHLEN */
+
+- realpath(pa->pi_device, realport);
++ if (!realpath(pa->pi_device, realport)) {
++ strncpy(realport, pa->pi_device, sizeof(pa->pi_device));
++ }
+ errno = save_errno;
+
+ if (errno == ENOENT) {
+@@ -482,7 +484,7 @@ pi_serial_accept(pi_socket_t *ps, struct
+ LOG((PI_DBG_DEV, PI_DBG_LVL_DEBUG, "%s: %d, poll result: %d.\n", __FILE__, __LINE__, result));
+
+ if (result < 0) {
+- char buf[] = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 };
++ unsigned char buf[] = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 };
+ data->impl.write(ps, buf, sizeof (buf), 1000);
+ }
+ }
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/slp.c pilot-link-0.12.5/libpisock/slp.c
+--- pilot-link-0.12.5-old/libpisock/slp.c 2006-10-17 15:19:53.000000000 +0200
++++ pilot-link-0.12.5/libpisock/slp.c 2011-12-12 16:18:40.700958799 +0100
+@@ -362,7 +362,7 @@ slp_rx(pi_socket_t *ps, pi_buffer_t *buf
+ } else {
+ LOG((PI_DBG_SLP, PI_DBG_LVL_WARN,
+ "SLP RX Header checksum failed for header:\n"));
+- pi_dumpdata((const char *)slp_buf->data, PI_SLP_HEADER_LEN);
++ pi_dumpdata(slp_buf->data, PI_SLP_HEADER_LEN);
+ pi_buffer_free (slp_buf);
+ return 0;
+ }
+@@ -646,7 +646,7 @@ slp_dump_header(const unsigned char *dat
+ void
+ slp_dump(const unsigned char *data)
+ {
+- pi_dumpdata((char *)&data[PI_SLP_HEADER_LEN], get_short(&data[PI_SLP_OFFSET_SIZE]));
++ pi_dumpdata(&data[PI_SLP_HEADER_LEN], get_short(&data[PI_SLP_OFFSET_SIZE]));
+ }
+
+ /* vi: set ts=8 sw=4 sts=4 noexpandtab: cin */
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/socket.c pilot-link-0.12.5/libpisock/socket.c
+--- pilot-link-0.12.5-old/libpisock/socket.c 2007-01-15 01:30:00.000000000 +0100
++++ pilot-link-0.12.5/libpisock/socket.c 2012-01-12 19:43:34.935489417 +0100
+@@ -1106,7 +1106,9 @@ pi_listen(int pi_sd, int backlog)
+ {
+ pi_socket_t *ps;
+
+- if (!(ps = find_pi_socket(pi_sd))) {
++ ps = find_pi_socket(pi_sd);
++
++ if (!ps || !ps->device) {
+ errno = ESRCH;
+ return PI_ERR_SOCK_INVALID;
+ }
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/sys.c pilot-link-0.12.5/libpisock/sys.c
+--- pilot-link-0.12.5-old/libpisock/sys.c 2006-10-12 16:21:22.000000000 +0200
++++ pilot-link-0.12.5/libpisock/sys.c 2012-01-04 19:27:23.408239457 +0100
+@@ -241,14 +241,12 @@ sys_rx(pi_socket_t *ps, pi_buffer_t *buf
+ pi_protocol_t *next,
+ *prot;
+
+- pi_sys_data_t *data;
+ size_t data_len;
+
+ prot = pi_protocol(ps->sd, PI_LEVEL_SYS);
+ if (prot == NULL)
+ return pi_set_error(ps->sd, PI_ERR_SOCK_INVALID);
+
+- data = (pi_sys_data_t *)prot->data;
+ next = pi_protocol_next(ps->sd, PI_LEVEL_SYS);
+ if (next == NULL)
+ return pi_set_error(ps->sd, PI_ERR_SOCK_INVALID);
+@@ -360,7 +358,7 @@ sys_dump_header(const unsigned char *dat
+ void
+ sys_dump(const unsigned char *data, size_t len)
+ {
+- pi_dumpdata((char *)&data[PI_SYS_HEADER_LEN], len);
++ pi_dumpdata(&data[PI_SYS_HEADER_LEN], len);
+ }
+
+ /* vi: set ts=8 sw=4 sts=4 noexpandtab: cin */
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisock/todo.c pilot-link-0.12.5/libpisock/todo.c
+--- pilot-link-0.12.5-old/libpisock/todo.c 2007-01-15 01:30:00.000000000 +0100
++++ pilot-link-0.12.5/libpisock/todo.c 2011-12-07 20:47:25.134224235 +0100
+@@ -232,7 +232,7 @@ int
+ unpack_ToDoAppInfo(ToDoAppInfo_t *appinfo, const unsigned char *record, size_t len)
+ {
+ int i;
+- unsigned char *start = record;
++ const unsigned char *start = record;
+
+ appinfo->type = todo_v1;
+
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisync/Makefile.am pilot-link-0.12.5/libpisync/Makefile.am
+--- pilot-link-0.12.5-old/libpisync/Makefile.am 2005-02-17 20:01:35.000000000 +0100
++++ pilot-link-0.12.5/libpisync/Makefile.am 2011-12-19 13:22:30.210258195 +0100
+@@ -1,5 +1,4 @@
+ INCLUDES = \
+- -I../include \
+ -I$(top_srcdir)/include \
+ $(ICONV_CFLAGS)
+
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisync/Makefile.in pilot-link-0.12.5/libpisync/Makefile.in
+--- pilot-link-0.12.5-old/libpisync/Makefile.in 2012-01-04 17:53:04.463602027 +0100
++++ pilot-link-0.12.5/libpisync/Makefile.in 2012-01-04 22:52:56.503897733 +0100
+@@ -284,7 +284,6 @@ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ usb_libs = @usb_libs@
+ INCLUDES = \
+- -I../include \
+ -I$(top_srcdir)/include \
+ $(ICONV_CFLAGS)
+
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisync/sync.c pilot-link-0.12.5/libpisync/sync.c
+--- pilot-link-0.12.5-old/libpisync/sync.c 2006-08-06 17:55:57.000000000 +0200
++++ pilot-link-0.12.5/libpisync/sync.c 2011-12-07 21:09:46.536334579 +0100
+@@ -330,7 +330,7 @@ static int open_db(SyncHandler * sh, int
+ {
+ if (sh->secret)
+ return dlp_OpenDB(sh->sd, 0, dlpOpenReadWrite
+- && dlpOpenSecret, sh->name, dbhandle);
++ | dlpOpenSecret, sh->name, dbhandle);
+ else
+ return dlp_OpenDB(sh->sd, 0, dlpOpenReadWrite, sh->name,
+ dbhandle);
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/libpisync/util.c pilot-link-0.12.5/libpisync/util.c
+--- pilot-link-0.12.5-old/libpisync/util.c 2006-08-25 14:33:25.000000000 +0200
++++ pilot-link-0.12.5/libpisync/util.c 2011-12-07 21:25:04.906262096 +0100
+@@ -60,7 +60,7 @@
+ *
+ ***********************************************************************/
+ int
+-convert_ToPilotChar(const char *charset, const char *text,
++convert_ToPilotChar(const char *charset, char *text,
+ int bytes, char **ptext)
+ {
+ #ifdef HAVE_ICONV
+@@ -100,7 +100,7 @@ convert_ToPilotChar(const char *charset,
+ *
+ ***********************************************************************/
+ int
+-convert_ToPilotChar_WithCharset(const char *charset, const char *text,
++convert_ToPilotChar_WithCharset(const char *charset, char *text,
+ int bytes, char **ptext, const char * pi_charset)
+ {
+ #ifdef HAVE_ICONV
+@@ -155,7 +155,7 @@ convert_ToPilotChar_WithCharset(const ch
+ *
+ ***********************************************************************/
+ int
+-convert_FromPilotChar(const char *charset, const char *ptext,
++convert_FromPilotChar(const char *charset, char *ptext,
+ int bytes, char **text)
+ {
+ #ifdef HAVE_ICONV
+@@ -191,7 +191,7 @@ convert_FromPilotChar(const char *charse
+ *
+ ***********************************************************************/
+ int
+-convert_FromPilotChar_WithCharset(const char *charset, const char *ptext,
++convert_FromPilotChar_WithCharset(const char *charset, char *ptext,
+ int bytes, char **text, const char * pi_charset)
+ {
+ #ifdef HAVE_ICONV
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/popt/popt.c pilot-link-0.12.5/popt/popt.c
+--- pilot-link-0.12.5-old/popt/popt.c 2004-08-27 18:27:48.000000000 +0200
++++ pilot-link-0.12.5/popt/popt.c 2012-01-04 19:47:06.517804911 +0100
+@@ -367,7 +367,6 @@ static int execCommand(poptContext con)
+ poptItem item = con->doExec;
+ const char ** argv;
+ int argc = 0;
+- int rc;
+
+ if (item == NULL) /*XXX can't happen*/
+ return POPT_ERROR_NOARG;
+@@ -411,8 +410,7 @@ static int execCommand(poptContext con)
+ argv[argc] = NULL;
+
+ #ifdef __hpux
+- rc = setresuid(getuid(), getuid(),-1);
+- if (rc) return POPT_ERROR_ERRNO;
++ if (setresuid(getuid(), getuid(),-1)) return POPT_ERROR_ERRNO;
+ #else
+ /*
+ * XXX " ... on BSD systems setuid() should be preferred over setreuid()"
+@@ -420,11 +418,10 @@ static int execCommand(poptContext con)
+ * XXX from Norbert Warmuth <nwarmuth@privat.circular.de>
+ */
+ #if defined(HAVE_SETUID)
+- rc = setuid(getuid());
+- if (rc) return POPT_ERROR_ERRNO;
++ if (setuid(getuid())) return POPT_ERROR_ERRNO;
+ #elif defined (HAVE_SETREUID)
+- rc = setreuid(getuid(), getuid()); /*hlauer: not portable to hpux9.01 */
+- if (rc) return POPT_ERROR_ERRNO;
++ /*hlauer: not portable to hpux9.01 */
++ if (setreuid(getuid(), getuid())) return POPT_ERROR_ERRNO;
+ #else
+ ; /* Can't drop privileges */
+ #endif
+@@ -443,7 +440,7 @@ if (_popt_debug)
+ }
+ #endif
+
+- rc = execvp(argv[0], (char *const *)argv);
++ execvp(argv[0], (char *const *)argv);
+
+ return POPT_ERROR_ERRNO;
+ }
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/Makefile.am pilot-link-0.12.5/src/Makefile.am
+--- pilot-link-0.12.5-old/src/Makefile.am 2007-11-12 15:52:14.000000000 +0100
++++ pilot-link-0.12.5/src/Makefile.am 2011-12-16 17:42:55.878155194 +0100
+@@ -72,6 +72,8 @@ libpiuserland_la_SOURCES = \
+ userland.c
+ libpiuserland_la_LDFLAGS = \
+ -static
++libpiuserland_la_LIBADD = \
++ $(POPT_LIBS)
+
+ #getrom_SOURCES = \
+ # getrom.c
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/Makefile.in pilot-link-0.12.5/src/Makefile.in
+--- pilot-link-0.12.5-old/src/Makefile.in 2012-01-04 17:53:04.645595287 +0100
++++ pilot-link-0.12.5/src/Makefile.in 2012-01-04 22:52:56.694867357 +0100
+@@ -87,7 +87,9 @@ CONFIG_HEADER = $(top_builddir)/config.h
+ CONFIG_CLEAN_FILES =
+ CONFIG_CLEAN_VPATH_FILES =
+ LTLIBRARIES = $(noinst_LTLIBRARIES)
+-libpiuserland_la_LIBADD =
++am__DEPENDENCIES_1 =
++@ENABLE_CONDUITS_TRUE@libpiuserland_la_DEPENDENCIES = \
++@ENABLE_CONDUITS_TRUE@ $(am__DEPENDENCIES_1)
+ am__libpiuserland_la_SOURCES_DIST = plu_args.c userland.c
+ @ENABLE_CONDUITS_TRUE@am_libpiuserland_la_OBJECTS = plu_args.lo \
+ @ENABLE_CONDUITS_TRUE@ userland.lo
+@@ -102,7 +104,6 @@ am__pilot_addresses_SOURCES_DIST = pilot
+ @ENABLE_CONDUITS_TRUE@am_pilot_addresses_OBJECTS = \
+ @ENABLE_CONDUITS_TRUE@ pilot-addresses.$(OBJEXT)
+ pilot_addresses_OBJECTS = $(am_pilot_addresses_OBJECTS)
+-am__DEPENDENCIES_1 =
+ @ENABLE_CONDUITS_TRUE@pilot_addresses_DEPENDENCIES = libpiuserland.la \
+ @ENABLE_CONDUITS_TRUE@ $(am__DEPENDENCIES_1) \
+ @ENABLE_CONDUITS_TRUE@ $(top_builddir)/libpisock/libpisock.la
+@@ -689,6 +690,9 @@ SUBDIRS = prc pix
+ @ENABLE_CONDUITS_TRUE@libpiuserland_la_LDFLAGS = \
+ @ENABLE_CONDUITS_TRUE@ -static
+
++@ENABLE_CONDUITS_TRUE@libpiuserland_la_LIBADD = \
++@ENABLE_CONDUITS_TRUE@ $(POPT_LIBS)
++
+
+ #getrom_SOURCES = \
+ # getrom.c
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-addresses.c pilot-link-0.12.5/src/pilot-addresses.c
+--- pilot-link-0.12.5-old/src/pilot-addresses.c 2009-06-04 15:32:30.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-addresses.c 2011-12-21 16:08:30.778052438 +0100
+@@ -613,7 +613,8 @@ int main(int argc, const char *argv[]) {
+ int c, /* switch */
+ db,
+ l,
+- sd = -1;
++ sd = -1,
++ old_quiet = 0;
+
+ enum { mode_none, mode_read, mode_write, mode_delete_all, mode_delete }
+ run_mode = mode_none;
+@@ -744,7 +745,7 @@ int main(int argc, const char *argv[]) {
+ " tool. The data format of the AddressBook has changed. The legacy format\n"
+ " is called \"Classic\" and PalmOS 5.x and later uses \"Extended\" databases\n"
+ " with a different structure. Your Palm has \"Contacts\", and this tool reads\n"
+- " the \"AddressBook\" database. (Found OS version: %x)\n\n"
++ " the \"AddressBook\" database. (Found OS version: %lu)\n\n"
+
+ " Due to this change, pilot-addresses and other tools must be rewritten to\n"
+ " compensate. Sorry about the inconvenience.\n\n", info.romVersion);
+@@ -775,7 +776,6 @@ int main(int argc, const char *argv[]) {
+ switch(run_mode) {
+ FILE *f;
+ int i;
+- int old_quiet;
+ case mode_none:
+ /* impossible */
+ fprintf(stderr,"%s",mode_error);
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-clip.c pilot-link-0.12.5/src/pilot-clip.c
+--- pilot-link-0.12.5-old/src/pilot-clip.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-clip.c 2011-12-20 17:46:26.422661747 +0100
+@@ -189,7 +189,9 @@ int main(int argc, const char *argv[])
+ if (b == NULL)
+ goto error_close;
+ if (ret > 0)
+- write(fileno(stdout), b, ret);
++ if (write(fileno(stdout), b, ret) < 0) {
++ goto error_close;
++ }
+ }
+
+ if (pi_close(sd) < 0)
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-csd.c pilot-link-0.12.5/src/pilot-csd.c
+--- pilot-link-0.12.5-old/src/pilot-csd.c 2009-06-04 15:32:31.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-csd.c 2011-12-19 14:45:25.245377872 +0100
+@@ -383,7 +383,7 @@ int main(int argc, const char *argv[])
+
+ if ((get_byte(mesg + 2) == 0x01) && (n > 12)) {
+ struct in_addr ip, mask;
+- char *name = mesg + 12;
++ char *name = (char *)mesg + 12;
+
+ memcpy(&ip, mesg + 4, 4);
+ memcpy(&mask, mesg + 8, 4);
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-debug.c pilot-link-0.12.5/src/pilot-debug.c
+--- pilot-link-0.12.5-old/src/pilot-debug.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-debug.c 2011-12-13 18:20:08.241744455 +0100
+@@ -253,7 +253,7 @@ Read_Pilot(ClientData clientData, int ma
+ return;
+
+ /* puts("From Palm:");
+- pi_dumpdata((unsigned char *)buf, l); */
++ pi_dumpdata(buf, l); */
+
+ if (buf[2] == 0) { /* SysPkt command */
+ if (buf[0] == 2) { /* UI */
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-dlpsh.c pilot-link-0.12.5/src/pilot-dlpsh.c
+--- pilot-link-0.12.5-old/src/pilot-dlpsh.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-dlpsh.c 2012-01-04 20:04:15.478831743 +0100
+@@ -378,7 +378,6 @@ int rm_fn(int sd, int argc, const char *
+ ***********************************************************************/
+ int time_fn(int sd, int argc, const char *argv[])
+ {
+- int s;
+ time_t ltime;
+ struct tm *tm_ptr;
+ struct timeval tv;
+@@ -389,11 +388,11 @@ int time_fn(int sd, int argc, const char
+
+ strftime(timebuf, 80, "Now setting Palm time from desktop to: "
+ "%a %b %d %H:%M:%S %Z %Y\n", tm_ptr);
+- printf(timebuf);
++ printf("%s", timebuf);
+ gettimeofday(&tv, 0);
+ ltime = tv.tv_sec + 1;
+ usleep(1000000 - tv.tv_usec);
+- s = dlp_SetSysDateTime(sd, ltime);
++ dlp_SetSysDateTime(sd, ltime);
+
+ return 0;
+ }
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-file.c pilot-link-0.12.5/src/pilot-file.c
+--- pilot-link-0.12.5-old/src/pilot-file.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-file.c 2011-12-20 18:05:28.584045279 +0100
+@@ -243,9 +243,12 @@ static void list_records(struct pi_file
+ sprintf(name, "%4s%04x.bin",
+ printlong(type), id_);
+ fp = fopen(name, "w");
+- fwrite(buf, size, 1, fp);
++ if (fwrite(buf, size, 1, fp) == 1) {
++ printf("(written to %s)\n", name);
++ } else {
++ printf("(failed to write to %s)\n", name);
++ }
+ fclose(fp);
+- printf("(written to %s)\n", name);
+ }
+ }
+ }
+@@ -326,9 +329,12 @@ static void dump_record(struct pi_file *
+
+ sprintf(name, "%4s%04x.bin", printlong(type), id_);
+ fp = fopen(name, "w");
+- fwrite(buf, size, 1, fp);
++ if (fwrite(buf, size, 1, fp) == 1) {
++ printf("(written to %s)\n", name);
++ } else {
++ printf("(failed to write to %s)\n", name);
++ }
+ fclose(fp);
+- printf("(written to %s)\n", name);
+ }
+ } else {
+ printf("entries\n");
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-foto.c pilot-link-0.12.5/src/pilot-foto.c
+--- pilot-link-0.12.5-old/src/pilot-foto.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-foto.c 2011-12-20 18:49:18.859925180 +0100
+@@ -85,9 +85,15 @@ int get_jpg_info(FILE * in, char *type,
+ rewind(in);
+
+ /* marker identifier, application use marker */
+- fread(&word, 2, 1, in);
++ if (fread(&word, 2, 1, in) != 1) {
++ rewind(in);
++ return -1;
++ }
+ word1 = htons(word);
+- fread(&word, 2, 1, in);
++ if (fread(&word, 2, 1, in) != 1) {
++ rewind(in);
++ return -1;
++ }
+ word2 = htons(word);
+ /* printf("start of image 0x%02x 0x%02x\n", str[0], str[1]); */
+ /* printf("application use marker 0x%02x 0x%02x\n", str[2], str[3]); */
+@@ -101,7 +107,10 @@ int get_jpg_info(FILE * in, char *type,
+
+ *height = *width = -1;
+ /* length of application block */
+- fread(&word, 2, 1, in);
++ if (fread(&word, 2, 1, in) != 1) {
++ rewind(in);
++ return -1;
++ }
+ len = htons(word);
+ /* printf("len %d\n", len); */
+ if (len > 65535) {
+@@ -110,7 +119,10 @@ int get_jpg_info(FILE * in, char *type,
+ return -1;
+ }
+
+- fread(str, 5, 1, in);
++ if (fread(str, 5, 1, in) != 1) {
++ rewind(in);
++ return -1;
++ }
+ str[6] = '\0';
+ /* printf("%s\n", str); */
+ if (strncmp(str, "JFIF", 4) && strncmp(str, "Exif", 4)
+@@ -123,18 +135,27 @@ int get_jpg_info(FILE * in, char *type,
+ type[4] = '\0';
+
+ /* Version */
+- fread(&word, 2, 1, in);
++ if (fread(&word, 2, 1, in) != 1) {
++ rewind(in);
++ return -1;
++ }
+ *version = htons(word);
+ /* printf("version %d.%02d\n", ((*version)&0xFF00)>>8, (*version)&0xFF); */
+
+- fread(str, len - 9, 1, in);
++ if (fread(str, len - 9, 1, in) != 1) {
++ rewind(in);
++ return -1;
++ }
+ /* Units 1 byte
+ * X and Y density, 1 byte each
+ * X and Y thumbnail size, 2 bytes each
+ */
+ while (!feof(in)) {
+ /* marker identifier */
+- fread(&word, 2, 1, in);
++ if (fread(&word, 2, 1, in) != 1) {
++ rewind(in);
++ return -1;
++ }
+ word1 = htons(word);
+ m1 = (word1 & 0xFF00) >> 8;
+ m2 = word1 & 0xFF;
+@@ -143,18 +164,30 @@ int get_jpg_info(FILE * in, char *type,
+ if ((m1 == 0xFF) && (m2 == 0xC0)) {
+ /* The SOF0 marker (Start of Frame 0) */
+ /* length(2 bytes) and data precision(1 byte) */
+- fread(str, 3, 1, in);
++ if (fread(str, 3, 1, in) != 1) {
++ rewind(in);
++ return -1;
++ }
+ /* Height */
+- fread(&word, 2, 1, in);
++ if (fread(&word, 2, 1, in) != 1) {
++ rewind(in);
++ return -1;
++ }
+ *height = htons(word);
+ /* printf("height %d\n", *height); */
+ /* Width */
+- fread(&word, 2, 1, in);
++ if (fread(&word, 2, 1, in) != 1) {
++ rewind(in);
++ return -1;
++ }
+ *width = htons(word);
+ /* printf("width %d\n", *width); */
+ break;
+ }
+- fread(&word, 2, 1, in);
++ if (fread(&word, 2, 1, in) != 1) {
++ rewind(in);
++ return -1;
++ }
+ len = htons(word);
+ /* printf("len %d\n", len); */
+ if (len > 65535) {
+@@ -162,7 +195,10 @@ int get_jpg_info(FILE * in, char *type,
+ rewind(in);
+ return -1;
+ }
+- fread(str, len - 2, 1, in);
++ if (fread(str, len - 2, 1, in) != 1) {
++ rewind(in);
++ return -1;
++ }
+ }
+
+ rewind(in);
+@@ -432,7 +468,9 @@ int do_fetch(int sd, const char **fetch_
+ &attr, &category);
+ index++;
+ if (ret > 0 && buffer->used > 8)
+- fwrite(buffer->data + 8, buffer->used - 8, 1, out);
++ if (fwrite(buffer->data + 8, buffer->used - 8, 1, out) != 1) {
++ fprintf(stderr, "Failed, unable to write data.\n");
++ }
+ } while (ret > 0);
+
+ dlp_CloseDB(sd, db);
+@@ -691,7 +729,7 @@ int pdb_to_jpg(const char *filename)
+ int ret;
+ void *Pbuf;
+ size_t size;
+- int total_size;
++ int total_size, actual_size;
+ int attr;
+ int cat;
+ recordid_t uid;
+@@ -712,19 +750,24 @@ int pdb_to_jpg(const char *filename)
+
+ index = 0;
+ total_size = 0;
++ actual_size = 0;
+ ret = 1;
+ while (ret >= 0) {
+ ret = pi_file_read_record(pi_fp, index, &Pbuf, &size, &attr,
+ &cat, &uid);
+ index++;
+ if ((ret >= 0) && (size > 8)) {
+- fwrite(((char *) Pbuf) + 8, size - 8, 1, out);
+- total_size += size - 8;
++ total_size += size - 8;
++ if (fwrite(((char *) Pbuf) + 8, size - 8, 1, out) != 1) {
++ printf("FAILED: could not write data.\n");
++ continue;
++ }
++ actual_size += size - 8;
+ }
+ }
+ fclose(out);
+
+- printf("OK, wrote %d bytes to %s\n", total_size, info.name);
++ printf("OK, wrote %d of %d bytes to %s\n", actual_size, total_size, info.name);
+ return 0;
+ }
+
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-foto-treo600.c pilot-link-0.12.5/src/pilot-foto-treo600.c
+--- pilot-link-0.12.5-old/src/pilot-foto-treo600.c 2009-06-04 15:32:30.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-foto-treo600.c 2011-12-20 20:26:16.865031433 +0100
+@@ -82,12 +82,15 @@ int extract_image(struct pi_file *pi_fp,
+ if (pi_file_read_record
+ (pi_fp, i, &Pbuf, &size, &attr, &cat, &uid) < 0) {
+ fprintf(stderr," WARNING: Error reading image record %d\n\n", i);
++ close(fd);
+ return -1;
+ }
+
+ if (req_uid && uid == req_uid) {
+ memcpy(&req_uid, Pbuf, 4); /* get next req_uid for image 'block' */
+- write(fd, Pbuf + 4, size - 4); /* The rest is just jpeg data */
++ if (write(fd, Pbuf + 4, size - 4) < 0) { /* The rest is just jpeg data */
++ fprintf(stderr," WARNING: Error writing image data to %s\n", imgfilename);
++ }
+ }
+ }
+
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-foto-treo650.c pilot-link-0.12.5/src/pilot-foto-treo650.c
+--- pilot-link-0.12.5-old/src/pilot-foto-treo650.c 2009-06-04 15:32:30.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-foto-treo650.c 2012-01-04 22:12:18.456346583 +0100
+@@ -41,13 +41,11 @@
+ static int
+ pi_file_retrieve_VFS(const int fd, const int socket, FileRef file, const char *rpath )
+ {
+- int rpathlen = vfsMAXFILENAME;
+- long attributes;
+- pi_buffer_t *buffer;
+- ssize_t readsize,writesize;
+- int filesize;
+- int original_filesize;
+- int written_so_far;
++ unsigned long attributes;
++ pi_buffer_t *buffer;
++ ssize_t readsize,writesize;
++ int filesize;
++ int written_so_far;
+ pi_progress_t progress;
+
+ enum
+@@ -60,8 +58,6 @@ static int
+ internal_=-6
+ };
+
+- rpathlen=strlen(rpath);
+-
+ if (dlp_VFSFileGetAttributes(socket,file,&attributes) < 0)
+ {
+ fprintf(stderr," Could not get attributes of VFS file.\n");
+@@ -78,7 +74,6 @@ static int
+ }
+
+ dlp_VFSFileSize(socket,file,&filesize);
+- original_filesize = filesize;
+
+ memset(&progress, 0, sizeof(progress));
+ progress.type = PI_PROGRESS_RECEIVE_VFS;
+@@ -226,7 +221,7 @@ static void
+ }
+ else
+ {
+- if( index = rindex( infos[i].name, '.' ))
++ if(( index = rindex( infos[i].name, '.' )))
+ {
+ // printf( "index: %s %d strlen %d\n", infos[i].name, index, strlen( infos[i].name ) );
+ if(( index + 4 ) == (infos[i].name + strlen( infos[i].name )))
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-getrom.c pilot-link-0.12.5/src/pilot-getrom.c
+--- pilot-link-0.12.5-old/src/pilot-getrom.c 2009-06-04 15:32:31.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-getrom.c 2011-12-20 18:56:35.349427789 +0100
+@@ -176,7 +176,10 @@ int do_get_rom(int sd,const char *filena
+ if (j == len)
+ lseek(file, len, SEEK_CUR);
+ else
+- write(file, buffer, len);
++ if (write(file, buffer, len) < 0) {
++ printf("\n Failed to write to file!\n");
++ goto cancel;
++ }
+ offset += len;
+ if (cancel || !(i++ % 8))
+ if (cancel || (dlp_OpenConduit(sd) < 0)) {
+@@ -272,7 +275,7 @@ int do_get_ram(int sd, const char *filen
+ PackRPC(&p, 0xA026, RPC_IntReply, RPC_Ptr(print, 8),
+ RPC_Long(penPtr), RPC_Long(8), RPC_End);
+ /* err = */ dlp_RPC(sd, &p, 0);
+- pi_dumpdata(print, 8);
++ pi_dumpdata((unsigned char *)print, 8);
+ #endif
+
+ signal(SIGINT, sighandler);
+@@ -304,7 +307,10 @@ int do_get_ram(int sd, const char *filen
+ if (j == len)
+ lseek(file, len, SEEK_CUR);
+ else
+- write(file, buffer, len);
++ if (write(file, buffer, len) < 0) {
++ printf("\n Failed to write to file!\n");
++ goto cancel;
++ }
+
+ offset += len;
+ if (cancel || !(i++ % 4))
+@@ -414,27 +420,31 @@ int main(int argc, const char *argv[])
+ const char *opthelp = NULL;
+
+ /* These are optimized away compile-time */
+- if (DEFAULT_MODE == mode_getrom) {
+- progname = "pilot-getrom";
+- opthelp=
+- "[filename]\n\n"
+- " Retrieves the ROM image from your Palm device.\n\n";
+- } else if (DEFAULT_MODE == mode_gettoken) {
+- progname="pilot-getromtoken";
+- opthelp=
+- "\n\n"
+- " Reads a ROM token from a Palm Handheld device.\n"
+- " Tokens you may currently extract are:\n"
+- " adcc: Entropy for internal A->D convertor calibration\n"
+- " irda: Present only on memory card w/IrDA support\n"
+- " snum: Device serial number (from Memory Card Flash ID)\n\n"
+- " Example arguments:\n"
+- " -p /dev/pilot -t snum\n\n";
+- } else if (DEFAULT_MODE == mode_getram) {
+- progname="pilot-getram";
+- opthelp=
+- "[filename]\n\n"
+- " Retrieves the RAM image from your Palm device\n\n";
++ switch (DEFAULT_MODE) {
++ case mode_getrom:
++ progname = "pilot-getrom";
++ opthelp=
++ "[filename]\n\n"
++ " Retrieves the ROM image from your Palm device.\n\n";
++ break;
++ case mode_gettoken:
++ progname="pilot-getromtoken";
++ opthelp=
++ "\n\n"
++ " Reads a ROM token from a Palm Handheld device.\n"
++ " Tokens you may currently extract are:\n"
++ " adcc: Entropy for internal A->D convertor calibration\n"
++ " irda: Present only on memory card w/IrDA support\n"
++ " snum: Device serial number (from Memory Card Flash ID)\n\n"
++ " Example arguments:\n"
++ " -p /dev/pilot -t snum\n\n";
++ break;
++ case mode_getram:
++ progname="pilot-getram";
++ opthelp=
++ "[filename]\n\n"
++ " Retrieves the RAM image from your Palm device\n\n";
++ break;
+ }
+
+ if (!progname) {
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-hinotes.c pilot-link-0.12.5/src/pilot-hinotes.c
+--- pilot-link-0.12.5-old/src/pilot-hinotes.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-hinotes.c 2012-01-04 20:08:29.926499751 +0100
+@@ -51,13 +51,11 @@ void write_memo_mbox(struct PilotUser Us
+
+ time_t ltime;
+ struct tm *tm_ptr;
+- char c,
+- fromtmbuf[80],
+- recvtmbuf[80];
++ char fromtmbuf[80],
++ recvtmbuf[80];
+
+ time(&ltime);
+ tm_ptr = localtime(&ltime);
+- c = *asctime(tm_ptr);
+
+ strftime(fromtmbuf, 80, "%a, %d %b %H:%M:%S %Y (%Z)\n", tm_ptr);
+ strftime(recvtmbuf, 80, "%d %b %H:%M:%S %Y\n", tm_ptr);
+@@ -80,7 +78,7 @@ void write_memo_mbox(struct PilotUser Us
+ else
+ printf("\n");
+ printf("\n");
+- printf(m.text);
++ printf("%s", m.text);
+ printf("\n");
+ }
+
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-install-datebook.c pilot-link-0.12.5/src/pilot-install-datebook.c
+--- pilot-link-0.12.5-old/src/pilot-install-datebook.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-install-datebook.c 2011-12-20 19:00:42.654177819 +0100
+@@ -106,7 +106,11 @@ int main(int argc, const char *argv[])
+ return 1;
+ }
+
+- fread(file_text, filelen, 1, f);
++ if (fread(file_text, filelen, 1, f) != 1) {
++ fprintf(stderr," ERROR: Failed to read the %s file.\n", filename);
++ fclose(f);
++ return 1;
++ }
+ fclose(f);
+ f = NULL;
+
+@@ -252,13 +256,13 @@ int main(int argc, const char *argv[])
+ dlp_WriteUserInfo(sd, &User);
+
+ if (dlp_AddSyncLogEntry(sd, "Successfully wrote Appointment to Palm.\n"
+- "Thank you for using pilot-link.\n") < 0);
++ "Thank you for using pilot-link.\n") < 0)
+ goto error_close;
+
+- if(dlp_EndOfSync(sd, 0) < 0);
++ if (dlp_EndOfSync(sd, 0) < 0)
+ goto error_close;
+
+- if(pi_close(sd) < 0)
++ if (pi_close(sd) < 0)
+ goto error;
+
+ error_close:
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-install-expenses.c pilot-link-0.12.5/src/pilot-install-expenses.c
+--- pilot-link-0.12.5-old/src/pilot-install-expenses.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-install-expenses.c 2011-12-19 16:05:49.391042875 +0100
+@@ -45,8 +45,8 @@ int main(int argc, const char *argv[])
+ size_t size;
+ int found;
+
+- unsigned char buf[0xffff];
+- unsigned char *b;
++ char buf[0xffff];
++ char *b;
+ pi_buffer_t *appblock;
+
+ struct PilotUser User;
+@@ -214,8 +214,7 @@ int main(int argc, const char *argv[])
+ b += strlen(theExpense.note) + 1;
+
+ size = b - buf;
+- dlp_WriteRecord(sd, (unsigned char)db, 0, 0, category,
+- (unsigned char *)buf, size, 0);
++ dlp_WriteRecord(sd, db, 0, 0, category, buf, size, 0);
+
+ /* Close the database */
+ dlp_CloseDB(sd, db);
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-install-hinote.c pilot-link-0.12.5/src/pilot-install-hinote.c
+--- pilot-link-0.12.5-old/src/pilot-install-hinote.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-install-hinote.c 2011-12-20 19:05:05.836653456 +0100
+@@ -164,7 +164,11 @@ int main(int argc, const char *argv[])
+ strcpy(file_text, file_arg);
+ file_text[filenamelen] = '\n';
+
+- fread(file_text + filenamelen + 1, filelen, 1, f);
++ if (fread(file_text + filenamelen + 1, filelen, 1, f) != 1) {
++ fprintf(stderr," WARNING: Failed to read from file.\n");
++ file_text[filenamelen + 1] = '\0';
++ continue;
++ }
+ file_text[filenamelen + 1 + filelen] = '\0';
+
+
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-install-memo.c pilot-link-0.12.5/src/pilot-install-memo.c
+--- pilot-link-0.12.5-old/src/pilot-install-memo.c 2009-06-04 15:32:32.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-install-memo.c 2011-12-20 19:26:49.803270983 +0100
+@@ -89,7 +89,6 @@ int install_memo(int sd, int db, int cat
+ {
+ struct stat sbuf;
+ FILE *f = NULL;
+- char *tmp = NULL;
+ char *memo_buf = NULL;
+ int memo_size, preamble;
+
+@@ -125,7 +124,11 @@ int install_memo(int sd, int db, int cat
+ filename, strerror(errno));
+ return 1;
+ }
+- fread(memo_buf + preamble, memo_size, 1, f);
++ if (fread(memo_buf + preamble, memo_size, 1, f) != 1) {
++ fprintf(stderr," ERROR: Unable to read from %s\n\n", filename);
++ fclose(f);
++ return 1;
++ }
+ fclose(f);
+
+ dlp_WriteRecord(sd, db, 0, 0, category, memo_buf, -1, 0);
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-install-todo.c pilot-link-0.12.5/src/pilot-install-todo.c
+--- pilot-link-0.12.5-old/src/pilot-install-todo.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-install-todo.c 2011-12-20 19:36:06.838721596 +0100
+@@ -76,7 +76,13 @@ int read_file(char *filename, char **tex
+ return -1;
+ }
+
+- fread(*text, filelen, 1, f);
++ if (fread(*text, filelen, 1, f) != 1) {
++ fprintf(stderr," ERROR: Could not read the file %s.\n", filename);
++ fclose(f);
++ return -1;
++ }
++
++ fclose(f);
+
+ return 0;
+ }
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-install-todos.c pilot-link-0.12.5/src/pilot-install-todos.c
+--- pilot-link-0.12.5-old/src/pilot-install-todos.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-install-todos.c 2011-12-20 19:38:49.488931153 +0100
+@@ -63,7 +63,13 @@ void install_ToDos(int sd, int db, char
+ exit(EXIT_FAILURE);
+ }
+
+- fread(file_text, filelen, 1, f);
++ if (fread(file_text, filelen, 1, f) != 1) {
++ fprintf(stderr," ERROR: Failed to read from file %s.\n", filename);
++ fclose(f);
++ exit(EXIT_FAILURE);
++ }
++
++ fclose(f);
+
+ cPtr = file_text;
+ begPtr = cPtr;
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-memos.c pilot-link-0.12.5/src/pilot-memos.c
+--- pilot-link-0.12.5-old/src/pilot-memos.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-memos.c 2011-12-21 16:46:00.842502232 +0100
+@@ -113,27 +113,27 @@ write_memo_in_directory(char *dirname, s
+ mkdir(dirname, 0700);
+
+ /* Create a directory for the category */
+- strncat(pathbuffer, dirname, MAXDIRNAMELEN);
+- strncat(pathbuffer, "/", 1);
++ strncat(pathbuffer, dirname, sizeof(pathbuffer) - strlen(pathbuffer) - 1);
++ strncat(pathbuffer, "/", sizeof(pathbuffer) - strlen(pathbuffer) - 1);
+
+ /* Should make sure category doesn't have slashes in it */
+- strncat(pathbuffer, mai.category.name[category], 60);
++ strncat(pathbuffer, mai.category.name[category], sizeof(pathbuffer) - strlen(pathbuffer) - 1);
+
+ /* Should check if pathbuffer exists and is a directory */
+ mkdir(pathbuffer, 0700);
+
+ /* Should check if there were problems creating directory */
+ /* open the actual file to write */
+- strncat(pathbuffer, "/", 1);
++ strncat(pathbuffer, "/", sizeof(pathbuffer) - strlen(pathbuffer) - 1);
+ for (j = 0; j < 40; j++) {
+ if ((!m.text[j]) || (m.text[j] == '\n'))
+ break;
+ if (m.text[j] == '/') {
+- strncat(pathbuffer, "=2F", 3);
++ strncat(pathbuffer, "=2F", sizeof(pathbuffer) - strlen(pathbuffer) - 1);
+ continue;
+ }
+ if (m.text[j] == '=') {
+- strncat(pathbuffer, "=3D", 3);
++ strncat(pathbuffer, "=3D", sizeof(pathbuffer) - strlen(pathbuffer) - 1);
+ continue;
+ }
+ #ifdef OS2
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-port.c pilot-link-0.12.5/src/pilot-port.c
+--- pilot-link-0.12.5-old/src/pilot-port.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-port.c 2011-12-12 16:11:16.697469186 +0100
+@@ -41,7 +41,7 @@
+ #include "pi-userland.h"
+
+
+-void do_read(struct pi_socket *ps, int type, char *buffer, int length);
++void do_read(struct pi_socket *ps, int type, unsigned char *buffer, int length);
+
+ /***********************************************************************
+ *
+@@ -54,7 +54,7 @@ void do_read(struct pi_socket *ps, int t
+ * Returns: Nothing
+ *
+ ***********************************************************************/
+-void do_read(struct pi_socket *ps, int type, char *buffer, int length)
++void do_read(struct pi_socket *ps, int type, unsigned char *buffer, int length)
+ {
+ int len;
+
+@@ -92,8 +92,8 @@ int main(int argc, char *argv[])
+ struct pi_socket *ps;
+ struct sockaddr_in serv_addr;
+
+- char *buffer,
+- *slpbuffer;
++ char *slpbuffer;
++ unsigned char *buffer;
+
+ poptContext pc;
+
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-read-expenses.c pilot-link-0.12.5/src/pilot-read-expenses.c
+--- pilot-link-0.12.5-old/src/pilot-read-expenses.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-read-expenses.c 2011-12-13 18:24:19.844407496 +0100
+@@ -41,8 +41,8 @@ int main(int argc, const char *argv[])
+ sd = -1;
+ enum { mode_none, mode_write = 257 } run_mode = mode_none;
+
+- char buffer[0xffff];
+- char buffer2[0xffff];
++ unsigned char buffer[0xffff];
++ unsigned char buffer2[0xffff];
+ pi_buffer_t *recbuf,
+ *appblock;
+
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-read-notepad.c pilot-link-0.12.5/src/pilot-read-notepad.c
+--- pilot-link-0.12.5-old/src/pilot-read-notepad.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-read-notepad.c 2012-01-04 21:20:20.727758321 +0100
+@@ -39,7 +39,7 @@
+
+ #ifdef HAVE_PNG
+ #include "png.h"
+-#if (PNG_LIBPNG_VER < 10201)
++#if (PNG_LIBPNG_VER < 10201 || PNG_LIBPNG_VER >= 10400)
+ #define png_voidp_NULL (png_voidp)NULL
+ #define png_error_ptr_NULL (png_error_ptr)NULL
+ #endif
+@@ -115,10 +115,15 @@ void write_ppm( FILE *f, struct NotePad
+
+ for( k=0; k<8; k++ )
+ {
+- if( n->data[i].data & 1<<(7-k) )
+- fwrite( &black, 3, 1, f );
+- else
+- fwrite( &white, 3, 1, f );
++ if( n->data[i].data & 1<<(7-k) ) {
++ if (fwrite( &black, 3, 1, f ) != 1) {
++ fprintf(stderr," WARNING: Failed to write.\n");
++ }
++ } else {
++ if (fwrite( &white, 3, 1, f ) != 1) {
++ fprintf(stderr," WARNING: Failed to write.\n");
++ }
++ }
+ }
+ }
+ }
+@@ -127,17 +132,27 @@ void write_ppm( FILE *f, struct NotePad
+ {
+ for( k=0; k<8; k++ )
+ {
+- if( n->data[i].repeat & 1<<(7-k) )
+- fwrite( &black, 3, 1, f );
+- else
+- fwrite( &white, 3, 1, f );
++ if( n->data[i].repeat & 1<<(7-k) ) {
++ if (fwrite( &black, 3, 1, f ) != 1) {
++ fprintf(stderr," WARNING: Failed to write.\n");
++ }
++ } else {
++ if (fwrite( &white, 3, 1, f ) != 1) {
++ fprintf(stderr," WARNING: Failed to write.\n");
++ }
++ }
+ }
+ for( k=0; k<8; k++ )
+ {
+- if( n->data[i].data & 1<<(7-k) )
+- fwrite( &black, 3, 1, f );
+- else
+- fwrite( &white, 3, 1, f );
++ if( n->data[i].data & 1<<(7-k) ) {
++ if (fwrite( &black, 3, 1, f ) != 1) {
++ fprintf(stderr," WARNING: Failed to write.\n");
++ }
++ } else {
++ if (fwrite( &white, 3, 1, f ) != 1) {
++ fprintf(stderr," WARNING: Failed to write.\n");
++ }
++ }
+ }
+ }
+
+@@ -257,7 +272,9 @@ void write_png_v2( FILE *f, struct NoteP
+ return;
+ }
+
+- fwrite( n->data, n->body.dataLen, 1, f );
++ if (fwrite( n->data, n->body.dataLen, 1, f ) != 1) {
++ fprintf(stderr, "Failed to write.");
++ }
+ fflush( f );
+ }
+
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-read-palmpix.c pilot-link-0.12.5/src/pilot-read-palmpix.c
+--- pilot-link-0.12.5-old/src/pilot-read-palmpix.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-read-palmpix.c 2012-01-04 21:20:45.604415083 +0100
+@@ -42,7 +42,7 @@
+
+ #ifdef HAVE_PNG
+ #include "png.h"
+-#if (PNG_LIBPNG_VER < 10201)
++#if (PNG_LIBPNG_VER < 10201 || PNG_LIBPNG_VER >= 10400)
+ #define png_voidp_NULL (png_voidp)NULL
+ #define png_error_ptr_NULL (png_error_ptr)NULL
+ #endif
+@@ -125,7 +125,7 @@ static int getrecord_pi_socket (struct P
+ void **buf, size_t *bufsize)
+ {
+
+- static char buffer[65536];
++ static unsigned char buffer[65536];
+ static pi_buffer_t fakebuf;
+
+ struct PalmPixState_pi_socket *state =
+@@ -199,7 +199,9 @@ void write_ppm (FILE *f, const struct Pa
+ fprintf (f, "P6\n# %s (taken at %s)\n%d %d\n255\n",
+ state->pixname, fmt_date (header), header->w, header->h);
+
+- fwrite (state->pixmap, header->w * header->h * 3, 1, f);
++ if (fwrite (state->pixmap, header->w * header->h * 3, 1, f) != 1) {
++ fprintf(stderr, "ERROR: Failed to write.\n");
++ }
+ }
+
+
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-read-screenshot.c pilot-link-0.12.5/src/pilot-read-screenshot.c
+--- pilot-link-0.12.5-old/src/pilot-read-screenshot.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-read-screenshot.c 2012-01-04 21:55:29.073067865 +0100
+@@ -40,7 +40,7 @@
+
+ #ifdef HAVE_PNG
+ # include "png.h"
+-# if (PNG_LIBPNG_VER < 10201)
++# if (PNG_LIBPNG_VER < 10201 || PNG_LIBPNG_VER >= 10400)
+ # define png_voidp_NULL (png_voidp)NULL
+ # define png_error_ptr_NULL (png_error_ptr)NULL
+ # endif
+@@ -77,7 +77,7 @@ struct ss_state {
+ #ifdef HAVE_PNG
+ void write_png ( char *fname, struct ss_state *state )
+ {
+- unsigned char *gray_buf;
++ unsigned char *gray_buf = 0;
+ int i, j;
+ png_structp png_ptr;
+ png_infop info_ptr;
+@@ -103,7 +103,6 @@ void write_png ( char *fname, struct ss_
+ if (setjmp (png_jmpbuf (png_ptr)))
+ {
+ png_destroy_write_struct (&png_ptr, &info_ptr);
+- fclose (f);
+ return;
+ }
+
+@@ -169,7 +168,9 @@ void write_ppm ( char *fname, struct ss_
+ fprintf (f, "255\n" );
+
+ for( i = 0; i < 3*state->h*state->w; i += 3 )
+- fwrite( &state->pix_map[i], 3, 1, f);
++ if (fwrite( &state->pix_map[i], 3, 1, f) != 1) {
++ fprintf(stderr, "Failed to write to %s\n", fname);
++ }
+
+ fclose( f );
+ }
+@@ -194,7 +195,7 @@ void WritePictures (int sd, int db, int
+ // unsigned char inBuf[61440], *pixelBuf;
+ pi_buffer_t *inBuf, *pixelBuf;
+ unsigned long clut[256], magic;
+- int attr, category, val, mask, j, k;
++ int attr, category, val, mask = 0, j, k;
+ struct ss_state state;
+
+ if( type == OUT_PPM )
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-read-todos.c pilot-link-0.12.5/src/pilot-read-todos.c
+--- pilot-link-0.12.5-old/src/pilot-read-todos.c 2009-06-04 15:32:32.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-read-todos.c 2011-12-19 16:14:28.191121790 +0100
+@@ -202,8 +202,8 @@ int main(int argc, const char *argv[])
+
+ for (i = 0;; i++) {
+ int attr,
+- category,
+- len;
++ category;
++ size_t len;
+
+ struct ToDo todo;
+
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-read-veo.c pilot-link-0.12.5/src/pilot-read-veo.c
+--- pilot-link-0.12.5-old/src/pilot-read-veo.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-read-veo.c 2012-01-04 22:08:08.269082847 +0100
+@@ -41,7 +41,7 @@
+
+ #ifdef HAVE_PNG
+ # include "png.h"
+-# if (PNG_LIBPNG_VER < 10201)
++# if (PNG_LIBPNG_VER < 10201 || PNG_LIBPNG_VER >= 10400)
+ # define png_voidp_NULL (png_voidp)NULL
+ # define png_error_ptr_NULL (png_error_ptr)NULL
+ # endif
+@@ -676,13 +676,12 @@ int ColourCorrect (struct Veo *v, uint8_
+ ***********************************************************************/
+ int Gen24bitRow (long flags, int r, struct Veo *v, unsigned char *row)
+ {
+- int i, rawW, rawH, modR = r % 4;
++ int i, rawW, modR = r % 4;
+
+ unsigned char rowA[2560], rowB[2560];
+ unsigned char *rAP, *rBP, *rCP;
+
+ rawW = v->width / 2;
+- rawH = v->height / 2;
+
+ if (r == 0)
+ {
+@@ -924,7 +923,9 @@ void write_ppm (FILE * f, struct Veo *v,
+ {
+ Gen24bitRow (flags, i, v, outBuf);
+
+- fwrite (outBuf, v->width * 3, 1, f);
++ if (fwrite (outBuf, v->width * 3, 1, f) != 1) {
++ fprintf(stderr, "WARNING: Failed to write.\n");
++ }
+ }
+ }
+
+@@ -944,7 +945,6 @@ void WritePicture (int sd, int db, int t
+ char fname[FILENAME_MAX];
+ FILE *f;
+ char extension[8];
+- static int len;
+ struct Veo v;
+ pi_buffer_t *inBuf;
+ int attr, category;
+@@ -971,8 +971,7 @@ void WritePicture (int sd, int db, int t
+ if (sd)
+ {
+ inBuf = pi_buffer_new (2560);
+- len =
+- dlp_ReadRecordByIndex (sd, db, 0, inBuf, 0, &attr, &category);
++ dlp_ReadRecordByIndex (sd, db, 0, inBuf, 0, &attr, &category);
+ unpack_Veo (&v, inBuf->data, inBuf->used);
+ pi_buffer_free (inBuf);
+ v.sd = sd;
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-wav.c pilot-link-0.12.5/src/pilot-wav.c
+--- pilot-link-0.12.5-old/src/pilot-wav.c 2009-06-04 15:26:19.000000000 +0200
++++ pilot-link-0.12.5/src/pilot-wav.c 2012-01-04 22:23:44.024691316 +0100
+@@ -107,31 +107,54 @@ long write_header(FILE * out)
+ wWaveLength = 0;
+
+ /* RIFF Header */
+- fwrite("RIFF", 4, 1, out);
+- fwrite(&wWaveLength, 4, 1, out);
+- fwrite("WAVE", 4, 1, out);
++ if (
++ fwrite("RIFF", 4, 1, out) != 1
++ || fwrite(&wWaveLength, 4, 1, out) != 1
++ || fwrite("WAVE", 4, 1, out) != 1
++ ) {
++ fprintf(stderr," WARNING: Error writing header of wave file.\n");
++ return 0;
++ }
+
+ /* Format Chunk */
+- fwrite(formatChunkID, 4, 1, out);
++ if (fwrite(formatChunkID, 4, 1, out) != 1) {
++ fprintf(stderr," WARNING: Error writing header of wave file.\n");
++ return 0;
++ }
+
+ /* Length of Format Chunk - 4 (fmt ) - 4 (length value itself) */
+- fwrite(&formatChunkSize, 4, 1, out);
+- fwrite(&wFormatTag, 2, 1, out);
+- fwrite(&wChannels, 2, 1, out);
+- fwrite(&dwSamplesPerSec, 4, 1, out);
+- fwrite(&dwAvgBytesPerSec, 4, 1, out);
+- fwrite(&wBlockAlign, 2, 1, out);
+- fwrite(&wBitsPerSample, 2, 1, out);
++ if (
++ fwrite(&formatChunkSize, 4, 1, out) != 1
++ || fwrite(&wFormatTag, 2, 1, out) != 1
++ || fwrite(&wChannels, 2, 1, out) != 1
++ || fwrite(&dwSamplesPerSec, 4, 1, out) != 1
++ || fwrite(&dwAvgBytesPerSec, 4, 1, out) != 1
++ || fwrite(&wBlockAlign, 2, 1, out) != 1
++ || fwrite(&wBitsPerSample, 2, 1, out) != 1
++ ) {
++ fprintf(stderr," WARNING: Error writing header of wave file.\n");
++ return 0;
++ }
+
+ /* Extended Format Chunk Fields */
+
+ /* Extended format block size including(it appears) cbSize itself */
+- fwrite(&cbSize, 2, 1, out);
+- fwrite(&wSamplesPerBlock, 2, 1, out);
++ if (
++ fwrite(&cbSize, 2, 1, out) != 1
++ || fwrite(&wSamplesPerBlock, 2, 1, out) != 1
++ ) {
++ fprintf(stderr," WARNING: Error writing header of wave file.\n");
++ return 0;
++ }
+
+ /* Data Chunk */
+- fwrite(dataChunkID, 4, 1, out);
+- fwrite(&dataChunkSize, 4, 1, out);
++ if (
++ fwrite(dataChunkID, 4, 1, out) != 1
++ || fwrite(&dataChunkSize, 4, 1, out) != 1
++ ) {
++ fprintf(stderr," WARNING: Error writing header of wave file.\n");
++ return 0;
++ }
+
+ return formatChunkSize;
+ }
+@@ -154,10 +177,16 @@ long write_header(FILE * out)
+ long write_data(char *buffer, int index, int size, long dataChunkSize, FILE *out)
+ {
+ if (index == 0) {
+- fwrite(buffer + 122, size - 122, 1, out);
++ if (fwrite(buffer + 122, size - 122, 1, out) != 1) {
++ fprintf(stderr," WARNING: Error writing data.\n");
++ return 0;
++ }
+ dataChunkSize += size - 122;
+ } else {
+- fwrite(buffer + 8, size - 8, 1, out);
++ if (fwrite(buffer + 8, size - 8, 1, out) != 1) {
++ fprintf(stderr," WARNING: Error writing data.\n");
++ return 0;
++ }
+ dataChunkSize += size - 8;
+ }
+ return dataChunkSize;
+@@ -254,15 +283,19 @@ int fetch_wavs(int sd, char *dbname)
+ PI_ARGS((sd, db, index, buffer, &id_,
+ &attr, &category));
+ if (ret > 0) {
+- dataChunkSize = write_data(buffer->data, index, buffer->used, dataChunkSize, out);
++ dataChunkSize = write_data((char *)buffer->data, index, buffer->used, dataChunkSize, out);
+ }
+ index++;
+ }
+ wWaveLength = 4 + 4 + 4 + formatChunkSize + 4 + 4 + dataChunkSize;
+ fseek(out, 44, SEEK_SET);
+- fwrite(&dataChunkSize, 4, 1, out);
++ if (fwrite(&dataChunkSize, 4, 1, out) != 1) {
++ fprintf(stderr," WARNING: Error writing data.\n");
++ }
+ fseek(out, 4, SEEK_SET);
+- fwrite(&wWaveLength, 4, 1, out);
++ if (fwrite(&wWaveLength, 4, 1, out) != 1) {
++ fprintf(stderr," WARNING: Error writing data.\n");
++ }
+ dlp_CloseDB(sd, db);
+ fclose(out);
+ if (!plu_quiet) {
+@@ -288,12 +321,11 @@ int fetch_wavs(int sd, char *dbname)
+ ***********************************************************************/
+ int do_fetch(char *dbname)
+ {
+- int sd = -1,
+- ret;
++ int sd = -1;
+
+ sd = plu_connect();
+
+- ret = fetch_wavs(sd, dbname);
++ fetch_wavs(sd, dbname);
+
+ dlp_EndOfSync(sd, dlpEndCodeNormal);
+ pi_close(sd);
+@@ -364,9 +396,13 @@ int pdb_to_wav(char *filename)
+ }
+ wWaveLength = 4 + 4 + 4 + formatChunkSize + 4 + 4 + dataChunkSize;
+ fseek(out, 44, SEEK_SET);
+- fwrite(&dataChunkSize, 4, 1, out);
++ if (fwrite(&dataChunkSize, 4, 1, out) != 1) {
++ fprintf(stderr," WARNING: Error writing data.\n");
++ }
+ fseek(out, 4, SEEK_SET);
+- fwrite(&wWaveLength, 4, 1, out);
++ if (fwrite(&wWaveLength, 4, 1, out) != 1) {
++ fprintf(stderr," WARNING: Error writing data.\n");
++ }
+ fclose(out);
+ pi_file_close(pi_fp);
+ if (!plu_quiet) {
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/src/pilot-xfer.c pilot-link-0.12.5/src/pilot-xfer.c
+--- pilot-link-0.12.5-old/src/pilot-xfer.c 2010-02-07 03:21:18.000000000 +0100
++++ pilot-link-0.12.5/src/pilot-xfer.c 2012-01-04 22:28:32.040166439 +0100
+@@ -713,7 +713,6 @@ pi_file_retrieve_VFS(const int fd, const
+ pi_buffer_t *buffer;
+ ssize_t readsize,writesize;
+ int filesize;
+- int original_filesize;
+ int written_so_far;
+ pi_progress_t progress;
+
+@@ -762,7 +761,6 @@ pi_file_retrieve_VFS(const int fd, const
+ }
+
+ dlp_VFSFileSize(socket,file,&filesize);
+- original_filesize = filesize;
+
+ memset(&progress, 0, sizeof(progress));
+ progress.type = PI_PROGRESS_RECEIVE_VFS;
+@@ -2478,7 +2476,7 @@ main(int argc, const char *argv[])
+ fprintf(stderr, " ERROR: '%s' is not a directory or does not exist.\n"
+ " Please supply a directory name when performing a "
+ "backup or restore and try again.\n\n", dirname);
+- fprintf(stderr,gracias);
++ fprintf(stderr, "%s", gracias);
+ return 1;
+ }
+ }
+@@ -2488,13 +2486,13 @@ main(int argc, const char *argv[])
+ if (rargc > 0)
+ {
+ fprintf(stderr," ERROR: Do not pass additional arguments to -busrlLC.\n");
+- fprintf(stderr,gracias);
++ fprintf(stderr, "%s", gracias);
+ return 1;
+ }
+ break;
+ case palm_op_noop:
+ fprintf(stderr," ERROR: Must specify one of -bursimfdlC.\n");
+- fprintf(stderr,gracias);
++ fprintf(stderr, "%s", gracias);
+ return 1;
+ break;
+ case palm_op_merge:
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/tests/calendardb-test.c pilot-link-0.12.5/tests/calendardb-test.c
+--- pilot-link-0.12.5-old/tests/calendardb-test.c 2010-02-07 03:21:18.000000000 +0100
++++ pilot-link-0.12.5/tests/calendardb-test.c 2012-01-13 16:04:45.000000000 +0100
+@@ -225,7 +225,7 @@ void parse(pi_file_t *pf)
+
+ if(pi_buf->used != test->used) {
+ int i;
+- printf("Error: Different record sizes unpack: %ld pack: %ld last byte unpack: 0x%02X pack: 0x%02X\n", pi_buf->used, test->used, pi_buf->data[pi_buf->used-1], test->data[test->used-1]);
++ printf("Error: Different record sizes unpack: %zd pack: %zd last byte unpack: 0x%02X pack: 0x%02X\n", pi_buf->used, test->used, pi_buf->data[pi_buf->used-1], test->data[test->used-1]);
+ for(i=0; i<pi_buf->used; ++i) {
+ if(pi_buf->data[i] != test->data[i]) {
+ printf("Error: Byte %d is different unpack: 0x%02X pack: 0x%02X\n", i, pi_buf->data[i], test->data[i]);
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/tests/contactsdb-test.c pilot-link-0.12.5/tests/contactsdb-test.c
+--- pilot-link-0.12.5-old/tests/contactsdb-test.c 2009-05-25 05:22:56.000000000 +0200
++++ pilot-link-0.12.5/tests/contactsdb-test.c 2011-12-14 17:30:21.000000000 +0100
+@@ -31,6 +31,7 @@
+ #include "pi-header.h"
+ #include "pi-appinfo.h"
+ #include "pi-contact.h"
++#include "pi-userland.h"
+
+ #undef PRINT_USELESS_INFO
+ #undef SAVE_PICTURES
+@@ -319,7 +320,7 @@ print_records (int sd, int db, struct Co
+ fclose (f);
+ }
+ #else
+- printf (" Picture : JPEG (%zu bytes)\n",
++ printf (" Picture : JPEG (%u bytes)\n",
+ c.picture->length);
+ #endif /* SAVE_PICTURES */
+ }
+@@ -345,7 +346,8 @@ main (const int argc, const char **argv)
+ return 1;
+ }
+
+- sd = pilot_connect (argv[1]);
++ setenv("PILOTPORT", argv[1], 1);
++ sd = plu_connect();
+
+ if (sd < 0)
+ goto error;
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/tests/locationdb-test.c pilot-link-0.12.5/tests/locationdb-test.c
+--- pilot-link-0.12.5-old/tests/locationdb-test.c 2009-02-22 09:09:02.000000000 +0100
++++ pilot-link-0.12.5/tests/locationdb-test.c 2012-01-13 16:05:12.000000000 +0100
+@@ -149,7 +149,7 @@ void parse(pi_file_t *pf)
+
+ if(pi_buf->used != test->used) {
+ int i;
+- printf("Error: Different record sizes unpack: %d pack: %d last byte unpack: 0x%02X pack: 0x%02X\n", pi_buf->used, test->used, pi_buf->data[pi_buf->used-1], test->data[test->used-1]);
++ printf("Error: Different record sizes unpack: %zu pack: %zu last byte unpack: 0x%02X pack: 0x%02X\n", pi_buf->used, test->used, pi_buf->data[pi_buf->used-1], test->data[test->used-1]);
+ for(i=0; i<pi_buf->used; ++i) {
+ if(pi_buf->data[i] != test->data[i]) {
+ printf("Error: Byte %d is different unpack: 0x%02X pack: 0x%02X\n", i, pi_buf->data[i], test->data[i]);
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/tests/Makefile.am pilot-link-0.12.5/tests/Makefile.am
+--- pilot-link-0.12.5-old/tests/Makefile.am 2009-05-25 06:32:06.000000000 +0200
++++ pilot-link-0.12.5/tests/Makefile.am 2011-12-19 13:21:52.692923303 +0100
+@@ -1,5 +1,4 @@
+ INCLUDES = \
+- -I../include \
+ -I$(top_srcdir)/include \
+ $(POPT_INCLUDES)
+
+@@ -24,7 +23,8 @@ locationdb_test_LDADD = \
+ contactsdb_test_SOURCES = \
+ contactsdb-test.c
+ contactsdb_test_LDADD = \
+- $(top_builddir)/libpisock/libpisock.la
++ $(top_builddir)/libpisock/libpisock.la \
++ $(top_builddir)/src/libpiuserland.la
+
+ dlp_test_SOURCES = \
+ dlp-test.c
+@@ -34,7 +34,8 @@ dlp_test_LDADD = \
+ vfs_test_SOURCES = \
+ vfs-test.c
+ vfs_test_LDADD = \
+- $(top_builddir)/libpisock/libpisock.la
++ $(top_builddir)/libpisock/libpisock.la \
++ $(top_builddir)/src/libpiuserland.la
+
+ versamail_test_SOURCES = \
+ versamail-test.c
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/tests/Makefile.in pilot-link-0.12.5/tests/Makefile.in
+--- pilot-link-0.12.5-old/tests/Makefile.in 2012-01-04 17:53:04.788589991 +0100
++++ pilot-link-0.12.5/tests/Makefile.in 2012-01-04 22:52:56.840844137 +0100
+@@ -63,7 +63,8 @@ calendardb_test_OBJECTS = $(am_calendard
+ calendardb_test_DEPENDENCIES = $(top_builddir)/libpisock/libpisock.la
+ am_contactsdb_test_OBJECTS = contactsdb-test.$(OBJEXT)
+ contactsdb_test_OBJECTS = $(am_contactsdb_test_OBJECTS)
+-contactsdb_test_DEPENDENCIES = $(top_builddir)/libpisock/libpisock.la
++contactsdb_test_DEPENDENCIES = $(top_builddir)/libpisock/libpisock.la \
++ $(top_builddir)/src/libpiuserland.la
+ am_dlp_test_OBJECTS = dlp-test.$(OBJEXT)
+ dlp_test_OBJECTS = $(am_dlp_test_OBJECTS)
+ dlp_test_DEPENDENCIES = $(top_builddir)/libpisock/libpisock.la
+@@ -78,7 +79,8 @@ versamail_test_OBJECTS = $(am_versamail_
+ versamail_test_DEPENDENCIES = $(top_builddir)/libpisock/libpisock.la
+ am_vfs_test_OBJECTS = vfs-test.$(OBJEXT)
+ vfs_test_OBJECTS = $(am_vfs_test_OBJECTS)
+-vfs_test_DEPENDENCIES = $(top_builddir)/libpisock/libpisock.la
++vfs_test_DEPENDENCIES = $(top_builddir)/libpisock/libpisock.la \
++ $(top_builddir)/src/libpiuserland.la
+ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/include
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+@@ -288,7 +290,6 @@ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ usb_libs = @usb_libs@
+ INCLUDES = \
+- -I../include \
+ -I$(top_srcdir)/include \
+ $(POPT_INCLUDES)
+
+@@ -308,7 +309,8 @@ contactsdb_test_SOURCES = \
+ contactsdb-test.c
+
+ contactsdb_test_LDADD = \
+- $(top_builddir)/libpisock/libpisock.la
++ $(top_builddir)/libpisock/libpisock.la \
++ $(top_builddir)/src/libpiuserland.la
+
+ dlp_test_SOURCES = \
+ dlp-test.c
+@@ -320,7 +322,8 @@ vfs_test_SOURCES = \
+ vfs-test.c
+
+ vfs_test_LDADD = \
+- $(top_builddir)/libpisock/libpisock.la
++ $(top_builddir)/libpisock/libpisock.la \
++ $(top_builddir)/src/libpiuserland.la
+
+ versamail_test_SOURCES = \
+ versamail-test.c
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/tests/packers.c pilot-link-0.12.5/tests/packers.c
+--- pilot-link-0.12.5-old/tests/packers.c 2005-06-16 17:38:28.000000000 +0200
++++ pilot-link-0.12.5/tests/packers.c 2011-12-20 16:33:46.072123761 +0100
+@@ -20,13 +20,14 @@
+ #include "pi-dlp.h"
+ #include "pi-expense.h"
+ #include "pi-mail.h"
++#include "pi-debug.h"
+
+ unsigned char seed;
+-char *target;
++unsigned char *target;
+ int targetlen;
+
+
+-void reset_block(char *buffer, int len)
++void reset_block(unsigned char *buffer, int len)
+ {
+ unsigned int i;
+
+@@ -34,19 +35,19 @@ void reset_block(char *buffer, int len)
+ buffer[i] = (i + seed) & 0xff;
+ }
+
+-int check_block(int test, const char *buffer, int len, int start,
++int check_block(int test, const unsigned char *buffer, int len, int start,
+ int count, const char *name)
+ {
+ unsigned int i;
+ int fore = 0, aft = 0;
+
+ for (i = 0; i < start; i++)
+- if (buffer[i] != (char) ((i + seed) & 0xff)) {
++ if (buffer[i] != ((i + seed) & 0xff)) {
+ fore = start - i;
+ break;
+ }
+ for (i = start + count; i < len; i++)
+- if (buffer[i] != (char) ((i + seed) & 0xff)) {
++ if (buffer[i] != ((i + seed) & 0xff)) {
+ aft = i - start;
+ break;
+ }
+@@ -64,7 +65,7 @@ int check_block(int test, const char *bu
+ return 0;
+ }
+
+-char MemoAppBlock[17 * 16 + 10] = "\
++unsigned char MemoAppBlock[17 * 16 + 10] = "\
+ \x00\x00\x55\x6e\x66\x69\x6c\x65\x64\x00\x00\x00\x00\x00\x00\x00\
+ \x00\x00\x42\x75\x73\x69\x6e\x65\x73\x73\x00\x00\x00\x00\x00\x00\
+ \x00\x00\x50\x65\x72\x73\x6f\x6e\x61\x6c\x00\x00\x00\x00\x00\x00\
+@@ -84,7 +85,7 @@ char MemoAppBlock[17 * 16 + 10] = "\
+ \x00\x00\x00\x01\x02\x10\x11\x12\x13\x00\x00\x00\x00\x00\x00\x00\
+ \x00\x00\x13\x00\x00\x00\x00\x00\x01\x00";
+
+-char MemoRecord[3 * 16 + 7] = "\
++unsigned char MemoRecord[3 * 16 + 7] = "\
+ \x61\x61\x4d\x61\x6b\x65\x66\x69\x6c\x65\x0a\x52\x45\x41\x44\x4d\
+ \x45\x0a\x6c\x69\x63\x65\x6e\x73\x65\x2e\x74\x65\x72\x6d\x73\x0a\
+ \x70\x69\x6c\x6f\x74\x6c\x69\x6e\x6b\x2e\x63\x0a\x74\x65\x73\x74\
+@@ -103,7 +104,7 @@ int test_memo()
+ if (l != sizeof(MemoAppBlock)) {
+ errors++;
+ printf
+- ("1: unpack_MemoAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("1: unpack_MemoAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MemoAppBlock));
+ }
+
+@@ -112,7 +113,7 @@ int test_memo()
+ if (l != sizeof(MemoAppBlock)) {
+ errors++;
+ printf
+- ("2: unpack_MemoAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("2: unpack_MemoAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MemoAppBlock));
+ }
+
+@@ -141,7 +142,7 @@ int test_memo()
+ if (l != sizeof(MemoAppBlock)) {
+ errors++;
+ printf
+- ("5: unpack_MemoAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("5: unpack_MemoAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MemoAppBlock));
+ }
+
+@@ -205,7 +206,7 @@ int test_memo()
+ if (l != sizeof(MemoAppBlock)) {
+ errors++;
+ printf
+- ("7: pack_MemoAppInfo returned incorrect allocation length (got %d, expected %d)\n",
++ ("7: pack_MemoAppInfo returned incorrect allocation length (got %d, expected %lu)\n",
+ l, sizeof(MemoAppBlock));
+ }
+
+@@ -230,7 +231,7 @@ int test_memo()
+ if (l != sizeof(MemoAppBlock)) {
+ errors++;
+ printf
+- ("10: pack_MemoAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("10: pack_MemoAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MemoAppBlock));
+ }
+
+@@ -271,7 +272,7 @@ int test_memo()
+ if (RecordBuffer->used != sizeof(MemoRecord)) {
+ errors++;
+ printf
+- ("15: pack_MemoRecord returned incorrect allocation length (got %d, expected %d)\n",
++ ("15: pack_MemoRecord returned incorrect allocation length (got %lu, expected %lu)\n",
+ RecordBuffer->used, sizeof(MemoRecord));
+ }
+
+@@ -290,7 +291,7 @@ int test_memo()
+ return errors;
+ }
+
+-char AddressAppBlock[39 * 16 + 14] = "\
++unsigned char AddressAppBlock[39 * 16 + 14] = "\
+ \x00\x10\x55\x6e\x66\x69\x6c\x65\x64\x00\x00\x00\x00\x00\x00\x00\
+ \x00\x00\x42\x75\x73\x69\x6e\x65\x73\x73\x00\x00\x00\x00\x00\x00\
+ \x00\x00\x50\x65\x72\x73\x6f\x6e\x61\x6c\x00\x00\x00\x00\x00\x00\
+@@ -332,7 +333,7 @@ char AddressAppBlock[39 * 16 + 14] = "\
+ \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x6f\x62\x69\x6c\x65\
+ \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00";
+
+-char AddressRecord[2 * 16 + 12] = "\
++unsigned char AddressRecord[2 * 16 + 12] = "\
+ \x00\x14\x32\x10\x00\x04\x41\x03\x00\x53\x68\x61\x77\x00\x42\x65\
+ \x72\x6e\x61\x72\x64\x00\x4e\x6f\x6e\x65\x20\x6b\x6e\x6f\x77\x6e\
+ \x00\x43\x31\x00\x41\x20\x6e\x6f\x74\x65\x2e\x00";
+@@ -352,7 +353,7 @@ int test_address()
+ if (l != sizeof(AddressAppBlock)) {
+ errors++;
+ printf
+- ("1: unpack_AddressAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("1: unpack_AddressAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(AddressAppBlock));
+ }
+
+@@ -363,7 +364,7 @@ int test_address()
+ if (l != sizeof(AddressAppBlock)) {
+ errors++;
+ printf
+- ("2: unpack_AddressAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("2: unpack_AddressAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(AddressAppBlock));
+ }
+
+@@ -396,7 +397,7 @@ int test_address()
+ if (l != sizeof(AddressAppBlock)) {
+ errors++;
+ printf
+- ("5: unpack_AddressAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("5: unpack_AddressAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(AddressAppBlock));
+ }
+
+@@ -458,7 +459,7 @@ int test_address()
+ if (l != sizeof(AddressAppBlock)) {
+ errors++;
+ printf
+- ("7: pack_AddressAppInfo returned incorrect allocation length (got %d, expected %d)\n",
++ ("7: pack_AddressAppInfo returned incorrect allocation length (got %d, expected %lu)\n",
+ l, sizeof(AddressAppBlock));
+ }
+
+@@ -484,7 +485,7 @@ int test_address()
+ if (l != sizeof(AddressAppBlock)) {
+ errors++;
+ printf
+- ("10: pack_AddressAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("10: pack_AddressAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(AddressAppBlock));
+ }
+
+@@ -534,7 +535,7 @@ int test_address()
+ if (RecordBuffer->used != sizeof(AddressRecord)) {
+ errors++;
+ printf
+- ("15: pack_Address returned incorrect length (got %d, expected %d)\n",
++ ("15: pack_Address returned incorrect length (got %lu, expected %lu)\n",
+ RecordBuffer->used, sizeof(AddressRecord));
+ }
+
+@@ -553,7 +554,7 @@ int test_address()
+ return errors;
+ }
+
+-char AppointmentAppBlock[17 * 16 + 8] = "\
++unsigned char AppointmentAppBlock[17 * 16 + 8] = "\
+ \x00\x00\x55\x6e\x66\x69\x6c\x65\x64\x00\x00\x00\x00\x00\x00\x00\
+ \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+ \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+@@ -577,7 +578,7 @@ char AppointmentAppBlock[17 * 16 + 8] =
+ and thus have a floating value. This sample record has
+ been altered to make theses bytes zero, to match what our
+ packing code generates. */
+-char AppointmentRecord[2 * 16 + 3] = "\
++unsigned char AppointmentRecord[2 * 16 + 3] = "\
+ \x09\x00\x0d\x28\xbb\x02\x7c\x00\x1d\x02\x02\x00\xbd\x24\x02\x55\
+ \x00\x00\x00\x01\xbb\x0c\x47\x65\x6f\x72\x67\x65\x00\x4e\x6f\x74\
+ \x65\x21\x00";
+@@ -598,7 +599,7 @@ int test_appointment()
+ if (l != sizeof(AppointmentAppBlock)) {
+ errors++;
+ printf
+- ("1: unpack_AppointmentAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("1: unpack_AppointmentAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(AppointmentAppBlock));
+ }
+
+@@ -609,7 +610,7 @@ int test_appointment()
+ if (l != sizeof(AppointmentAppBlock)) {
+ errors++;
+ printf
+- ("2: unpack_AppointmentAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("2: unpack_AppointmentAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(AppointmentAppBlock));
+ }
+
+@@ -642,7 +643,7 @@ int test_appointment()
+ if (l != sizeof(AppointmentAppBlock)) {
+ errors++;
+ printf
+- ("5: unpack_AppointmentAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("5: unpack_AppointmentAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(AppointmentAppBlock));
+ }
+
+@@ -707,7 +708,7 @@ int test_appointment()
+ if (l != sizeof(AppointmentAppBlock)) {
+ errors++;
+ printf
+- ("7: pack_AppointmentAppInfo returned incorrect allocation length (got %d, expected %d)\n",
++ ("7: pack_AppointmentAppInfo returned incorrect allocation length (got %d, expected %lu)\n",
+ l, sizeof(AppointmentAppBlock));
+ }
+
+@@ -733,7 +734,7 @@ int test_appointment()
+ if (l != sizeof(AppointmentAppBlock)) {
+ errors++;
+ printf
+- ("10: pack_AppointmentAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("10: pack_AppointmentAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(AppointmentAppBlock));
+ }
+
+@@ -785,7 +786,7 @@ int test_appointment()
+ if (RecordBuffer->used != sizeof(AppointmentRecord)) {
+ errors++;
+ printf
+- ("15: pack_Appointment returned incorrect length (got %d, expected %d)\n",
++ ("15: pack_Appointment returned incorrect length (got %lu, expected %lu)\n",
+ RecordBuffer->used, sizeof(AppointmentRecord));
+ }
+
+@@ -804,7 +805,7 @@ int test_appointment()
+ return errors;
+ }
+
+-char ToDoAppBlock[17 * 16 + 10] = "\
++unsigned char ToDoAppBlock[17 * 16 + 10] = "\
+ \x00\x08\x55\x6e\x66\x69\x6c\x65\x64\x00\x00\x00\x00\x00\x00\x00\
+ \x00\x00\x42\x75\x73\x69\x6e\x65\x73\x73\x00\x00\x00\x00\x00\x00\
+ \x00\x00\x50\x65\x72\x73\x6f\x6e\x61\x6c\x00\x00\x00\x00\x00\x00\
+@@ -824,7 +825,7 @@ char ToDoAppBlock[17 * 16 + 10] = "\
+ \x00\x00\x00\x01\x02\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+ \x00\x00\x11\x00\x00\x00\xff\xff\x01\x00";
+
+-char ToDoRecord[1 * 16 + 1] = "\
++unsigned char ToDoRecord[1 * 16 + 1] = "\
+ \xbb\x09\x05\x54\x6f\x64\x6f\x33\x00\x41\x20\x6e\x6f\x74\x65\x2e\
+ \x00";
+
+@@ -841,7 +842,7 @@ int test_todo()
+ if (l != sizeof(ToDoAppBlock)) {
+ errors++;
+ printf
+- ("1: unpack_ToDoAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("1: unpack_ToDoAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(ToDoAppBlock));
+ }
+
+@@ -850,7 +851,7 @@ int test_todo()
+ if (l != sizeof(ToDoAppBlock)) {
+ errors++;
+ printf
+- ("2: unpack_ToDoAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("2: unpack_ToDoAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(ToDoAppBlock));
+ }
+
+@@ -877,7 +878,7 @@ int test_todo()
+ if (l != sizeof(ToDoAppBlock)) {
+ errors++;
+ printf
+- ("5: unpack_ToDoAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("5: unpack_ToDoAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(ToDoAppBlock));
+ }
+
+@@ -941,7 +942,7 @@ int test_todo()
+ if (l != sizeof(ToDoAppBlock)) {
+ errors++;
+ printf
+- ("7: pack_ToDoAppInfo returned incorrect allocation length (got %d, expected %d)\n",
++ ("7: pack_ToDoAppInfo returned incorrect allocation length (got %d, expected %lu)\n",
+ l, sizeof(ToDoAppBlock));
+ }
+
+@@ -966,7 +967,7 @@ int test_todo()
+ if (l != sizeof(ToDoAppBlock)) {
+ errors++;
+ printf
+- ("10: pack_ToDoAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("10: pack_ToDoAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(ToDoAppBlock));
+ }
+
+@@ -1020,7 +1021,7 @@ int test_todo()
+ if (RecordBuffer->used != sizeof(ToDoRecord)) {
+ errors++;
+ printf
+- ("15: pack_ToDo returned incorrect length (got %d, expected %d)\n",
++ ("15: pack_ToDo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(ToDoRecord));
+ }
+
+@@ -1039,7 +1040,7 @@ int test_todo()
+ return errors;
+ }
+
+-char ExpenseAppBlock[24 * 16 + 8] = "\
++unsigned char ExpenseAppBlock[24 * 16 + 8] = "\
+ \x00\x00\x55\x6e\x66\x69\x6c\x65\x64\x00\x00\x00\x00\x00\x00\x00\
+ \x00\x00\x4e\x65\x77\x20\x59\x6f\x72\x6b\x00\x00\x00\x00\x00\x00\
+ \x00\x00\x50\x61\x72\x69\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+@@ -1067,7 +1068,7 @@ char ExpenseAppBlock[24 * 16 + 8] = "\
+ \x00\x00\x00\x00\x00\x00\x00\x00";
+
+ /* Byte five is floating */
+-char ExpenseRecord[1 * 16 + 14] = "\
++unsigned char ExpenseRecord[1 * 16 + 14] = "\
+ \xbb\x2a\x09\x01\x08\x00\x32\x39\x2e\x37\x32\x00\x55\x00\x43\x00\
+ \x41\x74\x74\x00\x54\x68\x65\x20\x6e\x6f\x74\x65\x2e\x00";
+
+@@ -1086,7 +1087,7 @@ int test_expense()
+ if (l != sizeof(ExpenseAppBlock)) {
+ errors++;
+ printf
+- ("1: unpack_ExpenseAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("1: unpack_ExpenseAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(ExpenseAppBlock));
+ }
+
+@@ -1097,7 +1098,7 @@ int test_expense()
+ if (l != sizeof(ExpenseAppBlock)) {
+ errors++;
+ printf
+- ("2: unpack_ExpenseAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("2: unpack_ExpenseAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(ExpenseAppBlock));
+ }
+
+@@ -1115,7 +1116,7 @@ int test_expense()
+ if (l != sizeof(ExpenseAppBlock)) {
+ errors++;
+ printf
+- ("3: unpack_ExpenseAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("3: unpack_ExpenseAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(ExpenseAppBlock));
+ }
+
+@@ -1180,7 +1181,7 @@ int test_expense()
+ if (l != sizeof(ExpenseAppBlock)) {
+ errors++;
+ printf
+- ("5: pack_ExpenseAppInfo returned incorrect allocation length (got %d, expected %d)\n",
++ ("5: pack_ExpenseAppInfo returned incorrect allocation length (got %d, expected %lu)\n",
+ l, sizeof(ExpenseAppBlock));
+ }
+
+@@ -1206,7 +1207,7 @@ int test_expense()
+ if (l != sizeof(ExpenseAppBlock)) {
+ errors++;
+ printf
+- ("8: pack_ExpenseAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("8: pack_ExpenseAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(ExpenseAppBlock));
+ }
+
+@@ -1229,7 +1230,7 @@ int test_expense()
+ if (l != sizeof(ExpenseRecord)) {
+ errors++;
+ printf
+- ("11: unpack_Expense returned incorrect length (got %d, expected %d)\n",
++ ("11: unpack_Expense returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(ExpenseRecord));
+ }
+
+@@ -1256,7 +1257,7 @@ int test_expense()
+ if (l != sizeof(ExpenseRecord)) {
+ errors++;
+ printf
+- ("13: pack_Expense returned incorrect allocation length (got %d, expected %d)\n",
++ ("13: pack_Expense returned incorrect allocation length (got %d, expected %lu)\n",
+ l, sizeof(ExpenseRecord));
+ }
+
+@@ -1281,7 +1282,7 @@ int test_expense()
+ if (l != sizeof(ExpenseRecord)) {
+ errors++;
+ printf
+- ("16: pack_Expense returned incorrect length (got %d, expected %d)\n",
++ ("16: pack_Expense returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(ExpenseRecord));
+ }
+
+@@ -1302,7 +1303,7 @@ int test_expense()
+ return errors;
+ }
+
+-char MailAppBlock[18 * 16 + 1] = "\
++unsigned char MailAppBlock[18 * 16 + 1] = "\
+ \x00\x1f\x49\x6e\x62\x6f\x78\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+ \x00\x00\x4f\x75\x74\x62\x6f\x78\x00\x00\x00\x00\x00\x00\x00\x00\
+ \x00\x00\x44\x65\x6c\x65\x74\x65\x64\x00\x00\x00\x00\x00\x00\x00\
+@@ -1323,14 +1324,14 @@ char MailAppBlock[18 * 16 + 1] = "\
+ \x0e\x0f\x0f\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x01\x20\
+ \x00";
+
+-char MailRecord[1 * 16 + 2] = "\
++unsigned char MailRecord[1 * 16 + 2] = "\
+ \x00\x00\x00\x00\x78\x00\x43\x00\x00\x61\x00\x62\x00\x00\x00\x00\
+ \x44\x00"; /*\x27"; This byte seems to be spurious */
+
+-char MailSigPreference[3] = "\
++unsigned char MailSigPreference[3] = "\
+ \x61\x62\x00";
+
+-char MailSyncPreference[13] = "\
++unsigned char MailSyncPreference[13] = "\
+ \x02\x01\x00\x00\x17\x70\x61\x74\x00\x6c\x64\x00\x00";
+
+ int test_mail()
+@@ -1347,7 +1348,7 @@ int test_mail()
+ if (l != sizeof(MailAppBlock)) {
+ errors++;
+ printf
+- ("1: unpack_MailAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("1: unpack_MailAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MailAppBlock));
+ }
+
+@@ -1356,7 +1357,7 @@ int test_mail()
+ if (l != sizeof(MailAppBlock)) {
+ errors++;
+ printf
+- ("2: unpack_MailAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("2: unpack_MailAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MailAppBlock));
+ }
+
+@@ -1372,7 +1373,7 @@ int test_mail()
+ if (l != sizeof(MailAppBlock)) {
+ errors++;
+ printf
+- ("3: unpack_MailAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("3: unpack_MailAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MailAppBlock));
+ }
+
+@@ -1437,7 +1438,7 @@ int test_mail()
+ if (l != sizeof(MailAppBlock)) {
+ errors++;
+ printf
+- ("5: pack_MailAppInfo returned incorrect allocation length (got %d, expected %d)\n",
++ ("5: pack_MailAppInfo returned incorrect allocation length (got %d, expected %lu)\n",
+ l, sizeof(MailAppBlock));
+ }
+
+@@ -1462,7 +1463,7 @@ int test_mail()
+ if (l != sizeof(MailAppBlock)) {
+ errors++;
+ printf
+- ("8: pack_MailAppInfo returned incorrect length (got %d, expected %d)\n",
++ ("8: pack_MailAppInfo returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MailAppBlock));
+ }
+
+@@ -1485,7 +1486,7 @@ int test_mail()
+ if (l != sizeof(MailRecord)) {
+ errors++;
+ printf
+- ("11: unpack_Mail returned incorrect length (got %d, expected %d)\n",
++ ("11: unpack_Mail returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MailRecord));
+ }
+
+@@ -1512,7 +1513,7 @@ int test_mail()
+ if (l != sizeof(MailRecord)) {
+ errors++;
+ printf
+- ("13: pack_Mail returned incorrect allocation length (got %d, expected %d)\n",
++ ("13: pack_Mail returned incorrect allocation length (got %d, expected %lu)\n",
+ l, sizeof(MailRecord));
+ }
+
+@@ -1536,7 +1537,7 @@ int test_mail()
+ if (l != sizeof(MailRecord)) {
+ errors++;
+ printf
+- ("16: pack_Mail returned incorrect length (got %d, expected %d)\n",
++ ("16: pack_Mail returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MailRecord));
+ }
+
+@@ -1560,7 +1561,7 @@ int test_mail()
+ if (l != sizeof(MailSyncPreference)) {
+ errors++;
+ printf
+- ("19: unpack_MailSyncPref returned incorrect length (got %d, expected %d)\n",
++ ("19: unpack_MailSyncPref returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MailSyncPreference));
+ }
+
+@@ -1571,7 +1572,7 @@ int test_mail()
+ if (l != sizeof(MailSyncPreference)) {
+ errors++;
+ printf
+- ("20: unpack_MailSyncPref returned incorrect length (got %d, expected %d)\n",
++ ("20: unpack_MailSyncPref returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MailSyncPreference));
+ }
+
+@@ -1582,7 +1583,7 @@ int test_mail()
+ if (l != sizeof(MailSyncPreference)) {
+ errors++;
+ printf
+- ("21: unpack_MailSyncPref returned incorrect length (got %d, expected %d)\n",
++ ("21: unpack_MailSyncPref returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MailSyncPreference));
+ }
+
+@@ -1609,7 +1610,7 @@ int test_mail()
+ if (l != sizeof(MailSyncPreference)) {
+ errors++;
+ printf
+- ("23: pack_MailSyncPref returned incorrect allocation length (got %d, expected %d)\n",
++ ("23: pack_MailSyncPref returned incorrect allocation length (got %d, expected %lu)\n",
+ l, sizeof(MailSyncPreference));
+ }
+
+@@ -1635,7 +1636,7 @@ int test_mail()
+ if (l != sizeof(MailSyncPreference)) {
+ errors++;
+ printf
+- ("26: pack_MailSyncPref returned incorrect length (got %d, expected %d)\n",
++ ("26: pack_MailSyncPref returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MailSyncPreference));
+ }
+
+@@ -1661,7 +1662,7 @@ int test_mail()
+ if (l != sizeof(MailSigPreference)) {
+ errors++;
+ printf
+- ("29: unpack_MailSigPref returned incorrect length (got %d, expected %d)\n",
++ ("29: unpack_MailSigPref returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MailSyncPreference));
+ }
+
+@@ -1672,7 +1673,7 @@ int test_mail()
+ if (l != sizeof(MailSigPreference)) {
+ errors++;
+ printf
+- ("30: unpack_MailSigPref returned incorrect length (got %d, expected %d)\n",
++ ("30: unpack_MailSigPref returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MailSyncPreference));
+ }
+
+@@ -1683,7 +1684,7 @@ int test_mail()
+ if (l != sizeof(MailSigPreference)) {
+ errors++;
+ printf
+- ("31: unpack_MailSigPref returned incorrect length (got %d, expected %d)\n",
++ ("31: unpack_MailSigPref returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MailSyncPreference));
+ }
+
+@@ -1710,7 +1711,7 @@ int test_mail()
+ if (l != sizeof(MailSigPreference)) {
+ errors++;
+ printf
+- ("33: pack_MailSignaturePref returned incorrect allocation length (got %d, expected %d)\n",
++ ("33: pack_MailSignaturePref returned incorrect allocation length (got %d, expected %lu)\n",
+ l, sizeof(MailSigPreference));
+ }
+
+@@ -1736,7 +1737,7 @@ int test_mail()
+ if (l != sizeof(MailSigPreference)) {
+ errors++;
+ printf
+- ("36: pack_MailSignaturePref returned incorrect length (got %d, expected %d)\n",
++ ("36: pack_MailSignaturePref returned incorrect length (got %d, expected %lu)\n",
+ l, sizeof(MailSigPreference));
+ }
+
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/tests/versamail-test.c pilot-link-0.12.5/tests/versamail-test.c
+--- pilot-link-0.12.5-old/tests/versamail-test.c 2005-04-21 17:21:30.000000000 +0200
++++ pilot-link-0.12.5/tests/versamail-test.c 2011-12-14 16:39:27.926393327 +0100
+@@ -186,7 +186,7 @@ int main(int argc, char *argv[])
+ {
+ struct pi_file *pi_fp;
+ char *DBname;
+- int r;
++ int r = 0;
+ int idx;
+ size_t size;
+ int attr;
+diff -upr -x '*.deps*' -x '*Makefile' -x '*config.*' pilot-link-0.12.5-old/tests/vfs-test.c pilot-link-0.12.5/tests/vfs-test.c
+--- pilot-link-0.12.5-old/tests/vfs-test.c 2007-02-05 10:48:10.000000000 +0100
++++ pilot-link-0.12.5/tests/vfs-test.c 2011-12-14 20:07:53.702893697 +0100
+@@ -35,6 +35,7 @@
+ #include "pi-error.h"
+ #include "pi-source.h"
+ #include "pi-header.h"
++#include "pi-userland.h"
+
+
+ /* For various protocol versions, set to 0 to not test those versions */
+@@ -77,7 +78,8 @@ int main (int argc, char **argv)
+
+ unsigned long flags;
+
+- sd = pilot_connect (argv[1]);
++ setenv("PILOTPORT", argv[1], 1);
++ sd = plu_connect();
+ if (sd < 0) return 1;
+
+ t1 = time (NULL);
+@@ -297,7 +299,7 @@ int main (int argc, char **argv)
+ LOG((PI_DBG_USER, PI_DBG_LVL_INFO, "* ERROR: File read: read %d instead of the expected %d\n", len, strlen (name)));
+ } else if (memcmp (name, fileBuf->data, fileBuf->used)) {
+ LOG((PI_DBG_USER, PI_DBG_LVL_INFO, "* ERROR: File read: read data mismatch\n", fileBuf->used, strlen (name)));
+- pi_dumpdata (name, fileBuf->used);
++ pi_dumpdata ((unsigned char*)name, fileBuf->used);
+ pi_dumpdata (fileBuf->data, fileBuf->used);
+ } else {
+ LOG((PI_DBG_USER, PI_DBG_LVL_INFO, "* File read: successfully read the data back\n"));
diff --git a/source/l/pilot-link/pilot-link-0.12.5-ftbfs-f19.patch b/source/l/pilot-link/pilot-link-0.12.5-ftbfs-f19.patch
new file mode 100644
index 000000000..5dfff20ab
--- /dev/null
+++ b/source/l/pilot-link/pilot-link-0.12.5-ftbfs-f19.patch
@@ -0,0 +1,24 @@
+diff -up pilot-link-0.12.5/libpisock/md5.c.ftbfs-f19 pilot-link-0.12.5/libpisock/md5.c
+--- pilot-link-0.12.5/libpisock/md5.c.ftbfs-f19 2013-02-25 15:17:31.708780677 +0100
++++ pilot-link-0.12.5/libpisock/md5.c 2013-02-25 15:15:07.771861922 +0100
+@@ -125,7 +125,7 @@ void MD5Final(UINT8 digest[16], struct M
+
+ byteSwap(ctx->buf, 4);
+ memcpy(digest, ctx->buf, 16);
+- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
++ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
+ }
+
+ #ifndef ASM_MD5
+diff -up pilot-link-0.12.5/popt/popthelp.c.ftbfs-f19 pilot-link-0.12.5/popt/popthelp.c
+--- pilot-link-0.12.5/popt/popthelp.c.ftbfs-f19 2004-08-25 17:06:39.000000000 +0200
++++ pilot-link-0.12.5/popt/popthelp.c 2013-02-25 15:16:34.593606516 +0100
+@@ -683,7 +683,7 @@ static int showShortOptions(const struct
+ s[0] = '\0';
+ /*@-branchstate@*/ /* FIX: W2DO? */
+ if (str == NULL) {
+- memset(s, 0, sizeof(s));
++ memset(s, 0, sizeof(*s));
+ str = s;
+ }
+ /*@=branchstate@*/
diff --git a/source/l/pilot-link/pilot-link-0.12.5-ftbfs-f21.patch b/source/l/pilot-link/pilot-link-0.12.5-ftbfs-f21.patch
new file mode 100644
index 000000000..772c68a3a
--- /dev/null
+++ b/source/l/pilot-link/pilot-link-0.12.5-ftbfs-f21.patch
@@ -0,0 +1,22 @@
+diff -ur pilot-link-0.12.5.orig/configure pilot-link-0.12.5/configure
+--- pilot-link-0.12.5.orig/configure 2010-02-07 04:42:29.000000000 +0100
++++ pilot-link-0.12.5/configure 2014-05-09 15:36:30.466127800 +0200
+@@ -2604,12 +2604,12 @@
+
+
+ enable_werror=no
+-save_CFLAGS="$CFLAGS"
+-CFLAGS=`echo $save_CFLAGS | sed -e s/-Werror//g`
+-CXXFLAGS=`echo $save_CXXFLAGS | sed -e s/-Werror//g`
+-if test "x$CFLAGS" != "x$save_CFLAGS"; then
+- enable_werror="yes"
+-fi
++#save_CFLAGS="$CFLAGS"
++#CFLAGS=`echo $save_CFLAGS | sed -e s/-Werror//g`
++#CXXFLAGS=`echo $save_CXXFLAGS | sed -e s/-Werror//g`
++#if test "x$CFLAGS" != "x$save_CFLAGS"; then
++# enable_werror="yes"
++#fi
+
+
+ ac_aux_dir=
diff --git a/source/l/pilot-link/pilot-link-0.12.5-mp.patch b/source/l/pilot-link/pilot-link-0.12.5-mp.patch
new file mode 100644
index 000000000..c2d302615
--- /dev/null
+++ b/source/l/pilot-link/pilot-link-0.12.5-mp.patch
@@ -0,0 +1,13 @@
+diff -up pilot-link-0.12.5/doc/man/pilot-install-expenses.1.pom pilot-link-0.12.5/doc/man/pilot-install-expenses.1
+--- pilot-link-0.12.5/doc/man/pilot-install-expenses.1.pom 2010-02-07 04:43:11.000000000 +0100
++++ pilot-link-0.12.5/doc/man/pilot-install-expenses.1 2011-03-09 17:12:30.000000000 +0100
+@@ -76,7 +76,7 @@ Add the number of attendees to the expen
+ \fB\-\-city\fR \fBSTRING\fR
+
+ .PP
+-Add entries to the "City" field in the expense record\&. These are free\-form values, and can be the name of the location, city, or town that the expense record occured in\&.
++Add entries to the "City" field in the expense record\&. These are free\-form values, and can be the name of the location, city, or town that the expense record occurred in\&.
+
+ \fB\-n\fR,
+ \fB\-\-note\fR \fBSTRING\fR
+diff -up pilot-link-0.12.5/doc/man/pilot-install-netsync.1.pom pilot-link-0.12.5/doc/man/pilot-install-netsync.1
diff --git a/source/l/pilot-link/pilot-link-c99.patch b/source/l/pilot-link/pilot-link-c99.patch
new file mode 100644
index 000000000..4e69bc866
--- /dev/null
+++ b/source/l/pilot-link/pilot-link-c99.patch
@@ -0,0 +1,28 @@
+Fix return types for PDA::Pilot::getRecords in the Perl bindings.
+
+diff --git a/bindings/Perl/Pilot.xs b/bindings/Perl/Pilot.xs
+index ef6865b710557fe8..424a24e64df8d2ae 100644
+--- a/bindings/Perl/Pilot.xs
++++ b/bindings/Perl/Pilot.xs
+@@ -2542,16 +2542,18 @@ resetNext(self)
+ OUTPUT:
+ RETVAL
+
+-int
++SV *
+ getRecords(self)
+ PDA::Pilot::DLP::DB *self
+ CODE:
+ {
+- int result = dlp_ReadOpenDBInfo(self->socket, self->handle, &RETVAL);
++ int retval;
++ int result = dlp_ReadOpenDBInfo(self->socket, self->handle, &retval);
+ if (result < 0) {
+ RETVAL = newSVsv(&PL_sv_undef);
+ self->errnop = result;
+- }
++ } else
++ RETVAL = newSViv(retval);
+ }
+ OUTPUT:
+ RETVAL
diff --git a/source/l/pilot-link/pilot-link-configure-c99.patch b/source/l/pilot-link/pilot-link-configure-c99.patch
new file mode 100644
index 000000000..7ce8d0eed
--- /dev/null
+++ b/source/l/pilot-link/pilot-link-configure-c99.patch
@@ -0,0 +1,30 @@
+The standard iconv function expects a char ** type for its input
+argument. Adjust the configure probe to avoid build failures
+with future compilers.
+
+diff --git a/configure b/configure
+index d4031564da7e2184..a2e5877f8588059d 100755
+--- a/configure
++++ b/configure
+@@ -15859,7 +15859,7 @@ else
+
+ int main (int argc, char **argv)
+ {
+- const char *pc = "\x66\x66\x66\x66\x66\x66\x66\xA9";
++ char *pc = (char *) "\x66\x66\x66\x66\x66\x66\x66\xA9";
+ const char *utf8 = "\x66\x66\x66\x66\x66\x66\x66\xC2\xA9";
+ char transbuf[10], *trans = transbuf;
+ iconv_t cd;
+diff --git a/configure.ac b/configure.ac
+index dc19311ce99f888a..ce9b310527e1a8dc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -458,7 +458,7 @@ AC_CHECK_LIB(
+
+ int main (int argc, char **argv)
+ {
+- const char *pc = "\x66\x66\x66\x66\x66\x66\x66\xA9";
++ char *pc = (char *) "\x66\x66\x66\x66\x66\x66\x66\xA9";
+ const char *utf8 = "\x66\x66\x66\x66\x66\x66\x66\xC2\xA9";
+ char transbuf[10], *trans = transbuf;
+ iconv_t cd;
diff --git a/source/l/pilot-link/pilot-link.SlackBuild b/source/l/pilot-link/pilot-link.SlackBuild
index 80e15ce26..1e149534e 100755
--- a/source/l/pilot-link/pilot-link.SlackBuild
+++ b/source/l/pilot-link/pilot-link.SlackBuild
@@ -70,8 +70,17 @@ rm -rf pilot-link-$VERSION
tar xvf $CWD/pilot-link-$VERSION.tar.bz2 || exit 1
cd pilot-link-$VERSION || exit 1
-zcat $CWD/pilot-link.png14.diff.gz | patch -p1 --verbose || exit 1
-zcat $CWD/pilot-link-0.12.5-redefinePerlsymbols.patch.gz | patch -p1 --verbose || exit 1
+cat $CWD/pilot-link-0.12.1-var.patch | patch -p1 --verbose || exit 1
+cat $CWD/pilot-link-0.12.2-open.patch | patch -p1 --verbose || exit 1
+cat $CWD/pilot-link-0.12.3-clio.patch | patch -p1 --verbose || exit 1
+cat $CWD/pilot-link-0.12.5-mp.patch | patch -p1 --verbose || exit 1
+cat $CWD/pilot-link-0.12.5-redefinePerlsymbols.patch | patch -p1 --verbose || exit 1
+cat $CWD/pilot-link-0.12.5-compiler_warnings.patch | patch -p1 --verbose || exit 1
+cat $CWD/pilot-link-0.12.5-ftbfs-f19.patch | patch -p1 --verbose || exit 1
+cat $CWD/pilot-link-0.12.5-aarch64.patch | patch -p1 --verbose || exit 1
+cat $CWD/pilot-link-0.12.5-ftbfs-f21.patch | patch -p1 --verbose || exit 1
+cat $CWD/pilot-link-configure-c99.patch | patch -p1 --verbose || exit 1
+cat $CWD/pilot-link-c99.patch | patch -p1 --verbose || exit 1
chown -R root:root .
find . \
diff --git a/source/l/pilot-link/pilot-link.png14.diff b/source/l/pilot-link/pilot-link.png14.diff
deleted file mode 100644
index bc1cba25d..000000000
--- a/source/l/pilot-link/pilot-link.png14.diff
+++ /dev/null
@@ -1,96 +0,0 @@
---- ./src/pilot-read-veo.c.orig 2007-02-04 17:06:03.000000000 -0600
-+++ ./src/pilot-read-veo.c 2010-02-19 12:52:30.000000000 -0600
-@@ -41,10 +41,6 @@
-
- #ifdef HAVE_PNG
- # include "png.h"
--# if (PNG_LIBPNG_VER < 10201)
--# define png_voidp_NULL (png_voidp)NULL
--# define png_error_ptr_NULL (png_error_ptr)NULL
--# endif
- #endif
-
- #define pi_mktag(c1,c2,c3,c4) (((c1)<<24)|((c2)<<16)|((c3)<<8)|(c4))
-@@ -856,8 +852,8 @@
- png_infop info_ptr;
-
- png_ptr = png_create_write_struct
-- (PNG_LIBPNG_VER_STRING, png_voidp_NULL,
-- png_error_ptr_NULL, png_error_ptr_NULL);
-+ (PNG_LIBPNG_VER_STRING, NULL,
-+ NULL, NULL);
-
- if (!png_ptr)
- return;
---- ./src/pilot-read-notepad.c.orig 2007-02-04 17:06:02.000000000 -0600
-+++ ./src/pilot-read-notepad.c 2010-02-19 12:53:03.000000000 -0600
-@@ -39,10 +39,6 @@
-
- #ifdef HAVE_PNG
- #include "png.h"
--#if (PNG_LIBPNG_VER < 10201)
-- #define png_voidp_NULL (png_voidp)NULL
-- #define png_error_ptr_NULL (png_error_ptr)NULL
--#endif
- #endif
-
- const char *progname;
-@@ -166,8 +162,8 @@
- width = n->body.width + 8;
-
- png_ptr = png_create_write_struct
-- ( PNG_LIBPNG_VER_STRING, png_voidp_NULL,
-- png_error_ptr_NULL, png_error_ptr_NULL);
-+ ( PNG_LIBPNG_VER_STRING, NULL,
-+ NULL, NULL);
-
- if(!png_ptr)
- return;
---- ./src/pilot-read-screenshot.c.orig 2006-11-02 08:54:31.000000000 -0600
-+++ ./src/pilot-read-screenshot.c 2010-02-19 12:50:44.000000000 -0600
-@@ -40,10 +40,6 @@
-
- #ifdef HAVE_PNG
- # include "png.h"
--# if (PNG_LIBPNG_VER < 10201)
--# define png_voidp_NULL (png_voidp)NULL
--# define png_error_ptr_NULL (png_error_ptr)NULL
--# endif
- #endif
-
- #define pi_mktag(c1,c2,c3,c4) (((c1)<<24)|((c2)<<16)|((c3)<<8)|(c4))
-@@ -87,8 +83,8 @@
- gray_buf = malloc( state->w );
-
- png_ptr = png_create_write_struct
-- (PNG_LIBPNG_VER_STRING, png_voidp_NULL,
-- png_error_ptr_NULL, png_error_ptr_NULL);
-+ (PNG_LIBPNG_VER_STRING, NULL,
-+ NULL, NULL);
-
- if (!png_ptr)
- return;
---- ./src/pilot-read-palmpix.c.orig 2007-02-04 17:06:03.000000000 -0600
-+++ ./src/pilot-read-palmpix.c 2010-02-19 12:51:10.000000000 -0600
-@@ -42,10 +42,6 @@
-
- #ifdef HAVE_PNG
- #include "png.h"
--#if (PNG_LIBPNG_VER < 10201)
-- #define png_voidp_NULL (png_voidp)NULL
-- #define png_error_ptr_NULL (png_error_ptr)NULL
--#endif
- #endif
-
- const char *progname;
-@@ -223,8 +219,8 @@
- png_infop info_ptr;
-
- png_ptr = png_create_write_struct
-- ( PNG_LIBPNG_VER_STRING, png_voidp_NULL,
-- png_error_ptr_NULL, png_error_ptr_NULL);
-+ ( PNG_LIBPNG_VER_STRING, NULL,
-+ NULL, NULL);
-
- if(!png_ptr)
- return;
diff --git a/source/l/pygtk/pygtk.SlackBuild b/source/l/pygtk/pygtk.SlackBuild
index de4cfcefc..3c1657dc8 100755
--- a/source/l/pygtk/pygtk.SlackBuild
+++ b/source/l/pygtk/pygtk.SlackBuild
@@ -67,6 +67,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration -Wno-error=int-conversion"
+
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP || exit 1
diff --git a/source/l/readline/readline.SlackBuild b/source/l/readline/readline.SlackBuild
index bce26c339..de9658082 100755
--- a/source/l/readline/readline.SlackBuild
+++ b/source/l/readline/readline.SlackBuild
@@ -109,7 +109,7 @@ make install DESTDIR=$PKG || exit 1
# NOTE: This will link against the currently installed libreadline!
# Build/install this package twice whenever there is an .soname bump.
( cd examples/rlfe || exit 1
- CFLAGS="$SLKCFLAGS" \
+ CFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=int-conversion" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
diff --git a/source/l/sdl/sdl.SlackBuild b/source/l/sdl/sdl.SlackBuild
index cbbedaf3e..95011b741 100755
--- a/source/l/sdl/sdl.SlackBuild
+++ b/source/l/sdl/sdl.SlackBuild
@@ -66,6 +66,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types -Wno-error=implicit-function-declaration"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-sdl
diff --git a/source/l/slang1/slang1.SlackBuild b/source/l/slang1/slang1.SlackBuild
index 97ae70c94..b90daf181 100755
--- a/source/l/slang1/slang1.SlackBuild
+++ b/source/l/slang1/slang1.SlackBuild
@@ -61,6 +61,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-slang1
rm -rf $PKG
@@ -83,7 +86,7 @@ CFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--includedir=/usr/include/slang1 \
--disable-static \
- $ARCH-slackware-linux
+ $ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
diff --git a/source/l/svgalib/svgalib.SlackBuild b/source/l/svgalib/svgalib.SlackBuild
index 880c7c6bd..e83392096 100755
--- a/source/l/svgalib/svgalib.SlackBuild
+++ b/source/l/svgalib/svgalib.SlackBuild
@@ -58,6 +58,12 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=return-mismatch"
+
+# From the Makefile.cfg:
+SLKCFLAGS="$SLKCFLAGS -fomit-frame-pointer -O2 -fno-strength-reduce -pipe"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-svgalib
rm -rf $PKG
@@ -92,6 +98,7 @@ zcat $CWD/svgalib-1.9.25-quickmath-h-redefinitions.patch.gz | patch -p1 --verbos
zcat $CWD/svgalib-1.9.21-demos.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/svgalib-1.9.25.no_asm.patch.gz | patch -p1 --verbose || exit 1
+export CFLAGS="$SLKCFLAGS"
# Build and install - spamming your partition first...:
make install NO_HELPER=y || exit 1
make install \
diff --git a/source/l/t1lib/t1lib.SlackBuild b/source/l/t1lib/t1lib.SlackBuild
index ae7ade14c..ad5ff3266 100755
--- a/source/l/t1lib/t1lib.SlackBuild
+++ b/source/l/t1lib/t1lib.SlackBuild
@@ -55,6 +55,9 @@ elif [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int"
+
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
TMP=${TMP:-/tmp}
diff --git a/source/n/alpine/alpine.SlackBuild b/source/n/alpine/alpine.SlackBuild
index 152f25c7f..3e3f3d084 100755
--- a/source/n/alpine/alpine.SlackBuild
+++ b/source/n/alpine/alpine.SlackBuild
@@ -65,6 +65,9 @@ elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types"
+
cd $TMP
rm -rf alpine-${VERSION}
tar xvf $CWD/alpine-$VERSION.tar.?z || exit 1
diff --git a/source/n/cyrus-sasl/cyrus-sasl.SlackBuild b/source/n/cyrus-sasl/cyrus-sasl.SlackBuild
index 89bbf6b5e..e2e628721 100755
--- a/source/n/cyrus-sasl/cyrus-sasl.SlackBuild
+++ b/source/n/cyrus-sasl/cyrus-sasl.SlackBuild
@@ -63,6 +63,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
diff --git a/source/n/elm/config.sh b/source/n/elm/config.sh
index 52bca7a95..1db7ecca3 100644
--- a/source/n/elm/config.sh
+++ b/source/n/elm/config.sh
@@ -257,7 +257,7 @@ small=''
medium=''
large=''
huge=''
-optimize='-O'
+optimize='-O -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=return-mismatch'
ccflags=''
cppflags=''
ldflags=''
diff --git a/source/n/htdig/htdig.SlackBuild b/source/n/htdig/htdig.SlackBuild
index 1ca8264ff..5a1bedda8 100755
--- a/source/n/htdig/htdig.SlackBuild
+++ b/source/n/htdig/htdig.SlackBuild
@@ -64,6 +64,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.bz2 || exit 1
diff --git a/source/n/icmpinfo/icmpinfo.SlackBuild b/source/n/icmpinfo/icmpinfo.SlackBuild
index f5233971e..05883aaa8 100755
--- a/source/n/icmpinfo/icmpinfo.SlackBuild
+++ b/source/n/icmpinfo/icmpinfo.SlackBuild
@@ -69,6 +69,8 @@ zcat $CWD/icmpinfo-1.11.diff.gz | patch -p1 --backup || exit 1
# Patch to prevent segfault:
zcat $CWD/icmpinfo-1.11-time.diff.gz | patch -p1 --backup || exit 1
+export CFLAGS="-O2 -Wno-error=implicit-function-declaration"
+
make $NUMJOBS || make || exit 1
strip --strip-unneeded icmpinfo
diff --git a/source/n/inetd/inetd.SlackBuild b/source/n/inetd/inetd.SlackBuild
index f61982aee..b0417dd5c 100755
--- a/source/n/inetd/inetd.SlackBuild
+++ b/source/n/inetd/inetd.SlackBuild
@@ -60,6 +60,7 @@ cd inetd
zcat $CWD/inetd-OpenBSD-1.79.diff.gz | patch -p1 --backup --suffix=.orig --verbose -E
zcat $CWD/inetd.loopingdos.diff.gz | patch -p1 --backup --suffix=.orig --verbose -E
zcat $CWD/inetd.libtirpc.diff.gz | patch -p1 --backup --suffix=.orig --verbose -E
+zcat $CWD/inetd.gcc14.diff.gz | patch -p1 --backup --suffix=.orig --verbose -E
# GCC 4 fix (thanks Fred Emmott)
sed -i 's#(type)\([a-z]\)=(type)\([a-z]\)#\1=(type)\2#g' inetd.c
diff --git a/source/n/inetd/inetd.gcc14.diff b/source/n/inetd/inetd.gcc14.diff
new file mode 100644
index 000000000..4053cf978
--- /dev/null
+++ b/source/n/inetd/inetd.gcc14.diff
@@ -0,0 +1,9 @@
+--- ./Makefile.orig 2024-05-11 12:41:56.282823472 -0500
++++ ./Makefile 2024-05-11 12:43:08.540825089 -0500
+@@ -1,5 +1,5 @@
+ CC = gcc
+-CFLAGS = -O2 -I/usr/include/tirpc
++CFLAGS = -O2 -I/usr/include/tirpc -Wno-error=implicit-function-declaration
+ LDFLAGS = -s -ltirpc
+
+ all:
diff --git a/source/n/lftp/lftp.SlackBuild b/source/n/lftp/lftp.SlackBuild
index 152f7eb51..cbc5c3648 100755
--- a/source/n/lftp/lftp.SlackBuild
+++ b/source/n/lftp/lftp.SlackBuild
@@ -73,6 +73,9 @@ rm -rf lftp-$VERSION
tar xvf $CWD/lftp-$VERSION.tar.xz || exit 1
cd lftp-$VERSION || exit 1
+zcat $CWD/lftp.c99.patch.gz | patch -p1 --verbose || exit 1
+touch -r aclocal.m4 configure m4/needtrio.m4
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff --git a/source/n/lftp/lftp.c99.patch b/source/n/lftp/lftp.c99.patch
new file mode 100644
index 000000000..3e3ec17ec
--- /dev/null
+++ b/source/n/lftp/lftp.c99.patch
@@ -0,0 +1,22 @@
+diff -rup a/configure b/configure
+--- a/configure 2023-02-08 21:27:48.733647760 -0500
++++ b/configure 2023-02-08 21:28:31.201222024 -0500
+@@ -57429,6 +57429,7 @@ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
++ #include <stdio.h>
+ int main()
+ {
+ unsigned long long x=0,x1;
+diff -rup a/m4/needtrio.m4 b/m4/needtrio.m4
+--- a/m4/needtrio.m4 2016-02-20 08:57:52.000000000 -0500
++++ b/m4/needtrio.m4 2023-02-08 21:28:13.642571126 -0500
+@@ -9,6 +9,7 @@ AC_DEFUN([LFTP_NEED_TRIO],[
+ else
+
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
++ #include <stdio.h>
+ int main()
+ {
+ unsigned long long x=0,x1;
diff --git a/source/n/links/links.SlackBuild b/source/n/links/links.SlackBuild
index ce9ac21a6..a1c31724e 100755
--- a/source/n/links/links.SlackBuild
+++ b/source/n/links/links.SlackBuild
@@ -72,6 +72,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int"
+
# We are configuring this without X as there are MANY browser choices for
# X already. If you need a browser for X, either use something else or
# recompile. :-)
diff --git a/source/n/metamail/metamail.SlackBuild b/source/n/metamail/metamail.SlackBuild
index b2126c81a..96cac1bc6 100755
--- a/source/n/metamail/metamail.SlackBuild
+++ b/source/n/metamail/metamail.SlackBuild
@@ -80,6 +80,7 @@ cd metamail-$VERSION || exit 1
xz -dc $CWD/metamail_2.7-54.diff.xz | patch -p1 || exit 1
xz -dc $CWD/metamail.automake.diff.xz | patch -p1 || exit 1
zcat $CWD/metamail.uue.getline.diff.gz | patch -p1 || exit 1
+cat $CWD/metamail.gcc14.diff | patch -p1 || exit 1
chmod 755 configure
@@ -93,7 +94,7 @@ find . \
# Fix misnamed man page:
mv man/mmencode.1 man/mimencode.1
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="$SLKCFLAGS -Wno-error=implicit-int" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -113,7 +114,7 @@ CFLAGS="$SLKCFLAGS" \
mv m.c mailto.c
)
-make $NUMJOBS || make || exit 1
+CFLAGS="$SLKCFLAGS -Wno-error=implicit-int" make $NUMJOBS || make || exit 1
( cd bin
cat mailto-hebrew | perl -pi -e 's|/usr/lib/X11/fonts/misc|/usr/share/metamail/fonts|' > mh
diff --git a/source/n/metamail/metamail.gcc14.diff b/source/n/metamail/metamail.gcc14.diff
new file mode 100644
index 000000000..0c539da9d
--- /dev/null
+++ b/source/n/metamail/metamail.gcc14.diff
@@ -0,0 +1,22 @@
+--- ./src/metamail/Makefile.in.orig 2024-05-10 16:12:29.131173303 -0500
++++ ./src/metamail/Makefile.in 2024-05-10 16:18:58.068182003 -0500
+@@ -82,7 +82,7 @@
+
+ MAINTAINERCLEANFILES = Makefile.in
+
+-CFLAGS = -lncurses
++CFLAGS = -lncurses -Wno-error=return-mismatch -Wno-error=implicit-function-declaration -Wno-error=implicit-int
+
+ INCLUDES = -I$(top_builddir) -I$(top_builddir)/metamail -I$(top_srcdir) -I$(top_srcdir)/metamail
+
+--- ./src/richmail/Makefile.in.orig 2024-05-10 16:12:29.130173303 -0500
++++ ./src/richmail/Makefile.in 2024-05-10 16:20:28.612184029 -0500
+@@ -82,7 +82,7 @@
+
+ MAINTAINERCLEANFILES = Makefile.in
+
+-CFLAGS = -lncurses
++CFLAGS = -lncurses -Wno-error=return-mismatch -Wno-error=implicit-function-declaration -Wno-error=implicit-int
+
+ INCLUDES = -I$(top_builddir) -I$(top_builddir)/metamail -I$(top_srcdir) -I$(top_srcdir)/metamail
+
diff --git a/source/n/nc/nc.SlackBuild b/source/n/nc/nc.SlackBuild
index dbd003dfc..0e3c4da3a 100755
--- a/source/n/nc/nc.SlackBuild
+++ b/source/n/nc/nc.SlackBuild
@@ -55,6 +55,9 @@ else
SLKCFLAGS="-O2"
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration -Wno-error=implicit-int"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-nc
rm -rf $PKG
diff --git a/source/n/ncftp/ncftp.SlackBuild b/source/n/ncftp/ncftp.SlackBuild
index a749c0eb2..2daf6f2c1 100755
--- a/source/n/ncftp/ncftp.SlackBuild
+++ b/source/n/ncftp/ncftp.SlackBuild
@@ -47,13 +47,13 @@ fi
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686 -fcommon"
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686 -fcommon -std=gnu90"
elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2 -fcommon"
+ SLKCFLAGS="-O2 -fcommon -std=gnu90"
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC -fcommon"
+ SLKCFLAGS="-O2 -fPIC -fcommon -std=gnu90"
else
- SLKCFLAGS="-O2 -fcommon"
+ SLKCFLAGS="-O2 -fcommon -std=gnu90"
fi
TMP=${TMP:-/tmp}
diff --git a/source/n/netdate/netdate.SlackBuild b/source/n/netdate/netdate.SlackBuild
index b84d4d69a..16f6a7d93 100755
--- a/source/n/netdate/netdate.SlackBuild
+++ b/source/n/netdate/netdate.SlackBuild
@@ -56,6 +56,7 @@ cd netdate || exit 1
zcat $CWD/netdate.diff.gz | patch -p1 --backup || exit
zcat $CWD/netdate.diff2.gz | patch -p1 --backup || exit
+zcat $CWD/netdate.gcc14.diff.gz | patch -p1 --backup || exit
chown -R root:root .
find . \
diff --git a/source/n/netdate/netdate.gcc14.diff b/source/n/netdate/netdate.gcc14.diff
new file mode 100644
index 000000000..7478afb22
--- /dev/null
+++ b/source/n/netdate/netdate.gcc14.diff
@@ -0,0 +1,11 @@
+--- ./Makefile.orig 2024-05-11 13:17:31.232871231 -0500
++++ ./Makefile 2024-05-11 13:18:04.399871973 -0500
+@@ -3,7 +3,7 @@
+
+ WARNINGS=-Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual \
+ -Wstrict-prototypes -Wmissing-prototypes \
+- -Wmissing-declarations -Wnested-externs -Winline -Wcast-align
++ -Wmissing-declarations -Wnested-externs -Winline -Wcast-align -Wno-error=implicit-int
+
+ CFLAGS = -g $(WARNINGS)
+
diff --git a/source/n/netkit-rsh/netkit-rsh.SlackBuild b/source/n/netkit-rsh/netkit-rsh.SlackBuild
index 92a1541f0..cf92c6f99 100755
--- a/source/n/netkit-rsh/netkit-rsh.SlackBuild
+++ b/source/n/netkit-rsh/netkit-rsh.SlackBuild
@@ -60,7 +60,7 @@ zcat $CWD/netkit-rsh.arg_max.diff.gz | patch -p1 -l --verbose || exit 1
zcat $CWD/netkit-rsh.union_wait.diff.gz | patch -p1 -l --verbose || exit 1
zcat $CWD/netkit-rsh.auth.c.stddef.diff.gz | patch -p1 -l --verbose || exit 1
chown -R root:root .
-./configure --prefix=/usr || exit 1
+CC="gcc -std=gnu89" ./configure --prefix=/usr || exit 1
make || exit 1
cd rsh
strip rsh
diff --git a/source/n/netkit-rusers/netkit-rusers.SlackBuild b/source/n/netkit-rusers/netkit-rusers.SlackBuild
index e0ca90e6c..96047f507 100755
--- a/source/n/netkit-rusers/netkit-rusers.SlackBuild
+++ b/source/n/netkit-rusers/netkit-rusers.SlackBuild
@@ -55,7 +55,7 @@ tar xzvf $CWD/netkit-rusers-$VERSION.tar.gz
cd netkit-rusers-$VERSION
chown -R root:root .
zcat $CWD/netkit-rusers-0.17.diff.gz | patch -p1 || exit 1
-./configure --prefix=/usr
+CC="gcc -std=gnu89" ./configure --prefix=/usr
# Fixes for libtirpc:
sed -i -e 's/Winline/Winline -I\/usr\/include\/tirpc/' MCONFIG
diff --git a/source/n/netkit-rwho/netkit-rwho.SlackBuild b/source/n/netkit-rwho/netkit-rwho.SlackBuild
index 89c4e8b17..277ccaa63 100755
--- a/source/n/netkit-rwho/netkit-rwho.SlackBuild
+++ b/source/n/netkit-rwho/netkit-rwho.SlackBuild
@@ -44,6 +44,9 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
exit 0
fi
+# GCC 14 "fix":
+export CFLAGS="-Wno-error=incompatible-pointer-types"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-netkit-rwho
diff --git a/source/n/netkit-timed/netkit-timed.SlackBuild b/source/n/netkit-timed/netkit-timed.SlackBuild
index 569105a38..b34c18315 100755
--- a/source/n/netkit-timed/netkit-timed.SlackBuild
+++ b/source/n/netkit-timed/netkit-timed.SlackBuild
@@ -55,7 +55,7 @@ tar xzvf $CWD/netkit-timed-$VERSION.tar.gz || exit 1
cd netkit-timed-$VERSION
chown -R root:root .
zcat $CWD/netkit-timed-0.17.diff.gz | patch -p1 --backup --verbose --suffix=.orig -E || exit
-CFLAGS="-DCLK_TCK=CLOCKS_PER_SEC" ./configure --prefix=/usr
+CFLAGS="-DCLK_TCK=CLOCKS_PER_SEC -Wno-error=incompatible-pointer-types" ./configure --prefix=/usr
make || exit 1
cd timed/timed
strip timed
diff --git a/source/n/netpipes/netpipes.SlackBuild b/source/n/netpipes/netpipes.SlackBuild
index 43d6c7e92..f5e9a5db1 100755
--- a/source/n/netpipes/netpipes.SlackBuild
+++ b/source/n/netpipes/netpipes.SlackBuild
@@ -57,6 +57,7 @@ echo "+==============+"
echo "| netpipes-$VERSION |"
echo "+==============+"
cd $TMP
+rm -rf netpipes-${VERSION}-export
tar xvf $CWD/netpipes-${VERSION}-export.tar.gz || exit 1
cd netpipes-${VERSION}-export
mkdir -p $PKG/usr/doc/netpipes-${VERSION}-export
@@ -64,7 +65,7 @@ cp -a COPYING README *.html $PKG/usr/doc/netpipes-${VERSION}-export
chown root:root $PKG/usr/doc/netpipes-${VERSION}-export/*
chmod 644 $PKG/usr/doc/netpipes-${VERSION}-export/*
-make || exit 1
+CC="gcc -std=gnu89" make || exit 1
strip encapsulate faucet getpeername hose sockdown timelimit
for file in encapsulate faucet getpeername hose sockdown timelimit ; do
diff --git a/source/n/netwatch/netwatch.SlackBuild b/source/n/netwatch/netwatch.SlackBuild
index 620fab9fe..4d32c16ef 100755
--- a/source/n/netwatch/netwatch.SlackBuild
+++ b/source/n/netwatch/netwatch.SlackBuild
@@ -57,6 +57,9 @@ else
SLKCFLAGS="-O2 -fcommon"
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int -Wno-error=implicit-function-declaration"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-netwatch
rm -rf $PKG
diff --git a/source/n/nn/nn.SlackBuild b/source/n/nn/nn.SlackBuild
index 88fd1c6bd..ab9c7a257 100755
--- a/source/n/nn/nn.SlackBuild
+++ b/source/n/nn/nn.SlackBuild
@@ -58,6 +58,9 @@ else
MFILE="m-i80386.h"
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-nn
diff --git a/source/n/ntp/ntp.SlackBuild b/source/n/ntp/ntp.SlackBuild
index 1155df285..4433a4b35 100755
--- a/source/n/ntp/ntp.SlackBuild
+++ b/source/n/ntp/ntp.SlackBuild
@@ -56,6 +56,9 @@ else
SLKCFLAGS="-O2"
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=int-conversion"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-ntp
diff --git a/source/n/obexftp/obexftp.SlackBuild b/source/n/obexftp/obexftp.SlackBuild
index d63c6dd6f..2e68f31f9 100755
--- a/source/n/obexftp/obexftp.SlackBuild
+++ b/source/n/obexftp/obexftp.SlackBuild
@@ -62,6 +62,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+export CC="gcc -Wno-error=int-conversion -Wno-error=implicit-function-declaration"
+
PYTHON3LIB=$( python3 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())' )
rm -rf $PKG
diff --git a/source/n/openldap/openldap.SlackBuild b/source/n/openldap/openldap.SlackBuild
index 4eab73442..783526f36 100755
--- a/source/n/openldap/openldap.SlackBuild
+++ b/source/n/openldap/openldap.SlackBuild
@@ -68,6 +68,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
diff --git a/source/n/php/php.SlackBuild b/source/n/php/php.SlackBuild
index a37ab12dd..425dc4ed8 100755
--- a/source/n/php/php.SlackBuild
+++ b/source/n/php/php.SlackBuild
@@ -75,6 +75,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types"
+
# Look for Kerberos on the machine and in any precompiled c-client.a:
if /bin/ls /lib${LIBDIRSUFFIX}/libkrb5.so.? 1> /dev/null 2> /dev/null ; then
# Remove the c-client library if it doesn't contain Kerberos support:
diff --git a/source/n/pidentd/pidentd.SlackBuild b/source/n/pidentd/pidentd.SlackBuild
index 56ba4a1a3..c1bae462a 100755
--- a/source/n/pidentd/pidentd.SlackBuild
+++ b/source/n/pidentd/pidentd.SlackBuild
@@ -66,7 +66,7 @@ find . \
zcat $CWD/pidentd.conf.diff.gz | patch -p1 --backup --verbose || exit 1
zcat $CWD/pidentd.openssl-1.1.diff.gz | patch -p1 --backup --verbose || exit 1
-CFLAGS=-O2 \
+CFLAGS="-O2 -Wno-error=implicit-function-declaration" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
diff --git a/source/n/popa3d/popa3d.SlackBuild b/source/n/popa3d/popa3d.SlackBuild
index c3cd6543b..43ff60c2d 100755
--- a/source/n/popa3d/popa3d.SlackBuild
+++ b/source/n/popa3d/popa3d.SlackBuild
@@ -63,6 +63,8 @@ else
zcat $CWD/popa3d.shadow.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
fi
+zcat $CWD/popa3d.gcc14.diff.gz | patch -p1 --verbose || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff --git a/source/n/popa3d/popa3d.gcc14.diff b/source/n/popa3d/popa3d.gcc14.diff
new file mode 100644
index 000000000..932b57741
--- /dev/null
+++ b/source/n/popa3d/popa3d.gcc14.diff
@@ -0,0 +1,11 @@
+--- ./Makefile.orig 2024-05-11 14:15:26.383948970 -0500
++++ ./Makefile 2024-05-11 14:16:03.483949800 -0500
+@@ -3,7 +3,7 @@
+ RM = rm -f
+ MKDIR = mkdir -p
+ INSTALL = install -c
+-CFLAGS = -Wall -O2 -fomit-frame-pointer
++CFLAGS = -Wall -O2 -fomit-frame-pointer -Wno-error=implicit-function-declaration -Wno-error=int-conversion
+ # You may use OpenSSL's MD5 routines instead of the ones supplied here
+ CFLAGS += -DHAVE_OPENSSL
+ LDFLAGS = -s
diff --git a/source/n/ppp/ppp.SlackBuild b/source/n/ppp/ppp.SlackBuild
index 9504fca35..a71345dbd 100755
--- a/source/n/ppp/ppp.SlackBuild
+++ b/source/n/ppp/ppp.SlackBuild
@@ -82,6 +82,8 @@ rm -f include/linux/if_pppol2tp.h
zcat $CWD/ppp.CVE-2015-3310.diff.gz | patch -p1 --verbose || exit 1
+cat $CWD/ppp.gcc14.diff | patch -p1 --verbose || exit 1
+
# Choose correct options depending on whether PAM is installed:
if [ -L /lib${LIBDIRSUFFIX}/libpam.so.? ]; then
PAM_OPTIONS="USE_PAM=y"
diff --git a/source/n/ppp/ppp.gcc14.diff b/source/n/ppp/ppp.gcc14.diff
new file mode 100644
index 000000000..a8c12efc8
--- /dev/null
+++ b/source/n/ppp/ppp.gcc14.diff
@@ -0,0 +1,11 @@
+--- ./configure.orig 2021-01-04 17:06:37.000000000 -0600
++++ ./configure 2024-05-10 20:18:35.477503626 -0500
+@@ -20,7 +20,7 @@
+ makext="linux";
+ ksrc="linux";
+ state="known";
+- CFLAGS="-O2 -g -pipe";;
++ CFLAGS="-O2 -g -pipe -Wno-error=incompatible-pointer-types";;
+ SunOS)
+ karch=`/usr/bin/isainfo -k`
+ case $release in
diff --git a/source/n/procmail/procmail.SlackBuild b/source/n/procmail/procmail.SlackBuild
index 8e8821ad6..ab6ce8440 100755
--- a/source/n/procmail/procmail.SlackBuild
+++ b/source/n/procmail/procmail.SlackBuild
@@ -57,7 +57,10 @@ cd $TMP
rm -rf procmail-$VERSION
tar xvf $CWD/procmail-$VERSION.tar.?z || exit 1
cd procmail-$VERSION || exit 1
+
zcat $CWD/procmail.lfs.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/procmail.gcc14.diff.gz | patch -p1 --verbose || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff --git a/source/n/procmail/procmail.gcc14.diff b/source/n/procmail/procmail.gcc14.diff
new file mode 100644
index 000000000..1fcc8fd26
--- /dev/null
+++ b/source/n/procmail/procmail.gcc14.diff
@@ -0,0 +1,12 @@
+--- ./Makefile.orig 2024-05-11 14:25:05.399961923 -0500
++++ ./Makefile 2024-05-11 14:25:19.301962234 -0500
+@@ -86,7 +86,8 @@
+ #-Wimplicit -Wshadow -Wid-clash-6 #-Wuninitialized
+
+ # The place to put your favourite extra cc flag
+-CFLAGS0 = -O -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 #$(GCC_WARNINGS)
++CFLAGS0 = -O -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wno-error=implicit-int -Wno-error=implicit-function-declaration #$(GCC_WARNINGS)
++
+ LDFLAGS0= -s
+ # Read my libs :-)
+ LIBS=
diff --git a/source/n/rp-pppoe/rp-pppoe.SlackBuild b/source/n/rp-pppoe/rp-pppoe.SlackBuild
index d777bfebc..a0e0d04b0 100755
--- a/source/n/rp-pppoe/rp-pppoe.SlackBuild
+++ b/source/n/rp-pppoe/rp-pppoe.SlackBuild
@@ -56,6 +56,9 @@ else
SLKCFLAGS="-O2"
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-rp-pppoe
diff --git a/source/n/slrn/slrn.SlackBuild b/source/n/slrn/slrn.SlackBuild
index ff6225c5b..060d751d4 100755
--- a/source/n/slrn/slrn.SlackBuild
+++ b/source/n/slrn/slrn.SlackBuild
@@ -60,6 +60,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-slrn
rm -rf $PKG
diff --git a/source/n/tcp_wrappers/tcp_wrappers.SlackBuild b/source/n/tcp_wrappers/tcp_wrappers.SlackBuild
index 8ab33d2d8..17ed0da43 100755
--- a/source/n/tcp_wrappers/tcp_wrappers.SlackBuild
+++ b/source/n/tcp_wrappers/tcp_wrappers.SlackBuild
@@ -74,7 +74,7 @@ sh extract-and-patch.sh
cd tcp_wrappers_$VERSION || exit 1
# Fix for glibc-2.32:
sed -i "s/-DHAVE_WEAKSYMS/-DHAVE_WEAKSYMS -DHAVE_STRERROR/g" Makefile
-make REAL_DAEMON_DIR=/usr/sbin linux || exit 1
+make CC="gcc -std=gnu90" REAL_DAEMON_DIR=/usr/sbin linux || exit 1
strip tcpd safe_finger tcpdchk tcpdmatch try-from
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
cat libwrap.a > $PKG/usr/lib${LIBDIRSUFFIX}/libwrap.a
diff --git a/source/n/telnet/telnet.SlackBuild b/source/n/telnet/telnet.SlackBuild
index 2857a17c8..efddb6512 100755
--- a/source/n/telnet/telnet.SlackBuild
+++ b/source/n/telnet/telnet.SlackBuild
@@ -57,6 +57,7 @@ cd netkit-telnet-$VERSION || exit 1
chown -R root:root .
zcat $CWD/netkit-telnet-0.17.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
zcat $CWD/netkit-telnet-0.17-ayt.patch.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+CFLAGS="-Wno-error=implicit-int" \
./configure --prefix=/usr || exit 1
cd telnetd
make || exit 1
diff --git a/source/n/tftp-hpa/tftp-hpa.SlackBuild b/source/n/tftp-hpa/tftp-hpa.SlackBuild
index d31ad247d..9d4bc95c8 100755
--- a/source/n/tftp-hpa/tftp-hpa.SlackBuild
+++ b/source/n/tftp-hpa/tftp-hpa.SlackBuild
@@ -67,6 +67,9 @@ find . \
# Add -fcommon to CFLAGS:
zcat $CWD/tftp-hpa.fcommon.diff.gz | patch -p1 --verbose || exit 1
+# Unerror what was a warning prior to GCC 14:
+zcat $CWD/tftp-hpa.gcc14.diff.gz | patch -p1 --verbose || exit 1
+
./configure --prefix=/usr
make $NUMJOBS || make || exit 1
diff --git a/source/n/tftp-hpa/tftp-hpa.gcc14.diff b/source/n/tftp-hpa/tftp-hpa.gcc14.diff
new file mode 100644
index 000000000..2b786cb79
--- /dev/null
+++ b/source/n/tftp-hpa/tftp-hpa.gcc14.diff
@@ -0,0 +1,11 @@
+--- ./MCONFIG.in.orig 2024-05-12 00:09:10.358745878 -0500
++++ ./MCONFIG.in 2024-05-12 00:10:29.981747659 -0500
+@@ -51,7 +51,7 @@
+
+ # Compiler and compiler flags
+ CC = @CC@
+-CFLAGS = @CFLAGS@ -I$(SRCROOT) -fcommon
++CFLAGS = @CFLAGS@ -I$(SRCROOT) -fcommon -Wno-error=implicit-function-declaration
+
+ # Link flags
+ LDFLAGS = @LDFLAGS@
diff --git a/source/n/uucp/uucp-configure-c99.patch b/source/n/uucp/uucp-configure-c99.patch
new file mode 100644
index 000000000..480d6225a
--- /dev/null
+++ b/source/n/uucp/uucp-configure-c99.patch
@@ -0,0 +1,140 @@
+Fix several C99 compatibility issues in the configure script. Most
+of them are specific to the uucp package.
+
+Submitted upstream: <https://savannah.gnu.org/bugs/index.php?63647>
+
+diff --git a/configure b/configure
+index 4cced27226101612..77336b5f0a1ba20d 100755
+--- a/configure
++++ b/configure
+@@ -1280,7 +1280,7 @@ cat > conftest.$ac_ext << EOF
+ #line 1281 "configure"
+ #include "confdefs.h"
+
+-main(){return(0);}
++int main(){return(0);}
+ EOF
+ if { (eval echo configure:1286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+@@ -3025,6 +3025,7 @@ else
+ cat > conftest.$ac_ext <<EOF
+ #line 3027 "configure"
+ #include "confdefs.h"
++extern void exit ();
+
+ int main() {
+ extern void foo (); (void) exit (0);
+@@ -3153,6 +3154,7 @@ else
+ cat > conftest.$ac_ext <<EOF
+ #line 3155 "configure"
+ #include "confdefs.h"
++#include <string.h>
+
+ int main() {
+ char *i; int j, k; memset(i, j, k);
+@@ -3185,6 +3187,7 @@ else
+ cat > conftest.$ac_ext <<EOF
+ #line 3187 "configure"
+ #include "confdefs.h"
++#include <string.h>
+
+ int main() {
+ char *i, *j; int k; memcmp(i, j, k);
+@@ -3217,6 +3220,7 @@ else
+ cat > conftest.$ac_ext <<EOF
+ #line 3219 "configure"
+ #include "confdefs.h"
++#include <string.h>
+
+ int main() {
+ char *i, *j; int k; memcpy(i, j, k);
+@@ -3894,7 +3898,7 @@ else
+
+ #include <sys/types.h>
+ #include <sys/timeb.h>
+-main ()
++int main ()
+ {
+ struct timeb s, slast;
+ int c = 0;
+@@ -3904,13 +3908,13 @@ main ()
+ ftime (&s);
+ if (s.time < slast.time
+ || (s.time == slast.time && s.millitm < slast.millitm))
+- exit (1);
++ return 1;
+ if (s.time != slast.time)
+ ++c;
+ slast.time = s.time;
+ slast.millitm = s.millitm;
+ }
+- exit (0);
++ return 0;
+ }
+
+ EOF
+diff --git a/configure.in b/configure.in
+index 452cf793f9ecc575..a788d07d123c7744 100644
+--- a/configure.in
++++ b/configure.in
+@@ -278,7 +278,7 @@ fi
+ dnl
+ AC_MSG_CHECKING(for void)
+ AC_CACHE_VAL(uucp_cv_c_void,
+-[AC_TRY_COMPILE([], [extern void foo (); (void) exit (0);],
++[AC_TRY_COMPILE([extern void exit ();], [extern void foo (); (void) exit (0);],
+ uucp_cv_c_void=yes, uucp_cv_c_void=no)])
+ AC_MSG_RESULT($uucp_cv_c_void)
+ if test $uucp_cv_c_void = yes; then
+@@ -318,7 +318,7 @@ dnl On some systems, memset, memcmp, and memcpy must be called with
+ dnl the right number of arguments.
+ AC_MSG_CHECKING(for memset)
+ AC_CACHE_VAL(ac_cv_func_memset,
+-[AC_TRY_LINK([], [ char *i; int j, k; memset(i, j, k); ],
++[AC_TRY_LINK([#include <string.h>], [ char *i; int j, k; memset(i, j, k); ],
+ ac_cv_func_memset=yes, ac_cv_func_memset=no)])
+ AC_MSG_RESULT($ac_cv_func_memset)
+ if test $ac_cv_func_memset = yes; then
+@@ -327,7 +327,7 @@ fi
+ dnl
+ AC_MSG_CHECKING(for memcmp)
+ AC_CACHE_VAL(ac_cv_func_memcmp,
+-[AC_TRY_LINK([], [ char *i, *j; int k; memcmp(i, j, k); ],
++[AC_TRY_LINK([#include <string.h>], [ char *i, *j; int k; memcmp(i, j, k); ],
+ ac_cv_func_memcmp=yes, ac_cv_func_memcmp=no)])
+ AC_MSG_RESULT($ac_cv_func_memcmp)
+ if test $ac_cv_func_memcmp = yes; then
+@@ -336,7 +336,7 @@ fi
+ dnl
+ AC_MSG_CHECKING(for memcpy)
+ AC_CACHE_VAL(ac_cv_func_memcpy,
+-[AC_TRY_LINK([], [ char *i, *j; int k; memcpy(i, j, k); ],
++[AC_TRY_LINK([#include <string.h>], [ char *i, *j; int k; memcpy(i, j, k); ],
+ ac_cv_func_memcpy=yes, ac_cv_func_memcpy=no)])
+ AC_MSG_RESULT($ac_cv_func_memcpy)
+ if test $ac_cv_func_memcpy = yes; then
+@@ -373,7 +373,7 @@ AC_CACHE_VAL(uucp_cv_sys_ftime_ok,
+ [AC_TRY_RUN([
+ #include <sys/types.h>
+ #include <sys/timeb.h>
+-main ()
++int main ()
+ {
+ struct timeb s, slast;
+ int c = 0;
+@@ -383,13 +383,13 @@ main ()
+ ftime (&s);
+ if (s.time < slast.time
+ || (s.time == slast.time && s.millitm < slast.millitm))
+- exit (1);
++ return 1;
+ if (s.time != slast.time)
+ ++c;
+ slast.time = s.time;
+ slast.millitm = s.millitm;
+ }
+- exit (0);
++ return 0;
+ }
+ ],
+ uucp_cv_sys_ftime_ok=yes,
diff --git a/source/n/uucp/uucp.SlackBuild b/source/n/uucp/uucp.SlackBuild
index f27d57555..1cd43740d 100755
--- a/source/n/uucp/uucp.SlackBuild
+++ b/source/n/uucp/uucp.SlackBuild
@@ -54,6 +54,9 @@ else
SLKCFLAGS="-O2"
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int -Wno-error=incompatible-pointer-types"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-uucp
@@ -68,6 +71,9 @@ cd $TMP
rm -rf uucp-$VERSION
tar xvf $CWD/uucp-$VERSION.tar.gz || exit 1
cd uucp-$VERSION || exit 1
+
+cat $CWD/uucp-configure-c99.patch | patch -p1 --verbose || exit 1
+
zcat $CWD/policy.h.diff.gz | patch -p1 --verbose || exit 1
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/source/tcl/expect/expect.SlackBuild b/source/tcl/expect/expect.SlackBuild
index 2a179b50c..fbc7e740f 100755
--- a/source/tcl/expect/expect.SlackBuild
+++ b/source/tcl/expect/expect.SlackBuild
@@ -65,6 +65,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types"
+
cd $TMP
rm -rf ${PKGNAM}${VERSION}
tar xvf $CWD/${PKGNAM}$VERSION.tar.?z || exit 1
diff --git a/source/tcl/hfsutils/hfsutils.SlackBuild b/source/tcl/hfsutils/hfsutils.SlackBuild
index 5354de67f..5c9907711 100755
--- a/source/tcl/hfsutils/hfsutils.SlackBuild
+++ b/source/tcl/hfsutils/hfsutils.SlackBuild
@@ -79,6 +79,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types"
+
# Configure:
CFLAGS="$SLKCFLAGS" \
CPPFLAGS="-DUSE_INTERP_RESULT" \
diff --git a/source/tcl/tix/tix.SlackBuild b/source/tcl/tix/tix.SlackBuild
index c6e86a47f..6adcdda1a 100755
--- a/source/tcl/tix/tix.SlackBuild
+++ b/source/tcl/tix/tix.SlackBuild
@@ -58,6 +58,9 @@ elif [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-${PKGNAM}
rm -rf $PKG
diff --git a/source/x/OpenCC/3b2441b8.patch b/source/x/OpenCC/3b2441b8.patch
new file mode 100644
index 000000000..0799d22aa
--- /dev/null
+++ b/source/x/OpenCC/3b2441b8.patch
@@ -0,0 +1,22 @@
+From 3b2441b87f99ab65f37b141a7b548ebadb607b96 Mon Sep 17 00:00:00 2001
+From: Janusz Chorko <janusz.chorko@apdu.pl>
+Date: Fri, 26 Aug 2016 21:17:38 +0200
+Subject: [PATCH] Removed non-compiling assignment operator. Fixed #718
+
+---
+ include/rapidjson/document.h | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h
+index e3e20dfbd..b0f1f70be 100644
+--- a/include/rapidjson/document.h
++++ b/include/rapidjson/document.h
+@@ -316,8 +316,6 @@ struct GenericStringRef {
+
+ GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}
+
+- GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
+-
+ //! implicit conversion to plain CharType pointer
+ operator const Ch *() const { return s; }
+
diff --git a/source/x/OpenCC/OpenCC.SlackBuild b/source/x/OpenCC/OpenCC.SlackBuild
index da26ff8ff..5e3f86c92 100755
--- a/source/x/OpenCC/OpenCC.SlackBuild
+++ b/source/x/OpenCC/OpenCC.SlackBuild
@@ -78,6 +78,11 @@ rm -rf OpenCC-ver.$VERSION
tar xvf $CWD/OpenCC-ver.$VERSION.tar.?z || exit 1
cd OpenCC-ver.$VERSION || exit 1
+# GCC 14 fix:
+pushd deps/rapidjson-1.1.0/rapidjson
+ cat $CWD/3b2441b8.patch | patch -p3 --verbose || exit 1
+popd
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff --git a/source/x/compiz/compiz.SlackBuild b/source/x/compiz/compiz.SlackBuild
index 9e34a28ac..de9111f2e 100755
--- a/source/x/compiz/compiz.SlackBuild
+++ b/source/x/compiz/compiz.SlackBuild
@@ -67,6 +67,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
diff --git a/source/x/ibus-kkc/ibus-kkc.SlackBuild b/source/x/ibus-kkc/ibus-kkc.SlackBuild
index b3cdc91f1..0bde5da2c 100755
--- a/source/x/ibus-kkc/ibus-kkc.SlackBuild
+++ b/source/x/ibus-kkc/ibus-kkc.SlackBuild
@@ -63,6 +63,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types"
+
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
diff --git a/source/x/libXaw3dXft/libXaw3dXft.SlackBuild b/source/x/libXaw3dXft/libXaw3dXft.SlackBuild
index 49fbdb5e6..7da1ed5f0 100755
--- a/source/x/libXaw3dXft/libXaw3dXft.SlackBuild
+++ b/source/x/libXaw3dXft/libXaw3dXft.SlackBuild
@@ -58,6 +58,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
diff --git a/source/x/libgee/libgee.SlackBuild b/source/x/libgee/libgee.SlackBuild
index 832fa2233..7c31b5b3a 100755
--- a/source/x/libgee/libgee.SlackBuild
+++ b/source/x/libgee/libgee.SlackBuild
@@ -61,6 +61,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types"
+
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
diff --git a/source/x/libkkc/libkkc.SlackBuild b/source/x/libkkc/libkkc.SlackBuild
index 0db5617af..96007dabb 100755
--- a/source/x/libkkc/libkkc.SlackBuild
+++ b/source/x/libkkc/libkkc.SlackBuild
@@ -60,6 +60,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types -Wno-error=int-conversion"
+
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
diff --git a/source/x/motif/motif.SlackBuild b/source/x/motif/motif.SlackBuild
index 27091980f..e741004fd 100755
--- a/source/x/motif/motif.SlackBuild
+++ b/source/x/motif/motif.SlackBuild
@@ -70,6 +70,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
diff --git a/source/x/x11/configure/xf86-video-nouveau b/source/x/x11/configure/xf86-video-nouveau
index a9dcd059b..7e378ee13 100644
--- a/source/x/x11/configure/xf86-video-nouveau
+++ b/source/x/x11/configure/xf86-video-nouveau
@@ -1,4 +1,4 @@
-CFLAGS=$SLKCFLAGS \
+CFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration" \
CXXFLAGS=$SLKCFLAGS \
./autogen.sh \
--prefix=/usr \
diff --git a/source/xap/MPlayer/MPlayer.SlackBuild b/source/xap/MPlayer/MPlayer.SlackBuild
index 44df8d0ff..f4eb6b5b3 100755
--- a/source/xap/MPlayer/MPlayer.SlackBuild
+++ b/source/xap/MPlayer/MPlayer.SlackBuild
@@ -272,6 +272,7 @@ echo Building ...
--disable-ffmpeg_a \
--codecsdir=${CODECSDIR} \
--language="${LANGUAGES}" \
+ --extra-cflags="-Wno-error=incompatible-pointer-types -Wno-error=int-conversion" \
${EXTRACONFIGUREOPTIONS} \
${DO_PATENTED} || exit 1
diff --git a/source/xap/electricsheep/electricsheep.SlackBuild b/source/xap/electricsheep/electricsheep.SlackBuild
index 0c151d0e5..d513e8c41 100755
--- a/source/xap/electricsheep/electricsheep.SlackBuild
+++ b/source/xap/electricsheep/electricsheep.SlackBuild
@@ -140,6 +140,9 @@ case "$ARCH" in
;;
esac
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types -Wno-error=implicit-function-declaration"
+
# Create working directories:
mkdir -p $OUTPUT # place for the package to be saved
mkdir -p $TMP/tmp-$PKGNAM # location to build the source
@@ -205,6 +208,9 @@ cd client
# We do not use gnome:
cat $SRCDIR/electricsheep_gnome-open.patch | patch -p1 --verbose \
2>&1 | tee $OUTPUT/patch-$PKGNAM.log
+ # This optimization is broken, oh well
+ cat $SRCDIR/electricsheep.evil.gcc14.diff | patch -p2 --verbose \
+ 2>&1 | tee $OUTPUT/patch-$PKGNAM.log
# Prevent install errors due to missing gnome
sed -i -e "/^install-data-local:/,/^$/d" Makefile.in
LDFLAGS="$SLKLDFLAGS" \
diff --git a/source/xap/electricsheep/electricsheep.evil.gcc14.diff b/source/xap/electricsheep/electricsheep.evil.gcc14.diff
new file mode 100644
index 000000000..981a4814f
--- /dev/null
+++ b/source/xap/electricsheep/electricsheep.evil.gcc14.diff
@@ -0,0 +1,11 @@
+--- ./client/ffmpeg/libavcodec/bitstream.h.orig 2024-05-10 17:20:22.784264430 -0500
++++ ./client/ffmpeg/libavcodec/bitstream.h 2024-05-10 17:20:14.597264247 -0500
+@@ -53,7 +53,7 @@
+
+ extern const uint8_t ff_reverse[256];
+
+-#if defined(ARCH_X86)
++#if defined(ARCH_X8666)
+ // avoid +32 for shift optimization (gcc should do that ...)
+ static inline int32_t NEG_SSR32( int32_t a, int8_t s){
+ asm ("sarl %1, %0\n\t"
diff --git a/source/xap/freerdp/freerdp.SlackBuild b/source/xap/freerdp/freerdp.SlackBuild
index 21e78ee05..32dd124a9 100755
--- a/source/xap/freerdp/freerdp.SlackBuild
+++ b/source/xap/freerdp/freerdp.SlackBuild
@@ -67,6 +67,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types -Wno-error=int-conversion"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
diff --git a/source/xap/fvwm/fvwm.SlackBuild b/source/xap/fvwm/fvwm.SlackBuild
index 5a41c9c3a..9de111625 100755
--- a/source/xap/fvwm/fvwm.SlackBuild
+++ b/source/xap/fvwm/fvwm.SlackBuild
@@ -60,6 +60,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types -Wno-error=int-conversion"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
diff --git a/source/xap/gftp/gftp.SlackBuild b/source/xap/gftp/gftp.SlackBuild
index 9431f3ac4..7d42bd65b 100755
--- a/source/xap/gftp/gftp.SlackBuild
+++ b/source/xap/gftp/gftp.SlackBuild
@@ -55,6 +55,9 @@ elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-gftp
diff --git a/source/xap/gimp/gimp.SlackBuild b/source/xap/gimp/gimp.SlackBuild
index 3c54f1cd9..55fe46b4a 100755
--- a/source/xap/gimp/gimp.SlackBuild
+++ b/source/xap/gimp/gimp.SlackBuild
@@ -65,6 +65,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types"
+
cd $TMP
rm -rf gimp-$VERSION
tar xvf $CWD/gimp-$VERSION.tar.?z || exit 1
diff --git a/source/xap/gnuchess/gnuchess.SlackBuild b/source/xap/gnuchess/gnuchess.SlackBuild
index a0be62186..cac5e2091 100755
--- a/source/xap/gnuchess/gnuchess.SlackBuild
+++ b/source/xap/gnuchess/gnuchess.SlackBuild
@@ -65,6 +65,9 @@ PKG=/tmp/package-gnuchess
rm -rf $PKG
mkdir -p $TMP $PKG
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-int -Wno-error=implicit-function-declaration"
+
### gnuchess
cd $TMP
rm -rf gnuchess-$VERGNUCHESS
diff --git a/source/xap/pidgin/pidgin.SlackBuild b/source/xap/pidgin/pidgin.SlackBuild
index 18362ef80..627d1b1bf 100755
--- a/source/xap/pidgin/pidgin.SlackBuild
+++ b/source/xap/pidgin/pidgin.SlackBuild
@@ -74,6 +74,9 @@ else
ARCHQUADLET=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=int-conversion"
+
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z || exit 1
@@ -173,6 +176,8 @@ done
PIDGIN_LIBS="-L${PKG}/usr/lib${LIBDIRSUFFIX}" \
PURPLE_CFLAGS="-I${PKG}/usr/include/libpurple" \
PURPLE_LIBS="-L${PKG}/usr/lib${LIBDIRSUFFIX}" \
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
diff --git a/source/xap/rdesktop/rdesktop.SlackBuild b/source/xap/rdesktop/rdesktop.SlackBuild
index 63086bb5b..ce1b5235f 100755
--- a/source/xap/rdesktop/rdesktop.SlackBuild
+++ b/source/xap/rdesktop/rdesktop.SlackBuild
@@ -55,6 +55,9 @@ elif [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=incompatible-pointer-types"
+
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
TMP=${TMP:-/tmp}
diff --git a/source/xap/sane/sane.SlackBuild b/source/xap/sane/sane.SlackBuild
index 3e700ba30..472aa849b 100755
--- a/source/xap/sane/sane.SlackBuild
+++ b/source/xap/sane/sane.SlackBuild
@@ -62,6 +62,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-sane
diff --git a/source/xap/seyon/seyon.SlackBuild b/source/xap/seyon/seyon.SlackBuild
index ae3087113..9b478f420 100755
--- a/source/xap/seyon/seyon.SlackBuild
+++ b/source/xap/seyon/seyon.SlackBuild
@@ -93,7 +93,7 @@ sed -i "s/getline/seyon_getline/g" *
chmod 755 makever.sh
xmkmf
# Add -fcommon to CFLAGS:
-sed -i -e 's/-fno-strict-aliasing/-fno-strict-aliasing -fcommon/' Makefile
+sed -i -e 's/-fno-strict-aliasing/-fno-strict-aliasing -fcommon -Wno-error=implicit-function-declaration/' Makefile
make || exit 1
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/X11
diff --git a/source/xap/xgames/xgames.SlackBuild b/source/xap/xgames/xgames.SlackBuild
index bcccbb5b3..52b817910 100755
--- a/source/xap/xgames/xgames.SlackBuild
+++ b/source/xap/xgames/xgames.SlackBuild
@@ -58,6 +58,7 @@ cd spider || exit 1
zcat $CWD/spider.diff.gz | patch -p1 --verbose || exit 1
xmkmf
zcat $CWD/spider.gcc10.diff.gz | patch -p1 --verbose || exit 1
+sed -i "s| CFLAGS = | CFLAGS = -Wno-error=implicit-int -Wno-error=implicit-function-declaration -Wno-error=return-mismatch |g" Makefile
make $NUMJOBS || make || exit 1
mkdir -p $PKG/usr/bin
cat spider > $PKG/usr/bin/spider
@@ -72,6 +73,7 @@ tar xvf $CWD/maze.tar.lz || exit 1
cd maze || exit 1
zcat $CWD/maze.diff.gz | patch -p1 || exit 1
xmkmf
+sed -i "s| CFLAGS = | CFLAGS = -Wno-error=implicit-int -Wno-error=implicit-function-declaration -Wno-error=return-mismatch -Wno-error=int-conversion |g" Makefile
make $NUMJOBS || make || exit 1
cat maze > $PKG/usr/bin/maze
cat maze.man | gzip -9c > $PKG/usr/man/man6/maze.6.gz
@@ -83,6 +85,7 @@ cd $TMP
tar xvf $CWD/xcolormap.tar.lz || exit 1
cd xcolormap || exit 1
zcat $CWD/xcolormap.diff.gz | patch -p1 || exit 1
+sed -i "s|CFLAGS = |CFLAGS = -Wno-error=implicit-int -Wno-error=implicit-function-declaration -Wno-error=return-mismatch -Wno-error=int-conversion -Wno-error=incompatible-pointer-types |g" Makefile
make $NUMJOBS || make || exit 1
cat xcolormap > $PKG/usr/bin/xcolormap
mkdir -p $PKG/usr/doc/xgames-$VERSION/xcolormap
@@ -94,6 +97,7 @@ tar xvf $CWD/xcuckoo-1.1.tar.lz || exit 1
cd xcuckoo || exit 1
zcat $CWD/xcuckoo.diff.gz | patch -p1 --verbose || exit 1
xmkmf
+sed -i "s| CFLAGS = | CFLAGS = -Wno-error=implicit-int -Wno-error=implicit-function-declaration -Wno-error=return-mismatch -Wno-error=int-conversion |g" Makefile
make $NUMJOBS || make || exit 1
cat xcuckoo > $PKG/usr/bin/xcuckoo
cat xcuckoo.man | gzip -9c > $PKG/usr/man/man6/xcuckoo.6.gz
@@ -107,6 +111,7 @@ cd xlander || exit 1
zcat $CWD/xlander.fixes.diff.gz | patch -p1 || exit 1
zcat $CWD/xlander-2009-07-18.diff.gz | patch -p1 || exit 1
xmkmf
+sed -i "s| CFLAGS = | CFLAGS = -Wno-error=implicit-int -Wno-error=implicit-function-declaration -Wno-error=return-mismatch -Wno-error=int-conversion |g" Makefile
make $NUMJOBS || make || exit 1
cat xlander > $PKG/usr/bin/xlander
cat xlander.man | gzip -9c > $PKG/usr/man/man6/xlander.6.gz
@@ -118,6 +123,7 @@ cd $TMP
tar xvf $CWD/xminesweep3.0.tar.lz || exit 1
cd xminesweep3.0 || exit 1
xmkmf
+sed -i "s| CFLAGS = | CFLAGS = -Wno-error=implicit-int -Wno-error=implicit-function-declaration -Wno-error=return-mismatch -Wno-error=int-conversion |g" Makefile
make $NUMJOBS || make || exit 1
cat xminesweep > $PKG/usr/bin/xminesweep
cat xminesweep.man | gzip -9c > $PKG/usr/man/man6/xminesweep.6.gz
@@ -129,6 +135,7 @@ cd $TMP
tar xvf $CWD/xneko.tar.lz || exit 1
cd xneko || exit 1
xmkmf
+sed -i "s| CFLAGS = | CFLAGS = -Wno-error=implicit-int -Wno-error=implicit-function-declaration -Wno-error=return-mismatch -Wno-error=int-conversion |g" Makefile
make $NUMJOBS || make || exit 1
cat xneko > $PKG/usr/bin/xneko
cat xneko.man | gzip -9c > $PKG/usr/man/man6/xneko.6.gz
@@ -140,6 +147,7 @@ cd $TMP
tar xvf $CWD/xroach.tar.lz || exit 1
cd xroach || exit 1
xmkmf
+sed -i "s| CFLAGS = | CFLAGS = -Wno-error=implicit-int -Wno-error=implicit-function-declaration -Wno-error=return-mismatch -Wno-error=int-conversion |g" Makefile
make $NUMJOBS || make || exit 1
cat xroach > $PKG/usr/bin/xroach
cat xroach.man | gzip -9c > $PKG/usr/man/man6/xroach.6.gz
diff --git a/source/xap/xmms/xmms.SlackBuild b/source/xap/xmms/xmms.SlackBuild
index 63f4cbeda..2ee85e524 100755
--- a/source/xap/xmms/xmms.SlackBuild
+++ b/source/xap/xmms/xmms.SlackBuild
@@ -62,6 +62,9 @@ else
ARCHOPTS=""
fi
+# GCC^H^H^Hclang "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
TMP=${TMP:-/tmp}
@@ -85,6 +88,7 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+CC=clang \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
LIBS="-ldl" \
@@ -93,6 +97,7 @@ LIBS="-ldl" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--localstatedir=/var/lib \
--disable-static \
+ --disable-simd \
--enable-ipv6 \
$ARCHOPTS \
--build=$ARCH-slackware-linux || exit 1
diff --git a/source/xap/xsane/xsane.SlackBuild b/source/xap/xsane/xsane.SlackBuild
index 4f71ff8cf..0a3d9fb96 100755
--- a/source/xap/xsane/xsane.SlackBuild
+++ b/source/xap/xsane/xsane.SlackBuild
@@ -63,6 +63,9 @@ else
LIBDIRSUFFIX=""
fi
+# GCC 14 "fix":
+SLKCFLAGS="$SLKCFLAGS -Wno-error=implicit-function-declaration"
+
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
diff --git a/source/y/bsd-games/bsd-games.SlackBuild b/source/y/bsd-games/bsd-games.SlackBuild
index f91e7c30d..d4d87b2a5 100755
--- a/source/y/bsd-games/bsd-games.SlackBuild
+++ b/source/y/bsd-games/bsd-games.SlackBuild
@@ -74,6 +74,7 @@ zcat $CWD/patches/0016-Better-explanation-how-to-read-the-documentation.patch.gz
zcat $CWD/patches/0017-hack-Fix-segv-when-i-inventory-done-after-load-from-.patch.gz | patch -p1 --backup --suffix=.orig --verbose || exit 1
zcat $CWD/patches/bsd-games.factor.no.ubig.diff.gz | patch -p1 --backup --suffix=.orig --verbose || exit 1
zcat $CWD/patches/bsd-games.fortunepath.diff.gz | patch -p1 --backup --suffix=.orig --verbose || exit 1
+zcat $CWD/patches/bsd-games.gcc14.diff.gz | patch -p1 --backup --suffix=.orig --verbose || exit 1
./configure || exit 1
diff --git a/source/y/bsd-games/patches/bsd-games.gcc14.diff b/source/y/bsd-games/patches/bsd-games.gcc14.diff
new file mode 100644
index 000000000..644faa4d4
--- /dev/null
+++ b/source/y/bsd-games/patches/bsd-games.gcc14.diff
@@ -0,0 +1,11 @@
+--- ./configure.orig 2024-05-10 22:59:06.160719064 -0500
++++ ./configure 2024-05-10 23:00:09.194720474 -0500
+@@ -333,7 +333,7 @@
+ echo "The default warning flags should give a compile with few warnings."
+ # -Wbad-function-cast and -Wshadow give lots of warnings that are basically
+ # harmless.
+-ask "C compiler warning flags" warning_flags "-Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings"
++ask "C compiler warning flags" warning_flags "-Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -Wno-error=implicit-function-declaration"
+ if building_in dab; then
+ ask "C++ compiler warning flags" cxx_warning_flags "-Wall -W -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings"
+ fi