+++ /dev/null
-Index: file.c
-===================================================================
---- file.c.orig
-+++ file.c
-@@ -591,7 +591,7 @@ static Stream_t *_internalFileOpen(Strea
- Pattern.loopDetectRel = 0;
- Pattern.loopDetectAbs = first;
- if(!hash_lookup(filehash, (T_HashTableEl) &Pattern,
-- (T_HashTableEl **)&File, 0)){
-+ (T_HashTableEl **)(void *)&File, 0)){
- File->refs++;
- This->refs--;
- return (Stream_t *) File;
+++ /dev/null
-Index: configure.in
-===================================================================
---- configure.in.orig
-+++ configure.in
-@@ -110,10 +110,10 @@ dnl
- dnl
- AC_MSG_CHECKING(whether llseek declared in unistd.h)
- AC_CACHE_VAL(mtools_cv_have_llseek_prototype,
-- AC_TRY_COMPILE(
-+ [AC_TRY_COMPILE(
- [#include <unistd.h>], [extern int llseek(int);],
- [mtools_cv_have_llseek_prototype=no],
-- [mtools_cv_have_llseek_prototype=yes]))
-+ [mtools_cv_have_llseek_prototype=yes])])
- AC_MSG_RESULT($mtools_cv_have_llseek_prototype)
- if test "$mtools_cv_have_llseek_prototype" = yes; then
- AC_DEFINE([HAVE_LLSEEK_PROTOTYPE],1,[Define when you have an LLSEEK prototype])
-@@ -121,13 +121,13 @@ fi
-
- AC_MSG_CHECKING(whether lseek64 declared in unistd.h)
- AC_CACHE_VAL(mtools_cv_have_lseek64_prototype,
-- AC_TRY_COMPILE(
-+ [AC_TRY_COMPILE(
- [
- #include "sysincludes.h"
- #include <unistd.h>
- ], [extern int lseek64(int);],
- [mtools_cv_have_lseek64_prototype=no],
-- [mtools_cv_have_lseek64_prototype=yes]))
-+ [mtools_cv_have_lseek64_prototype=yes])])
- AC_MSG_RESULT($mtools_cv_have_lseek64_prototype)
- if test "$mtools_cv_have_lseek64_prototype" = yes; then
- AC_DEFINE([HAVE_LSEEK64_PROTOTYPE],1,[Define when you have an LSEEK64 prototype])
-@@ -163,12 +163,12 @@ dnl Check for 64-bit off_t
- dnl
- AC_DEFUN(SFS_CHECK_OFF_T_64,
- [AC_CACHE_CHECK(for 64-bit off_t, sfs_cv_off_t_64,
--AC_TRY_COMPILE([
-+[AC_TRY_COMPILE([
- #include <unistd.h>
- #include <sys/types.h>
- ],[
- switch (0) case 0: case (sizeof (off_t) <= 4):;
--], sfs_cv_off_t_64=no, sfs_cv_off_t_64=yes))
-+], sfs_cv_off_t_64=no, sfs_cv_off_t_64=yes)])
- if test $sfs_cv_off_t_64 = yes; then
- AC_DEFINE([HAVE_OFF_T_64],1,[Define when the system has a 64 bit off_t type])
- fi])
+++ /dev/null
---- mtools.conf
-+++ mtools.conf
-@@ -14,25 +14,20 @@
- # You should have received a copy of the GNU General Public License
- # along with Mtools. If not, see <http://www.gnu.org/licenses/>.
-
--# Example mtools.conf files. Uncomment the lines which correspond to
--# your architecture and comment out the "SAMPLE FILE" line below
--SAMPLE FILE
-+drive a: file="/dev/fd0" exclusive mformat_only cylinders=80 heads=2 sectors=18
-+drive b: file="/dev/fd1" exclusive mformat_only cylinders=80 heads=2 sectors=18
-
--# # Linux floppy drives
--# drive a: file="/dev/fd0" exclusive
--# drive b: file="/dev/fd1" exclusive
-+# First SCSI hard disk partition
-+drive c: file="/dev/sda1"
-
--# # First SCSI hard disk partition
--# drive c: file="/dev/sda1"
-+# First IDE hard disk partition
-+#drive c: file="/dev/hda1"
-
--# # First IDE hard disk partition
--# drive c: file="/dev/hda1"
-+#dosemu floppy image
-+drive m: file="/var/lib/dosemu/diskimage"
-
--# # dosemu floppy image
--# drive m: file="/var/lib/dosemu/diskimage"
--
--# # dosemu hdimage
--# drive n: file="/var/lib/dosemu/diskimage" offset=3840
-+#dosemu hdimage
-+drive n: file="/var/lib/dosemu/hdimage.first" MTOOLS_SKIP_CHECK=1 MTOOLS_LOWER_CASE=1 MTOOLS_NO_VFAT=1 partition=1 offset=128
-
- # # Atari ramdisk image
- # drive o: file="/tmp/atari_rd" offset=136
-@@ -60,21 +55,4 @@
- # ZIP drive on SCSI ID 6
- #drive z: file="/dev/scsi_disk_060" offset=16384 fat_bits=16
-
--# SCO Unix 3.2v4
--# # Floppy disk drives
--#
--# drive a: file="/dev/install" exclusive
--# drive b: file="/dev/install1" exclusive
--#
--# # SCSI hard disk partitions
--#
--# drive c: file="/dev/dsk/0sC"
--# drive d: file="/dev/dsk/0sD"
--# drive e: file="/dev/dsk/0sE"
--# drive f: file="/dev/dsk/0sF"
--# drive g: file="/dev/dsk/0sG"
--# drive h: file="/dev/dsk/0sH"
--
--# # uncomment the following line to display all file names in lower
--# # case by default
--# mtools_lower_case=1
-+mtools_lower_case=1
+++ /dev/null
-Index: fat.c
-===================================================================
---- fat.c.orig
-+++ fat.c
-@@ -722,7 +722,7 @@ static int old_fat_read(Fs_t *This, unio
- if(check_media_type(This,boot, tot_sectors))
- return -1;
-
-- if(This->num_clus >= FAT12) {
-+ if(This->num_clus >= FAT12 || config_fat_bits == 16) {
- set_fat16(This);
- /* third FAT byte must be 0xff */
- if(!mtools_skip_check && readByte(This, 3) != 0xff)
+++ /dev/null
-Index: mformat.c
-===================================================================
---- mformat.c.orig
-+++ mformat.c
-@@ -19,6 +19,7 @@
- */
-
- #define DONT_NEED_WAIT
-+#define DONT_NEED_IN
-
- #include "sysincludes.h"
- #include "msdos.h"
-@@ -48,7 +49,7 @@
-
- #define _LINUX_STRING_H_
- #define kdev_t int
--#include "linux/fs.h"
-+#include "sys/mount.h"
- #undef _LINUX_STRING_H_
-
- #endif
-Index: mpartition.c
-===================================================================
---- mpartition.c.orig
-+++ mpartition.c
-@@ -17,6 +17,7 @@
- * mformat.c
- */
- #define DONT_NEED_WAIT
-+#define DONT_NEED_IN
-
- #include "sysincludes.h"
- #include "msdos.h"
-@@ -35,7 +36,7 @@
-
- #define _LINUX_STRING_H_
- #define kdev_t int
--#include "linux/fs.h"
-+#include "sys/mount.h"
- #undef _LINUX_STRING_H_
-
- #endif
-Index: sysincludes.h
-===================================================================
---- sysincludes.h.orig
-+++ sysincludes.h
-@@ -331,12 +331,16 @@ typedef unsigned int uid_t;
- #endif
-
- #ifdef HAVE_NETINET_IN_H
-+#ifndef DONT_NEED_IN
- #include <netinet/in.h>
- #endif
-+#endif
-
- #ifdef HAVE_ARPA_INET_H
-+#ifndef DONT_NEED_IN
- #include <arpa/inet.h>
- #endif
-+#endif
-
- #ifdef HAVE_NETDB_H
- #include <netdb.h>
Url: http://mtools.linux.lu/
Group: System/Filesystems
Source: %{name}-%{version}.tar.bz2
-Patch0: %{name}-%{version}-conf.diff
-Patch1: %{name}-%{version}-autoconf.diff
-Patch3: %{name}-%{version}-aliasing.diff
-Patch4: %{name}-%{version}-fat-bits.diff
-Patch5: %{name}-%{version}-prototypes.diff
BuildRequires: autoconf
BuildRequires: makeinfo
%prep
%setup -q
-%patch0
-%patch1
-%patch3
-%patch4
-%patch5
%build
autoconf --force