diff options
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 |
commit | abc3e67678d77c43fe739af3ed812d558cc83435 (patch) | |
tree | a9e061d3fd40a4bff2bf8e46d18117da5179abbd /source/l/pilot-link | |
parent | afc0f1e9aaa780f00b61d8c42b3a77833fbbaff8 (diff) | |
download | current-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/l/pilot-link')
-rw-r--r-- | source/l/pilot-link/pilot-link-0.12.1-var.patch | 11 | ||||
-rw-r--r-- | source/l/pilot-link/pilot-link-0.12.2-open.patch | 42 | ||||
-rw-r--r-- | source/l/pilot-link/pilot-link-0.12.3-clio.patch | 11 | ||||
-rw-r--r-- | source/l/pilot-link/pilot-link-0.12.5-aarch64.patch | 1348 | ||||
-rw-r--r-- | source/l/pilot-link/pilot-link-0.12.5-compiler_warnings.patch | 3067 | ||||
-rw-r--r-- | source/l/pilot-link/pilot-link-0.12.5-ftbfs-f19.patch | 24 | ||||
-rw-r--r-- | source/l/pilot-link/pilot-link-0.12.5-ftbfs-f21.patch | 22 | ||||
-rw-r--r-- | source/l/pilot-link/pilot-link-0.12.5-mp.patch | 13 | ||||
-rw-r--r-- | source/l/pilot-link/pilot-link-c99.patch | 28 | ||||
-rw-r--r-- | source/l/pilot-link/pilot-link-configure-c99.patch | 30 | ||||
-rwxr-xr-x | source/l/pilot-link/pilot-link.SlackBuild | 13 | ||||
-rw-r--r-- | source/l/pilot-link/pilot-link.png14.diff | 96 |
12 files changed, 4607 insertions, 98 deletions
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(<ime); + tm_ptr = localtime(<ime); +- 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; |