--- hfsplus-1.0.4.orig/debian/docs
+++ hfsplus-1.0.4/debian/docs
@@ -0,0 +1,2 @@
+NEWS
+README
--- hfsplus-1.0.4.orig/debian/libhfsp0.postinst
+++ hfsplus-1.0.4/debian/libhfsp0.postinst
@@ -0,0 +1,3 @@
+#! /bin/sh -e
+
+#DEBHELPER#
--- hfsplus-1.0.4.orig/debian/hprm.sgml
+++ hfsplus-1.0.4/debian/hprm.sgml
@@ -0,0 +1,109 @@
+Debian GNU/Linux">
+ hfsplus">
+ hfsutils">
+]>
+
+
+
+
+ jensen@debian.org
+
+
+ Jens
+ Schmalzing
+
+ Jul 19 2002
+
+
+ hprm
+ 1
+
+
+ hprm
+ remove a file or directory on an HFS+ volume
+
+
+
+ hprm
+
+
+ hfs-path
+
+
+
+
+ Description
+
+
+ hprm removes the file or directory specified
+ by hfs-path. Since write access to HFS+
+ volumes is still experimental, the program prints a warning
+ message and prompts the user before writing anything to the file
+ system.
+
+
+
+ hprm accepts the following options:
+
+
+
+
+
+
+
+ recursively remove the contents of a directory.
+
+
+
+
+
+
+
+ one day, this option will probably disable prompting. For
+ the time being, prompting is always enabled.
+
+
+
+
+
+
+
+ See also
+
+
+ hfsplus(7), hpmount(1), hpls(1), hppwd(1), hpmkdir(1), hpcd(1), hpcopy(1), hpumount(1), hpfsck(1).
+
+
+
+
+ Author
+
+
+ This manual page was written by Jens Schmalzing
+ <jensen@debian.org> for &debian; using the
+ manual page by Klaus Halfmann
+ <halfmann@libra.de> that comes with the
+ source code and documentation from the Tech Info
+ Library.
+
+
+
+
+
+
--- hfsplus-1.0.4.orig/debian/hfsplus.sgml
+++ hfsplus-1.0.4/debian/hfsplus.sgml
@@ -0,0 +1,95 @@
+Debian GNU/Linux">
+ hfsplus">
+ hfsutils">
+]>
+
+
+
+
+ jensen@debian.org
+
+
+ Jens
+ Schmalzing
+
+ Mar 13 2001
+
+
+ hfsplus
+ 7
+
+
+ hfsplus
+ a set of tools to access HFS+ file systems
+
+
+
+ Description
+
+
+ HFS+, also known as the Macintosh Extended Format, was
+ introduced by Apple Computer in 1998 with the release of MacOS
+ 8.1. It contains many improvements over the old HFS file
+ system, most notably the ability to allocate up to 2⁁64
+ blocks, resulting in much more efficient storage of many small
+ files on large disks.
+
+
+
+ The &hfsplus; collection allows to access volumes formatted with
+ the HFS+ file system from &debian; and related operating
+ systems. The collection contains tools to mount and unmount
+ HFS+ volumes, to change and list directories, and to copy
+ files to and from HFS+ volumes.
+
+
+
+ Note that unlike its cousin, the &hfsutils; collection used for
+ accessing HFS file systems, &hfsplus; does not use the Macintosh
+ pathname syntax with ":" as delimiter. Instead, it
+ mimicks the unix notation, delimiting the names of volumes,
+ directories and files in a path with "/", and also
+ understands "." and ".." to some extent.
+
+
+
+
+
+ See also
+
+
+ hpmount(1), hpls(1), hpcd(1), hppwd(1), hpcopy(1), hprm(1), hpmkdir(1), hpumount(1), hpfsck(1).
+
+
+
+
+ Author
+
+
+ This manual page was written by Jens Schmalzing
+ <jensen@debian.org> for &debian; using the
+ manual page by Klaus Halfmann
+ <halfmann@libra.de> that comes with the
+ source code and documentation from the Tech Info
+ Library.
+
+
+
+
+
--- hfsplus-1.0.4.orig/debian/hpumount.sgml
+++ hfsplus-1.0.4/debian/hpumount.sgml
@@ -0,0 +1,83 @@
+Debian GNU/Linux">
+ hfsplus">
+ hfsutils">
+]>
+
+
+
+
+ jensen@debian.org
+
+
+ Jens
+ Schmalzing
+
+ Mar 13 2001
+
+
+ hpumount
+ 1
+
+
+ hpumount
+ unmount an HFS+ volume
+
+
+
+ hpumount
+
+
+
+
+ Description
+
+
+ hpumount is used to forget about a previously
+ mounted HFS+ volume. However, the command does not change the
+ volume itself, it simply removes the
+ .hfsplusvolume file in the user's home
+ directory.
+
+
+
+
+ See also
+
+
+ hfsplus(7), hpmount(1), hpls(1), hpcd(1), hppwd(1), hpcopy(1), hprm(1), hpmkdir(1), hpfsck(1).
+
+
+
+
+
+ Author
+
+
+ This manual page was written by Jens Schmalzing
+ <jensen@debian.org> for &debian; using the
+ manual page by Klaus Halfmann
+ <halfmann@libra.de> that comes with the
+ source code and documentation from the Tech Info
+ Library.
+
+
+
+
+
+
--- hfsplus-1.0.4.orig/debian/hppwd.sgml
+++ hfsplus-1.0.4/debian/hppwd.sgml
@@ -0,0 +1,82 @@
+Debian GNU/Linux">
+ hfsplus">
+ hfsutils">
+]>
+
+
+
+
+ jensen@debian.org
+
+
+ Jens
+ Schmalzing
+
+ Mar 13 2001
+
+
+ hppwd
+ 1
+
+
+ hppwd
+ print the current working directory on an HFS+ volume
+
+
+
+ hppwd
+
+
+
+
+ Description
+
+
+ hppwd prints the absolute pathname to the
+ current directory on the previously mounted HFS+ volume. Note
+ that individual volume and directory names in the path are
+ separated with slashes "/" instead of the
+ Macintosh-style colons ":".
+
+
+
+
+ See also
+
+
+ hfsplus(7), hpmount(1), hpls(1), hpcd(1), hprm(1), hpmkdir(1), hpcopy(1), hpumount(1), hpfsck(1).
+
+
+
+
+ Author
+
+
+ This manual page was written by Jens Schmalzing
+ <jensen@debian.org> for &debian; using the
+ manual page by Klaus Halfmann
+ <halfmann@libra.de> that comes with the
+ source code and documentation from the Tech Info
+ Library.
+
+
+
+
+
+
--- hfsplus-1.0.4.orig/debian/hpls.sgml
+++ hfsplus-1.0.4/debian/hpls.sgml
@@ -0,0 +1,345 @@
+Debian GNU/Linux">
+ hfsplus">
+ hfsutils">
+]>
+
+
+
+
+ jensen@debian.org
+
+
+ Jens
+ Schmalzing
+
+ Mar 13 2001
+
+
+ hpls
+ 1
+
+
+ hpls
+ list the contents of a directory on an HFS+ volume
+
+
+
+ hpls
+
+ hfs-path ...
+
+
+
+
+ Description
+
+
+ hpls is used to list files and directories on
+ an HFS+ volume. If one or more arguments are given, each file
+ or directory is shown; otherwise, the contents of the current
+ working directory are displayed.
+
+
+
+
+
+ Options
+
+
+
+
+
+
+
+ Each entry appears on a line by itself. This is the
+ default if standard output is not a terminal.
+
+
+
+
+
+
+
+
+ All entries are shown, including "invisible"
+ files. The default is to omit invisible files.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Sort and display entries by their creation date, rather
+ than their modification date.
+
+
+
+
+
+
+
+
+ List directory entries themselves rather than their
+ contents. Normally the contents are shown for named
+ directories on the command-line.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Show the catalogue ID for each entry. Every file and
+ directory on an HFS+ volume has a unique catalogue ID.
+
+
+
+
+
+
+
+
+ Display entries in long format. This format shows the
+ entry type ("d" for directory, "f" for
+ file, "F" for locked file), flags ("i"
+ for invisible), type and creator (four-character strings)
+ for files only, size (number of items in a directory or
+ resource and data bytes of a file, respectively), date of
+ last modification (or creation if the
+ flag is given), and name.
+
+
+
+
+
+
+
+
+ Display entries in a continuous format separated by
+ commas.
+
+
+
+
+
+
+
+
+ Replace special and non-printable characters in displayed
+ filenames with question marks (?). This is the default
+ when standard output is a terminal.
+
+
+
+
+
+
+
+
+ Sort entries in reverse order before displaying.
+
+
+
+
+
+
+
+
+ Show the file size for each entry in 1K block units. The
+ size includes blocks used for both data and resource
+ forks.
+
+
+
+
+
+
+
+
+ Sort and display entries by time. Normally files will be
+ sorted by name. This option uses the last modification
+ date to sort unless is also specified.
+
+
+
+
+
+
+
+
+ Display entries in column format like ,
+ but sorted horizontally into rows rather than columns.
+
+
+
+
+
+ width
+
+
+ Format output lines suitable for display in the given
+ width. Normally the width will be determined from your
+ terminal, from the environment variable
+ COLUMNS, or from a default value of 80.
+
+
+
+
+
+
+
+
+ Display entries in column format with entries sorted
+ vertically. This is the default output format when
+ standard output is a terminal.
+
+
+
+
+
+
+
+
+ Cause certain output filenames to be followed by a
+ single-character flag indicating the nature of the
+ entry; directories are followed by a slash "/"
+ and executable Macintosh applications are followed by an
+ asterisk "*".
+
+
+
+
+
+
+
+
+ Cause all filenames to be output verbatim without
+ question-mark substitution.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ For each directory that is encountered in a listing,
+ recursively descend into and display its contents.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ See also
+
+
+ hfsplus(7), hpmount(1), hpcd(1), hppwd(1), hprm(1), hpmkdir(1), hpcopy(1), hpumount(1), hpfsck(1).
+
+
+
+
+ Author
+
+
+ This manual page was written by Jens Schmalzing
+ <jensen@debian.org> for &debian; using the
+ manual page by Klaus Halfmann
+ <halfmann@libra.de> that comes with the
+ source code and documentation from the Tech Info
+ Library.
+
+
+
+
+
+
--- hfsplus-1.0.4.orig/debian/hpfsck.sgml
+++ hfsplus-1.0.4/debian/hpfsck.sgml
@@ -0,0 +1,82 @@
+Debian GNU/Linux">
+ hfsplus">
+ hfsutils">
+]>
+
+
+
+
+ jensen@debian.org
+
+
+ Jens
+ Schmalzing
+
+ Mar 13 2001
+
+
+ hpfsck
+ 1
+
+
+ hpfsck
+ check integrity of an HFS+ volume
+
+
+
+ hpfsck
+
+ source-path
+
+
+
+
+ Description
+
+
+ hpfsck checks the integrity of an HFS+
+ volume. With the option, the data contained
+ in the volume header is output as well.
+
+
+
+
+ See also
+
+
+ hfsplus(7), hpmount(1), hpls(1), hpcd(1), hprm(1), hpmkdir(1), hppwd(1), hpcopy(1), hpumount(1).
+
+
+
+
+ Author
+
+
+ This manual page was written by Jens Schmalzing
+ <jensen@debian.org> for &debian; using the
+ manual page by Klaus Halfmann
+ <halfmann@libra.de> that comes with the
+ source code and documentation from the Tech Info
+ Library.
+
+
+
+
+
+
--- hfsplus-1.0.4.orig/debian/hpcopy.sgml
+++ hfsplus-1.0.4/debian/hpcopy.sgml
@@ -0,0 +1,153 @@
+Debian GNU/Linux">
+ hfsplus">
+ hfsutils">
+]>
+
+
+
+
+ jensen@debian.org
+
+
+ Jens
+ Schmalzing
+
+ Mar 13 2001
+
+
+ hpcopy
+ 1
+
+
+ hpcopy
+ copy files from an HFS+ volume
+
+
+
+ hpcopy
+
+
+
+
+
+
+
+ source-path
+ target-path
+
+
+
+
+ Description
+
+
+ hpcopy copies files and directories from an
+ HFS+ volume. If multiple files are to be copied, the target
+ path must be a directory.
+
+
+
+ Since Macintosh files contain two forks, which are not
+ representably in Unix file systems, copies use one of several
+ translation modes:
+
+
+
+
+
+
+
+ Mac Binary II is a format for
+ binary file transfer. Both forks of the Macintosh file
+ are preserved. This is the recommended mode for
+ transferring arbitrary Macintosh files.
+
+
+
+
+
+
+
+ BinHex also preserves both
+ forks of the Macintosh file. In addition, the encoded
+ file contains only ASCII characters, making it suitable
+ for electronic mail transmission.
+
+
+
+
+
+
+
+ Text copies only the data fork
+ of the Macintosh file, while the contents of the resource
+ fork are lost. In addition, this mode translates
+ end-of-line characters. This translation should be used
+ for text files.
+
+
+
+
+
+
+
+ Raw Data copies only the data
+ fork of the Macintosh file, while the contents of the
+ resource fork are lost.
+
+
+
+
+
+
+
+ Automatic mode applies a set of
+ predefined heuristics to determine the appropriate
+ translation. This is the default if no mode is specified.
+
+
+
+
+
+
+
+
+ See also
+
+
+ hfsplus(7), hpmount(1), hpls(1), hpcd(1), hprm(1), hpmkdir(1), hppwd(1), hpumount(1), hpfsck(1).
+
+
+
+
+ Author
+
+
+ This manual page was written by Jens Schmalzing
+ <jensen@debian.org> for &debian; using the
+ manual page by Klaus Halfmann
+ <halfmann@libra.de> that comes with the
+ source code and documentation from the Tech Info
+ Library.
+
+
+
+
+
+
--- hfsplus-1.0.4.orig/debian/hpcd.sgml
+++ hfsplus-1.0.4/debian/hpcd.sgml
@@ -0,0 +1,81 @@
+Debian GNU/Linux">
+ hfsplus">
+ hfsutils">
+]>
+
+
+
+
+ jensen@debian.org
+
+
+ Jens
+ Schmalzing
+
+ Mar 13 2001
+
+
+ hpcd
+ 1
+
+
+ hpcd
+ change directory on an HFS+ volume
+
+
+
+ hpcd
+ hfs-path
+
+
+
+
+ Description
+
+
+ hpcd changes the current working directory on
+ the previously mounted HFS+ volume. Subsequent commands will
+ interpret filenames relative to this directory.
+
+
+
+
+ See also
+
+
+ hfsplus(7), hpmount(1), hpls(1), hppwd(1), hprm(1), hpmkdir(1), hpcopy(1), hpumount(1), hpfsck(1).
+
+
+
+
+ Author
+
+
+ This manual page was written by Jens Schmalzing
+ <jensen@debian.org> for &debian; using the
+ manual page by Klaus Halfmann
+ <halfmann@libra.de> that comes with the
+ source code and documentation from the Tech Info
+ Library.
+
+
+
+
+
+
--- hfsplus-1.0.4.orig/debian/hpmkdir.sgml
+++ hfsplus-1.0.4/debian/hpmkdir.sgml
@@ -0,0 +1,83 @@
+Debian GNU/Linux">
+ hfsplus">
+ hfsutils">
+]>
+
+
+
+
+ jensen@debian.org
+
+
+ Jens
+ Schmalzing
+
+ Jul 19 2002
+
+
+ hpmkdir
+ 1
+
+
+ hpmkdir
+ create a directory on an HFS+ volume
+
+
+
+ hpmkdir
+ hfs-path
+
+
+
+
+ Description
+
+
+ hpmkdir creates a new directory under the
+ current working directory on the previously mounted HFS+ volume.
+ Since write access to HFS+ volumes is still experimental, the
+ program prints a warning message and prompts the user before
+ writing anything to the file system.
+
+
+
+
+ See also
+
+
+ hfsplus(7), hpmount(1), hpls(1), hppwd(1), hprm(1), hpcd(1), hpcopy(1), hpumount(1), hpfsck(1).
+
+
+
+
+ Author
+
+
+ This manual page was written by Jens Schmalzing
+ <jensen@debian.org> for &debian; using the
+ manual page by Klaus Halfmann
+ <halfmann@libra.de> that comes with the
+ source code and documentation from the Tech Info
+ Library.
+
+
+
+
+
+
--- hfsplus-1.0.4.orig/debian/hpmount.sgml
+++ hfsplus-1.0.4/debian/hpmount.sgml
@@ -0,0 +1,114 @@
+Debian GNU/Linux">
+ hfsplus">
+ hfsutils">
+]>
+
+
+
+
+ jensen@debian.org
+
+
+ Jens
+ Schmalzing
+
+ Mar 13 2001
+
+
+ hpmount
+ 1
+
+
+ hpmount
+ change directory on an HFS+ volume
+
+
+
+ hpmount
+
+ n
+ source-path
+
+
+
+
+ Description
+
+
+ hpmount introduces a new HFS+ volume. The
+ source path may specify a block device or a regular file
+ containing an HFS+ volume image. Furthermore,
+ hpmount creates the file
+ .hfsplusvolume in the user's home
+ directory, where the source path and the catalogue ID of the
+ current working directory are stored.
+
+
+
+ hpmount accepts the following options:
+
+
+
+
+
+
+
+ mount the volume read-only. The default is to allow
+ write-access.
+
+
+
+
+ n
+
+
+ mount partition number n. The
+ default is to mount the first partition that looks like it
+ contains an HFS+ volume.
+
+
+
+
+
+
+
+
+ See also
+
+
+ hfsplus(7), hpls(1), hpcd(1), hppwd(1), hpcopy(1), hprm(1), hpmkdir(1), hpumount(1), hpfsck(1).
+
+
+
+
+ Author
+
+
+ This manual page was written by Jens Schmalzing
+ <jensen@debian.org> for &debian; using the
+ manual page by Klaus Halfmann
+ <halfmann@libra.de> that comes with the
+ source code and documentation from the Tech Info
+ Library.
+
+
+
+
+
+
--- hfsplus-1.0.4.orig/debian/hfsplus.dirs
+++ hfsplus-1.0.4/debian/hfsplus.dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/linda/overrides
--- hfsplus-1.0.4.orig/debian/hfsplus.manpages
+++ hfsplus-1.0.4/debian/hfsplus.manpages
@@ -0,0 +1,10 @@
+debian/hfsplus.7
+debian/hpcd.1
+debian/hpcopy.1
+debian/hpfsck.1
+debian/hpls.1
+debian/hpmkdir.1
+debian/hpmount.1
+debian/hppwd.1
+debian/hprm.1
+debian/hpumount.1
--- hfsplus-1.0.4.orig/debian/libhfsp0.dirs
+++ hfsplus-1.0.4/debian/libhfsp0.dirs
@@ -0,0 +1 @@
+usr/lib
--- hfsplus-1.0.4.orig/debian/libhfsp-dev.dirs
+++ hfsplus-1.0.4/debian/libhfsp-dev.dirs
@@ -0,0 +1,2 @@
+usr/include/hfsplus
+usr/lib
--- hfsplus-1.0.4.orig/debian/compat
+++ hfsplus-1.0.4/debian/compat
@@ -0,0 +1 @@
+4
--- hfsplus-1.0.4.orig/debian/copyright
+++ hfsplus-1.0.4/debian/copyright
@@ -0,0 +1,11 @@
+This package was debianized by Jens Schmalzing on
+Sun, 11 Mar 2001 22:02:06 +0100.
+
+Upstream URL: http://www.penguinppc.org/historical/hfsplus/hfsplus_1.0.4.src.tar.bz2
+
+Upstream Author: Klaus Halfmann
+
+Copyright:
+
+hfsplus is covered under the terms of the GPL. See the file
+/usr/share/common-licenses/GPL for more information.
--- hfsplus-1.0.4.orig/debian/watch
+++ hfsplus-1.0.4/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://www.penguinppc.org/historical/hfsplus/hfsplus_(.*)\.src\.tar\.bz2
--- hfsplus-1.0.4.orig/debian/patches/99_types.dpatch
+++ hfsplus-1.0.4/debian/patches/99_types.dpatch
@@ -0,0 +1,51 @@
+#! /bin/sh -e
+## 99_types.dpatch by Aurélien GÉRÔME
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Use types in asm/types.h instead of compiler defaults.
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/apple.h hfsplus-1.0.4/libhfsp/src/apple.h
+--- old/hfsplus-1.0.4/libhfsp/src/apple.h 2002-03-10 20:58:09.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/apple.h 2006-09-13 20:52:15.000000000 +0000
+@@ -27,16 +27,17 @@
+
+ #define APPLE_H
+
+-typedef signed char Char;
+-typedef unsigned char UChar;
+-typedef signed char SInt8;
+-typedef unsigned char UInt8;
+-typedef signed short SInt16;
+-typedef unsigned short UInt16;
+-typedef signed long SInt32;
+-typedef unsigned long UInt32;
+-typedef unsigned long OSType;
+-typedef unsigned long long UInt64;
++#include
++typedef __s8 Char;
++typedef __u8 UChar;
++typedef __s8 SInt8;
++typedef __u8 UInt8;
++typedef __s16 SInt16;
++typedef __u16 UInt16;
++typedef __s32 SInt32;
++typedef __u32 UInt32;
++typedef __u32 OSType;
++typedef __u64 UInt64;
+
+ #define PARTITION_SIG 0x504d /* 'PM' */
+
--- hfsplus-1.0.4.orig/debian/patches/147838_sigbus_sparc.dpatch
+++ hfsplus-1.0.4/debian/patches/147838_sigbus_sparc.dpatch
@@ -0,0 +1,49 @@
+#! /bin/sh -e
+## 147838_sigbus_sparc.dpatch by Steve Langasek
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix SIGBUS on sparc.
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/swab.h hfsplus-1.0.4/libhfsp/src/swab.h
+--- old/hfsplus-1.0.4/libhfsp/src/swab.h 2002-03-05 19:50:29.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/swab.h 2006-09-13 20:52:15.000000000 +0000
+@@ -49,8 +49,25 @@
+ #define bswabU16(val) val
+
+ #define bswabU16_inc(ptr) (*((UInt16*) (ptr))++)
++/* Only available as a GCC extension, but required on sparc due to
++ alignment issues in some of the on-disk structs */
++#if defined(__GNUC__) && defined(__sparc__)
++#define bswabU32_inc(ptr) ({ \
++ unsigned char *c = (char*)ptr; \
++ ((UInt32 *)ptr)++; \
++ ((c[0] << 24)+(c[1] << 16)+(c[2] << 8)+c[3]);})
++#define bswabU64_inc(ptr) ({ \
++ unsigned char *c = (char*)ptr; \
++ UInt64 val = 0; \
++ int i = 0; \
++ ((UInt64 *)ptr)++; \
++ while (i < 8) \
++ val += (c[i] << (8*(7-i++))); \
++ val;})
++#else
+ #define bswabU32_inc(ptr) (*((UInt32*) (ptr))++)
+ #define bswabU64_inc(ptr) (*((UInt64*) (ptr))++)
++#endif
+
+ #define bstoreU16_inc(ptr, val) (*((UInt16*) (ptr))++) = val
+ #define bstoreU32_inc(ptr, val) (*((UInt32*) (ptr))++) = val
--- hfsplus-1.0.4.orig/debian/patches/120137_ftbfs_hppa_gcc3.0.dpatch
+++ hfsplus-1.0.4/debian/patches/120137_ftbfs_hppa_gcc3.0.dpatch
@@ -0,0 +1,32 @@
+#! /bin/sh -e
+## 120137_ftbfs_hppa_gcc3.0.dpatch by James Troup
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix FTBFS on hppa with gcc-3.0.
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+diff -x debian -ruN old/hfsplus-1.0.4/src/glob.c hfsplus-1.0.4/src/glob.c
+--- old/hfsplus-1.0.4/src/glob.c 2002-03-05 19:50:29.000000000 +0000
++++ hfsplus-1.0.4/src/glob.c 2006-09-13 20:52:15.000000000 +0000
+@@ -48,7 +48,7 @@
+
+ switch (*pat)
+ {
+- case NULL: // pattern at end
++ case 0: // pattern at end
+ return (!*str); // String at end ?
+
+ case '*': // match all
--- hfsplus-1.0.4.orig/debian/patches/231270_hpmount_destroys_hfs_volume_headers.dpatch
+++ hfsplus-1.0.4/debian/patches/231270_hpmount_destroys_hfs_volume_headers.dpatch
@@ -0,0 +1,35 @@
+#! /bin/sh -e
+## 231270_hpmount_destroys_hfs_volume_headers.dpatch by Frank Lichtenheld
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Avoid HFS volume headers destruction.
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/volume.c hfsplus-1.0.4/libhfsp/src/volume.c
+--- old/hfsplus-1.0.4/libhfsp/src/volume.c 2002-03-26 18:00:29.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/volume.c 2006-09-13 20:52:15.000000000 +0000
+@@ -508,8 +509,10 @@
+
+ vol->flags |= rw & HFSP_MODE_RDWR;
+
+- if (volume_read_wrapper(vol, &vol->vol))
++ if (volume_read_wrapper(vol, &vol->vol)) {
++ vol->flags ^= HFSP_MODE_RDWR;
+ return -1;
++ }
+
+ if (volume_read(vol, &backup, vol->maxblocks - 2))
+ return -1;
--- hfsplus-1.0.4.orig/debian/patches/277810_ftbfs_include_gcc3.4.dpatch
+++ hfsplus-1.0.4/debian/patches/277810_ftbfs_include_gcc3.4.dpatch
@@ -0,0 +1,32 @@
+#! /bin/sh -e
+## 277810_ftbfs_include_gcc3.4.dpatch by Andreas Jochens
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix FTBFS with gcc-3.4 due to a missing include.
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/libhfsp.h hfsplus-1.0.4/libhfsp/src/libhfsp.h
+--- old/hfsplus-1.0.4/libhfsp/src/libhfsp.h 2002-03-25 15:48:37.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/libhfsp.h 2006-09-13 20:52:15.000000000 +0000
+@@ -31,7 +31,7 @@
+ # include "hfs.h"
+ # include "hfsp.h"
+
+-extern int errno;
++#include
+ /* Last error is eventually found here */
+ extern const char *hfsp_error;
+
--- hfsplus-1.0.4.orig/debian/patches/286366_ftbfs_amd64_gcc4.0.dpatch
+++ hfsplus-1.0.4/debian/patches/286366_ftbfs_amd64_gcc4.0.dpatch
@@ -0,0 +1,171 @@
+#! /bin/sh -e
+## 286366_ftbfs_amd64_gcc4.0.dpatch by Andreas Jochens
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix FTBFS on amd64 with gcc-4.0.
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/btree.c hfsplus-1.0.4/libhfsp/src/btree.c
+--- old/hfsplus-1.0.4/libhfsp/src/btree.c 2002-03-05 19:50:28.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/btree.c 2006-09-13 20:52:15.000000000 +0000
+@@ -393,7 +395,7 @@
+ {
+ p = volume_readfromfork(vol, nodebuf, fork, 0, bt->blkpernode,
+ HFSP_EXTENT_DATA, bt->cnid);
+- ((char*) p) += HEADER_RESERVEDOFFSET; // skip header
++ p = ((char*) p) + HEADER_RESERVEDOFFSET; // skip header
+ }
+
+ bt->alloc_bits = malloc(alloc_size);
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/btreecheck.c hfsplus-1.0.4/libhfsp/src/btreecheck.c
+--- old/hfsplus-1.0.4/libhfsp/src/btreecheck.c 2002-03-05 19:50:29.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/btreecheck.c 2006-09-13 20:52:15.000000000 +0000
+@@ -264,7 +264,7 @@
+ {
+ p = volume_readfromfork(vol, nodebuf, fork, 0, bt->blkpernode,
+ HFSP_EXTENT_DATA, bt->cnid);
+- ((char*) p) += HEADER_RESERVEDOFFSET; // skip header
++ p = ((char*) p) + HEADER_RESERVEDOFFSET; // skip header
+ }
+
+ bt->alloc_bits = malloc(alloc_size);
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/fscheck.c hfsplus-1.0.4/libhfsp/src/fscheck.c
+--- old/hfsplus-1.0.4/libhfsp/src/fscheck.c 2002-03-25 15:48:37.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/fscheck.c 2006-09-13 20:52:15.000000000 +0000
+@@ -204,7 +204,8 @@
+ */
+ static int fscheck_volume_readbuf(volume * vol, hfsp_vh* vh, void* p)
+ {
+- if ( (vh->signature = bswabU16_inc(p)) != HFSP_VOLHEAD_SIG)
++ vh->signature = bswabU16_inc(p);
++ if (vh->signature != HFSP_VOLHEAD_SIG)
+ {
+ printf("Unexpected Volume signature '%2s' expected 'H+'\n",
+ (char*) &vh->signature);
+@@ -230,7 +231,7 @@
+ vh->write_count = bswabU32_inc(p);
+ vh->encodings_bmp = bswabU64_inc(p);
+ memcpy(vh->finder_info, p, 32);
+- ((char*) p) += 32; // So finderinfo must be swapped later, ***
++ p = ((char*) p) + 32; // So finderinfo must be swapped later, ***
+ p = volume_readfork(p, &vh->alloc_file );
+ p = volume_readfork(p, &vh->ext_file );
+ p = volume_readfork(p, &vh->cat_file );
+@@ -277,12 +278,12 @@
+ printf("Volume is wrapped in HFS volume "
+ " (use hfsck to check this)\n");
+
+- ((char*) p) += 0x12; /* skip unneded HFS vol fields */
++ p = ((char*) p) + 0x12; /* skip unneded HFS vol fields */
+ drAlBlkSiz = bswabU32_inc(p); /* offset 0x14 */
+- ((char*) p) += 0x4; /* skip unneded HFS vol fields */
++ p = ((char*) p) + 0x4; /* skip unneded HFS vol fields */
+ drAlBlSt = bswabU16_inc(p); /* offset 0x1C */
+
+- ((char*) p) += 0x5E; /* skip unneded HFS vol fields */
++ p = ((char*) p) + 0x5E; /* skip unneded HFS vol fields */
+ signature = bswabU16_inc(p); /* offset 0x7C, drEmbedSigWord */
+ if (signature != HFSP_VOLHEAD_SIG)
+ HFSP_ERROR(-1, "This looks like a normal HFS volume");
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/swab.h hfsplus-1.0.4/libhfsp/src/swab.h
+--- old/hfsplus-1.0.4/libhfsp/src/swab.h 2002-03-05 19:50:29.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/swab.h 2006-09-13 20:52:15.000000000 +0000
+@@ -36,13 +36,13 @@
+
+ #define bswabU16(val) bswap_16(val)
+
+-#define bswabU16_inc(ptr) bswap_16(*((UInt16*) (ptr))++)
+-#define bswabU32_inc(ptr) bswap_32(*((UInt32*) (ptr))++)
+-#define bswabU64_inc(ptr) bswap_64(*((UInt64*) (ptr))++)
+-
+-#define bstoreU16_inc(ptr, val) (*((UInt16*) (ptr))++) = bswap_16(val)
+-#define bstoreU32_inc(ptr, val) (*((UInt32*) (ptr))++) = bswap_32(val)
+-#define bstoreU64_inc(ptr, val) (*((UInt64*) (ptr))++) = bswap_64(val)
++#define bswabU16_inc(ptr) bswap_16(*((UInt16*) (ptr))); ptr = (UInt16*)ptr + 1
++#define bswabU32_inc(ptr) bswap_32(*((UInt32*) (ptr))); ptr = (UInt32*)ptr + 1
++#define bswabU64_inc(ptr) bswap_64(*((UInt64*) (ptr))); ptr = (UInt64*)ptr + 1
++
++#define bstoreU16_inc(ptr, val) *((UInt16*) (ptr)) = bswap_16(val); ptr = (UInt16*)ptr + 1
++#define bstoreU32_inc(ptr, val) *((UInt32*) (ptr)) = bswap_32(val); ptr = (UInt32*)ptr + 1;
++#define bstoreU64_inc(ptr, val) *((UInt64*) (ptr)) = bswap_64(val); ptr = (UInt32*)ptr + 1;
+
+ #else // BYTE_ORDER == BIG_ENDIAN
+
+@@ -69,12 +69,12 @@
+ #define bswabU64_inc(ptr) (*((UInt64*) (ptr))++)
+ #endif
+
+-#define bstoreU16_inc(ptr, val) (*((UInt16*) (ptr))++) = val
+-#define bstoreU32_inc(ptr, val) (*((UInt32*) (ptr))++) = val
+-#define bstoreU64_inc(ptr, val) (*((UInt64*) (ptr))++) = val
++#define bstoreU16_inc(ptr, val) *((UInt16*) (ptr)) = val; ptr = (UInt16*)ptr + 1
++#define bstoreU32_inc(ptr, val) *((UInt32*) (ptr)) = val; ptr = (UInt32*)ptr + 1
++#define bstoreU64_inc(ptr, val) *((UInt64*) (ptr)) = val; ptr = (UInt64*)ptr + 1
+
+ #endif
+
+ /* for the sake of compleetness and readability */
+-#define bswabU8_inc(ptr) (*((UInt8*) (ptr))++)
+-#define bstoreU8_inc(ptr,val) (*((UInt8*) (ptr))++) = val
++#define bswabU8_inc(ptr) *((UInt8*) (ptr)); ptr = (UInt8*)ptr + 1
++#define bstoreU8_inc(ptr,val) *((UInt8*) (ptr)) = val; ptr = (UInt8*)ptr + 1
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/volume.c hfsplus-1.0.4/libhfsp/src/volume.c
+--- old/hfsplus-1.0.4/libhfsp/src/volume.c 2002-03-26 18:00:29.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/volume.c 2006-09-13 20:52:15.000000000 +0000
+@@ -323,7 +323,8 @@
+ */
+ static int volume_readbuf(hfsp_vh* vh, void* p)
+ {
+- if ( (vh->signature = bswabU16_inc(p)) != HFSP_VOLHEAD_SIG)
++ vh->signature = bswabU16_inc(p);
++ if (vh->signature != HFSP_VOLHEAD_SIG)
+ HFSP_ERROR(-1, "This is not a HFS+ volume");
+ vh->version = bswabU16_inc(p);
+ vh->attributes = bswabU32_inc(p);
+@@ -345,7 +346,7 @@
+ vh->write_count = bswabU32_inc(p);
+ vh->encodings_bmp = bswabU64_inc(p);
+ memcpy(vh->finder_info, p, 32);
+- ((char*) p) += 32; // finderinfo is not used by now
++ p = ((char*) p) + 32; // finderinfo is not used by now
+ p = volume_readfork(p, &vh->alloc_file );
+ p = volume_readfork(p, &vh->ext_file );
+ p = volume_readfork(p, &vh->cat_file );
+@@ -381,7 +382,7 @@
+ bstoreU32_inc(p, vh->write_count );
+ bstoreU64_inc(p, vh->encodings_bmp );
+ memcpy(p, vh->finder_info, 32);
+- ((char*) p) += 32; // finderinfo is not used by now
++ p = ((char*) p) + 32; // finderinfo is not used by now
+ p = volume_writefork(p, &vh->alloc_file );
+ p = volume_writefork(p, &vh->ext_file );
+ p = volume_writefork(p, &vh->cat_file );
+@@ -417,12 +418,12 @@
+
+ UInt16 embeds, embedl; /* Start/lenght of embedded area in blocks */
+
+- ((char*) p) += 0x12; /* skip unneeded HFS vol fields */
++ p = ((char*) p) + 0x12; /* skip unneeded HFS vol fields */
+ drAlBlkSiz = bswabU32_inc(p); /* offset 0x14 */
+- ((char*) p) += 0x4; /* skip unneeded HFS vol fields */
++ p = ((char*) p) + 0x4; /* skip unneeded HFS vol fields */
+ drAlBlSt = bswabU16_inc(p); /* offset 0x1C */
+
+- ((char*) p) += 0x5E; /* skip unneeded HFS vol fields */
++ p = ((char*) p) + 0x5E; /* skip unneeded HFS vol fields */
+ signature = bswabU16_inc(p); /* offset 0x7C, drEmbedSigWord */
+ if (signature != HFSP_VOLHEAD_SIG)
+ HFSP_ERROR(-1, "This looks like a normal HFS volume");
--- hfsplus-1.0.4.orig/debian/patches/300289_ftbfs_ppc64_gcc4.0.dpatch
+++ hfsplus-1.0.4/debian/patches/300289_ftbfs_ppc64_gcc4.0.dpatch
@@ -0,0 +1,54 @@
+#! /bin/sh -e
+## 300289_ftbfs_ppc64_gcc4.0.dpatch by Andreas Jochens
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix FTBFS on ppc64 with gcc-4.0.
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/swab.h hfsplus-1.0.4/libhfsp/src/swab.h
+--- old/hfsplus-1.0.4/libhfsp/src/swab.h 2002-03-05 19:50:29.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/swab.h 2006-09-13 20:52:15.000000000 +0000
+@@ -48,25 +48,25 @@
+
+ #define bswabU16(val) val
+
+-#define bswabU16_inc(ptr) (*((UInt16*) (ptr))++)
++#define bswabU16_inc(ptr) ptr = (UInt16*)ptr + 1
+ /* Only available as a GCC extension, but required on sparc due to
+ alignment issues in some of the on-disk structs */
+ #if defined(__GNUC__) && defined(__sparc__)
+ #define bswabU32_inc(ptr) ({ \
+ unsigned char *c = (char*)ptr; \
+- ((UInt32 *)ptr)++; \
++ ptr = ((UInt32 *)ptr) + 1; \
+ ((c[0] << 24)+(c[1] << 16)+(c[2] << 8)+c[3]);})
+ #define bswabU64_inc(ptr) ({ \
+ unsigned char *c = (char*)ptr; \
+ UInt64 val = 0; \
+ int i = 0; \
+- ((UInt64 *)ptr)++; \
++ ptr = ((UInt64 *)ptr) + 1; \
+ while (i < 8) \
+ val += (c[i] << (8*(7-i++))); \
+ val;})
+ #else
+-#define bswabU32_inc(ptr) (*((UInt32*) (ptr))++)
+-#define bswabU64_inc(ptr) (*((UInt64*) (ptr))++)
++#define bswabU32_inc(ptr) ptr = (UInt32*)ptr + 1
++#define bswabU64_inc(ptr) ptr = (UInt64*)ptr + 1
+ #endif
+
+ #define bstoreU16_inc(ptr, val) *((UInt16*) (ptr)) = val; ptr = (UInt16*)ptr + 1
--- hfsplus-1.0.4.orig/debian/patches/334016_broken_bswab_inc_macros.dpatch
+++ hfsplus-1.0.4/debian/patches/334016_broken_bswab_inc_macros.dpatch
@@ -0,0 +1,116 @@
+#! /bin/sh -e
+## 334016_broken_bswab_inc_macros.dpatch by Piotr Krysiuk
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix broken bswab*_inc macros.
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/btree.c hfsplus-1.0.4/libhfsp/src/btree.c
+--- old/hfsplus-1.0.4/libhfsp/src/btree.c 2002-03-05 19:50:28.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/btree.c 2006-09-13 20:52:15.000000000 +0000
+@@ -95,8 +95,9 @@
+ head->btree_type = bswabU8_inc(p);
+ head->reserved2 = bswabU8_inc(p);
+ head->attributes = bswabU32_inc(p);
+- for (i=0; i < 16; i++)
++ for (i=0; i < 16; i++) {
+ head->reserved3[i] = bswabU32_inc(p);
++ }
+ return p;
+ }
+
+@@ -121,8 +122,9 @@
+ bstoreU8_inc (p, head->btree_type);
+ bstoreU8_inc (p, head->reserved2);
+ bstoreU32_inc(p, head->attributes);
+- for (i=0; i < 16; i++)
++ for (i=0; i < 16; i++) {
+ bstoreU32_inc(p, head->reserved3[i]);
++ }
+ return p;
+ }
+
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/record.c hfsplus-1.0.4/libhfsp/src/record.c
+--- old/hfsplus-1.0.4/libhfsp/src/record.c 2002-03-17 17:20:01.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/record.c 2006-09-13 20:52:15.000000000 +0000
+@@ -60,8 +60,9 @@
+ key->parent_cnid = bswabU32_inc(p);
+ key->name.strlen = len = bswabU16_inc(p);
+ cp = key->name.name;
+- for (i=0; i < len; i++, cp++)
++ for (i=0; i < len; i++, cp++) {
+ *cp = bswabU16_inc(p);
++ }
+ /* check if keylenght was correct */
+ if (key_length != ((char*) p) - ((char*) check))
+ HFSP_ERROR(EINVAL, "Invalid key length in record_readkey");
+@@ -93,8 +94,9 @@
+ bstoreU16_inc(p, key_length);
+ bstoreU32_inc(p, key->parent_cnid);
+ bstoreU16_inc(p, len);
+- for (i=0; i < len; i++, cp++)
++ for (i=0; i < len; i++, cp++) {
+ bstoreU16_inc(p, *cp);
++ }
+ return p;
+ fail:
+ return NULL;
+@@ -477,8 +479,9 @@
+ cp = entry->nodeName.name;
+ if (len > 255)
+ HFSP_ERROR(-1, "Invalid key length in record_thread");
+- for (i=0; i < len; i++, cp++)
++ for (i=0; i < len; i++, cp++) {
+ *cp = bswabU16_inc(p);
++ }
+ return p;
+ fail:
+ return NULL;
+@@ -497,8 +500,9 @@
+ cp = entry->nodeName.name;
+ if (len > 255)
+ HFSP_ERROR(-1, "Invalid key length in record_thread");
+- for (i=0; i < len; i++, cp++)
++ for (i=0; i < len; i++, cp++) {
+ bstoreU16_inc(p, *cp);
++ }
+ return p;
+ fail:
+ return NULL;
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/swab.h hfsplus-1.0.4/libhfsp/src/swab.h
+--- old/hfsplus-1.0.4/libhfsp/src/swab.h 2002-03-05 19:50:29.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/swab.h 2006-09-13 20:52:15.000000000 +0000
+@@ -48,7 +48,7 @@
+
+ #define bswabU16(val) val
+
+-#define bswabU16_inc(ptr) ptr = (UInt16*)ptr + 1
++#define bswabU16_inc(ptr) *((UInt16*) (ptr)); ptr = (UInt16*)ptr + 1
+ /* Only available as a GCC extension, but required on sparc due to
+ alignment issues in some of the on-disk structs */
+ #if defined(__GNUC__) && defined(__sparc__)
+@@ -65,8 +65,8 @@
+ val += (c[i] << (8*(7-i++))); \
+ val;})
+ #else
+-#define bswabU32_inc(ptr) ptr = (UInt32*)ptr + 1
+-#define bswabU64_inc(ptr) ptr = (UInt64*)ptr + 1
++#define bswabU32_inc(ptr) *((UInt32*) (ptr)); ptr = (UInt32*)ptr + 1
++#define bswabU64_inc(ptr) *((UInt64*) (ptr)); ptr = (UInt64*)ptr + 1
+ #endif
+
+ #define bstoreU16_inc(ptr, val) *((UInt16*) (ptr)) = val; ptr = (UInt16*)ptr + 1
+
--- hfsplus-1.0.4.orig/debian/patches/00list
+++ hfsplus-1.0.4/debian/patches/00list
@@ -0,0 +1,9 @@
+120137_ftbfs_hppa_gcc3.0
+147838_sigbus_sparc
+231270_hpmount_destroys_hfs_volume_headers
+277810_ftbfs_include_gcc3.4
+286366_ftbfs_amd64_gcc4.0
+300289_ftbfs_ppc64_gcc4.0
+334016_broken_bswab_inc_macros
+396180_remove_unused_header
+99_types
--- hfsplus-1.0.4.orig/debian/patches/396180_remove_unused_header.dpatch
+++ hfsplus-1.0.4/debian/patches/396180_remove_unused_header.dpatch
@@ -0,0 +1,31 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 396180_remove_unused_header.dpatch by Martin Pitt
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix possible future FTBFS by removing an unused header.
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+diff -urNad hfsplus-1.0.4~/libhfsp/src/unicode.c hfsplus-1.0.4/libhfsp/src/unicode.c
+--- hfsplus-1.0.4~/libhfsp/src/unicode.c 2002-03-05 20:50:29.000000000 +0100
++++ hfsplus-1.0.4/libhfsp/src/unicode.c 2006-10-30 18:50:04.181626115 +0100
+@@ -16,7 +16,6 @@
+ #include
+ #include
+ #include
+-#include
+
+ #define __USE_GNU
+ /* need wcsrtomb */
--- hfsplus-1.0.4.orig/debian/control
+++ hfsplus-1.0.4/debian/control
@@ -0,0 +1,43 @@
+Source: hfsplus
+Section: otherosfs
+Priority: optional
+Maintainer: Aurélien GÉRÔME
+Build-Depends: autotools-dev, docbook-to-man, debhelper (>= 4), dpatch, libtool, autoconf, automake1.9
+Standards-Version: 3.7.2
+
+Package: libhfsp0
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}
+Description: Shared library to access HFS+ formatted volumes
+ HFS+ is a modernized version of Apple Computers HFS Filesystem.
+ Nowadays, it is widely used with more recent versions of MacOS.
+ hfsplus consists of a library and a set of tools that allow access
+ to HFS+ volumes.
+ .
+ This package contains a shared version of the library.
+
+Package: hfsplus
+Architecture: any
+Section: otherosfs
+Depends: ${shlibs:Depends}
+Description: Tools to access HFS+ formatted volumes
+ HFS+ is a modernized version of Apple Computers HFS Filesystem.
+ Nowadays, it is widely used with more recent versions of MacOS.
+ hfsplus consists of a library and a set of tools that allow access
+ to HFS+ volumes.
+ .
+ This package contains the tools themselves.
+
+Package: libhfsp-dev
+Architecture: any
+Section: libdevel
+Depends: libhfsp0 (= ${Source-Version}), libc6-dev
+Description: Library to access HFS+ formatted volumes
+ HFS+ is a modernized version of Apple Computers HFS Filesystem.
+ Nowadays, it is widely used with more recent versions of MacOS.
+ hfsplus consists of a library and a set of tools that allow access
+ to HFS+ volumes.
+ .
+ This package contains everything you need to write programs that use
+ this library, i.e. header files and an archive version of the library.
--- hfsplus-1.0.4.orig/debian/rules
+++ hfsplus-1.0.4/debian/rules
@@ -0,0 +1,101 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+include /usr/share/dpatch/dpatch.make
+
+# shared library versions, option 1
+version=0.0.0
+major=0
+
+configure: patch configure-stamp
+configure-stamp:
+ dh_testdir
+ libtoolize
+ aclocal
+ autoheader
+ automake -a
+ autoconf
+
+ ./configure --prefix=/usr
+
+ touch configure-stamp
+
+build: configure build-stamp
+build-stamp:
+ dh_testdir
+
+ (cd debian; \
+ for man in hfsplus.7 hpcd.1 hpcopy.1 hpfsck.1 \
+ hpls.1 hpmkdir.1 hpmount.1 hppwd.1 \
+ hprm.1 hpumount.1; \
+ do docbook-to-man `echo $$man|sed 's/[17]/sgml/'` >$$man; \
+ done)
+ $(MAKE) CFLAGS="-O2 -g -Wall"
+
+ touch build-stamp
+
+clean: clean1 unpatch
+clean1:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ -$(MAKE) -k clean maintainer-clean
+ find . -type l -exec rm {} \;
+ rm -rf conftest conftest.o debian/*.[17] \
+ doc/Makefile.in doc/Makefile libhfsp/src/Makefile.in \
+ libhfsp/test/.deps/ libhfsp/test/Makefile.in \
+ libhfsp/test/Makefile libhfsp/Makefile.in config.h.in
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/hfsplus
+ install -c -m 644 -o root -g root libhfsp/src/*.h $(CURDIR)/debian/libhfsp-dev/usr/include/hfsplus
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+#
+# build library packages by moving files from hfsplus
+#
+ dh_movefiles --sourcedir=debian/hfsplus -plibhfsp$(major) \
+ usr/lib/libhfsp.so.$(major) usr/lib/libhfsp.so.$(version)
+ dh_movefiles --sourcedir=debian/hfsplus -plibhfsp-dev \
+ usr/lib/libhfsp.so usr/lib/libhfsp.a usr/lib/libhfsp.la
+ rmdir debian/hfsplus/usr/lib
+ dh_installdocs doc/*.html
+ dh_installman
+ dh_installchangelogs ChangeLog
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# Any other binary targets build just one binary package at a time.
+binary-%: build install
+ make -f debian/rules binary-common DH_OPTIONS=-p$*
+
+binary: binary-indep binary-arch
+.PHONY: build clean clean1 binary-indep binary-arch binary install configure
--- hfsplus-1.0.4.orig/debian/changelog
+++ hfsplus-1.0.4/debian/changelog
@@ -0,0 +1,165 @@
+hfsplus (1.0.4-12build1) feisty; urgency=low
+
+ * Rebuild for changes in the amd64 toolchain.
+
+ -- Matthias Klose Mon, 5 Mar 2007 01:18:17 +0000
+
+hfsplus (1.0.4-12) unstable; urgency=low
+
+ * Fix possible future FTBFS by removing an unused header.
+ Add 396180_remove_unused_header.dpatch.
+ Thanks to Martin Pitt. (Closes: #396180)
+
+ -- Aurélien GÉRÔME Mon, 30 Oct 2006 18:42:24 +0100
+
+hfsplus (1.0.4-11) unstable; urgency=low
+
+ * New maintainer. (Closes: #387337)
+ * Update to the latest Standards-Version.
+ * Update description in debian/control.
+ * Add debian/compat to update debhelper to compatibility level 4.
+ * Update Upstream URL in debian/copyright.
+ * Add debian/watch.
+ * Fix bashism in debian/rules. (Closes: #378358)
+ * Conform to policy by building with CFLAGS="-O2 -g -Wall".
+ * Add dpatch support.
+ * The debian diff contained the following files generated by
+ auto{header,conf,make} which were not removed after the build
+ process:
+ - doc/Makefile.in;
+ - doc/Makefile;
+ - libhfsp/src/Makefile.in;
+ - libhfsp/test/.deps/test.Po;
+ - libhfsp/test/Makefile.in;
+ - libhfsp/test/Makefile;
+ - libhfsp/Makefile.in;
+ - config.h.in => run autoheader between aclocal and automake
+ in debian/rules.
+ Remove those files and add proper clean support for them.
+
+ -- Aurélien GÉRÔME Thu, 14 Sep 2006 05:12:33 +0200
+
+hfsplus (1.0.4-10) unstable; urgency=low
+
+ * Fixed problem on hpmount while trying to detect HFS+ volumes.
+ - Thanks to Piotr Krysiuk (Closes: #334016).
+
+ -- David Moreno Garza Sun, 16 Oct 2005 03:01:26 -0500
+
+hfsplus (1.0.4-9) unstable; urgency=low
+
+ * Updated policy version.
+ * New maintainer's address.
+
+ -- David Moreno Garza Sun, 4 Sep 2005 19:34:59 -0500
+
+hfsplus (1.0.4-8) unstable; urgency=low
+
+ * Added another small patch by Andreas Jochens, fixing a build error
+ with version 4.0 of gcc on ppc64 (closes: Bug#300289).
+
+ -- Jens Schmalzing Mon, 21 Mar 2005 09:22:38 +0100
+
+hfsplus (1.0.4-7) unstable; urgency=low
+
+ * Applied a small patch by Andreas Jochens, fixing a build error with
+ the upcoming version 4.0 of gcc (closes: Bug#286366).
+
+ -- Jens Schmalzing Tue, 4 Jan 2005 15:19:02 +0100
+
+hfsplus (1.0.4-6) unstable; urgency=low
+
+ * Applied a small patch by Andreas Jochens, fixing a build error with
+ the current version 3.4 of gcc (closes: Bug#277810).
+
+ * Updated policy version.
+
+ * Got rid of a number of empty directories.
+
+ -- Jens Schmalzing Fri, 22 Oct 2004 20:13:10 +0200
+
+hfsplus (1.0.4-5) unstable; urgency=low
+
+ * Patched the volume opening code to not write anything if the volume
+ didn't open properly (closes: Bug#231270). Thanks a lot to Frank
+ Lichtenheld for the patch.
+
+ * Run libtoolize in the configure stage of debian/rules.
+
+ * Depend on automaken for building, not a specific version of automake.
+
+ -- Jens Schmalzing Sat, 20 Mar 2004 22:00:34 +0100
+
+hfsplus (1.0.4-4) unstable; urgency=low
+
+ * Corrected section of hfsplus in debian/control.
+
+ -- Jens Schmalzing Wed, 27 Aug 2003 17:07:35 +0200
+
+hfsplus (1.0.4-3) unstable; urgency=low
+
+ * Finally fix the long-standing alignment issue on all platforms
+ (closes: #147838). Thanks very much to Steve Langasek for the patch!
+
+ -- Jens Schmalzing Wed, 27 Aug 2003 16:34:17 +0200
+
+hfsplus (1.0.4-2) unstable; urgency=low
+
+ * Used platform independent type definitions so the code runs properly
+ on 64bit platforms. This closes Bug#147838, which was by conincidence
+ filed exactly one year ago. Happy Birthday, Bug!
+
+ * Put the libhfsplus-dev package into the newly created libdevel
+ category. This makes the package compliant with the latest policy
+ version.
+
+ * Slightly changed the copyright file to appease lintian.
+
+ -- Jens Schmalzing Fri, 23 May 2003 17:36:25 +0200
+
+hfsplus (1.0.4-1) unstable; urgency=low
+
+ * New upstream version at the request of Jonathan Riddell. Most
+ notably, this version adds experimental support for creating
+ directories and deleting files.
+
+ * Install header file into a separate directory to resolve an existing
+ namespace conflict and prevent future ones (closes: Bug#148302).
+
+ * Build depend on automake1.4 instead of automake, to work around
+ configuration problems. Thanks to Steve Robbins for pointing this
+ out.
+
+ * Added and updated a few manpages.
+
+ -- Jens Schmalzing Fri, 19 Jul 2002 19:02:59 +0200
+
+hfsplus (1.0.2-4) unstable; urgency=low
+
+ * Fixed a typo in the copyright file (closes: Bug#126963).
+
+ * Took the opportunity to clean out the other lintian warnings as well.
+
+ -- Jens Schmalzing Sun, 30 Dec 2001 11:31:48 +0100
+
+hfsplus (1.0.2-3) unstable; urgency=low
+
+ * Removed a NULL value from a case statement, so the package will build
+ with gcc-3.0 (closes: Bug#120137).
+
+ -- Jens Schmalzing Mon, 19 Nov 2001 15:36:55 +0000
+
+hfsplus (1.0.2-2) unstable; urgency=low
+
+ * Architecture changed from powerpc to any (closes: Bug#95337). I don't
+ see how the package should be useful on anything but PowerPC hardware,
+ given that it only reads HFS+ volumes which still need to be created
+ and populated by MacOS. But you never know ...
+
+ -- Jens Schmalzing Fri, 27 Apr 2001 09:44:40 +0200
+
+hfsplus (1.0.2-1) unstable; urgency=low
+
+ * Initial Release (closes: Bug#89426).
+
+ -- Jens Schmalzing Sun, 11 Mar 2001 22:02:06 +0100