This is an extremely crude patch for gpart to make it compile under MacOS X. I suppose his version will not work as expected due to endianess issues. More testing is needed. --Maximillian Dornseif *** gpart-0.1h/src/gm_ntfs.h Mon Jan 29 21:33:58 2001 --- gpart-0.1h-mac/src/gm_ntfs.h Tue Oct 19 17:55:32 2004 *************** *** 40,45 **** --- 39,57 ---- typedef s64_t ntfs_u64; #endif /* NTFS_INTEGRAL_TYPES */ #endif /* defined(i386) || defined(__i386__) || defined(__alpha__) */ + + /* we would like some big endianess magic here, for now we play stupid */ + #if defined(__powerpc__) || defined(__APPLE__) + /* unsigned integral types */ + #ifndef NTFS_INTEGRAL_TYPES + #define NTFS_INTEGRAL_TYPES + typedef unsigned char ntfs_u8; + typedef unsigned short ntfs_u16; + typedef unsigned int ntfs_u32; + typedef s64_t ntfs_u64; + #endif /* NTFS_INTEGRAL_TYPES */ + #endif /* defined(__powerpc__) || defined(__APPLE__) */ + /* Macros reading unsigned integers from a byte pointer */ diff -rcbB gpart-0.1h/src/l64seek.h gpart-0.1h-mac/src/l64seek.h *** gpart-0.1h/src/l64seek.h Wed Dec 13 23:56:07 2000 --- gpart-0.1h-mac/src/l64seek.h Mon Oct 18 22:54:32 2004 *************** *** 32,37 **** --- 32,41 ---- typedef int64_t off64_t; #endif + #if defined(__APPLE__) + # include + typedef int64_t off64_t; + #endif #if defined(__FreeBSD__) typedef off_t off64_t;