info-mtools
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Info-mtools] mtools-4.0.17, big disks, 64bit off_t


From: is
Subject: [Info-mtools] mtools-4.0.17, big disks, 64bit off_t
Date: Wed, 8 Aug 2012 13:44:59 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hello,

mtools-(at least)4.0.17 tries hard to configure and conditionally set types
to use 64bit file offsets where available for seek()ing etc. However, the
easy case (sizeof(off_t)>4) is handled incorrectly: mt_size_t is set to
size_t - maybe a copy and paste from the fall-back-to-32bit case.

This type is used at least in init.c, when detecting media size and comparing
to the FAT geometry, consequently failing and erroring out with the message
"Big disks not supported on this architecture."

The patch does handle the (e.g. NetBSD since 1994) case of 64bit
off_t the same as the case where a off64_t is available (and the
other 64bit off_t-equivalent cases); namely using off_t as mt_size_t.

Thanks to riastradh at netbsd.org for pointing out where the bug
in llong.h was.

$NetBSD$

--- llong.h.orig        2010-10-03 16:00:42.000000000 +0000
+++ llong.h
@@ -25,7 +25,7 @@
 /* if off_t is already 64 bits, be happy, and don't worry about the
  * loff_t and llseek stuff */
 #define MT_OFF_T off_t
-#define MT_SIZE_T size_t
+#define MT_SIZE_T off_t
 #endif

 #ifndef MT_OFF_T

Regards,
        -is



reply via email to

[Prev in Thread] Current Thread [Next in Thread]