Page 1 of 1

partimage-0.6.2 broken on AMD64

Posted: Thu Oct 28, 2004 8:21 pm
by Guest
hi

As you can see on http://bugs.gentoo.org/show_bug.cgi?id=69231, there are some problems with amd64. it's easy to make it compile with the following patch:

Code: Select all

--- src/client/fs/fs_xfs.h  2004-02-04 01:57:36.000000000 +0100
+++ src/client/fs/fs_xfs.h  2004-10-28 20:05:19.274522784 +0200
@@ -105,12 +105,9 @@
 typedef unsigned short int __uint16_t;
 typedef signed int __int32_t;
 typedef unsigned int   __uint32_t;
-#ifdef __ia64__
+#if __WORDSIZE == 64
 typedef signed long int    __int64_t;
 typedef unsigned long int  __uint64_t;
-#elif __alpha__
-typedef signed long int    __int64_t;
-typedef unsigned long int  __uint64_t;
 #else
 typedef signed long long int    __int64_t;
 typedef unsigned long long int  __uint64_t;
but then, i get the following error:

Code: Select all

# partimage
Error: sizeof(DWORD) != 4 (8)
This version has been compiled with an uncompatible version of gcc.
i already tried to add the following lines to the patch:

Code: Select all

--- src/client/fs/fs_xfs.h      2004-10-28 20:42:54.020749256 +0200
+++ src/client/fs/fs_xfs.h      2004-10-28 20:44:21.755411560 +0200
@@ -154,16 +154,8 @@
 typedef        __uint64_t      xfs_dfiloff_t;  // block number in a file
 typedef        __uint64_t      xfs_dfilblks_t; // number of blocks in a file

-#ifdef __ia64__
-typedef unsigned long  __u64;
-typedef signed long    __s64;
-#elif __alpha__
-typedef unsigned long  __u64;
-typedef signed long    __s64;
-#else
 typedef unsigned long long  __u64;
 typedef signed long long    __s64;
-#endif

 typedef __u64  xfs_off_t;
 //typedef __s32        xfs32_off_t;
--- src/client/partimage.h      2004-02-04 01:57:36.000000000 +0100
+++ src/client/partimage.h      2004-10-28 21:29:43.203688536 +0200
@@ -55,8 +55,8 @@
 typedef bool BOOL; // variant size
 typedef unsigned char BYTE; // 8 bits
 typedef unsigned short int WORD; // 16 bits
-typedef unsigned long int DWORD; // 32 bits
-typedef unsigned long long int QWORD; // 64 bits
+typedef unsigned int DWORD; // 32 bits
+typedef unsigned long int QWORD; // 64 bits

 #include "endianess.h"

but i still get the same error. please tell me when you fixed this issue (blubb at gentoo.org) or add a comment on the bugzilla page.

thanks

blubb