tags 312120 patch thanks This is also reproducible on IA64, and probably any 64-bit system other than the Alpha and 64-bit MIPS that it specifically tests for.
Here's a patch that appears to make it generally 64-bit clean which I
have tested on IA64:
diff -urN xpm2wico-0.2.4.3/src/readicon.c xpm2wico-mine/src/readicon.c
--- xpm2wico-0.2.4.3/src/readicon.c 2003-12-31 21:02:57.000000000 +0000
+++ xpm2wico-mine/src/readicon.c 2006-01-22 21:33:14.000000000 +0000
@@ -30,11 +30,11 @@
printf ("reserved = %x\n"
"type = %x\n"
"count = %x\n"
- "entries = %x\n\n",
+ "entries = %p\n\n",
icon_dir->idReserved,
icon_dir->idType,
icon_dir->idCount,
- (int) icon_dir->idEntries);
+ icon_dir->idEntries);
}
void print_icon_dir_entry (IconDirEntry *icon_dir_entry)
diff -urN xpm2wico-0.2.4.3/src/winutils.h xpm2wico-mine/src/winutils.h
--- xpm2wico-0.2.4.3/src/winutils.h 2002-10-04 06:27:39.000000000 +0100
+++ xpm2wico-mine/src/winutils.h 2006-01-22 16:25:06.000000000 +0000
@@ -25,14 +25,9 @@
typedef unsigned char Byte;
typedef unsigned short Word;
-
-#if defined(__alpha) || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64)
typedef unsigned int DWord;
+/* Windows "long" is always a 32-bit signed integer */
typedef int Long;
-#else
-typedef unsigned long DWord;
-typedef long Long;
-#endif
/* Those functions read byte,word,dword,long in little-endian mode */
Byte read_byte (FILE *file);
diff -urN xpm2wico-0.2.4.3/src/xpm2wico.c xpm2wico-mine/src/xpm2wico.c
--- xpm2wico-0.2.4.3/src/xpm2wico.c 2003-12-31 21:12:11.000000000 +0000
+++ xpm2wico-mine/src/xpm2wico.c 2006-01-22 21:36:10.000000000 +0000
@@ -961,10 +961,10 @@
last_slash_ptr = strrchr (file_name, '/');
#endif
- if ((DWord) last_slash_ptr < (DWord) char_ptr)
+ if (last_slash_ptr < char_ptr)
{
ext = 1;
- delta = ((DWord) char_ptr - (DWord) file_name);
+ delta = char_ptr - file_name;
nlen = delta + 5;
}
else
signature.asc
Description: This is a digitally signed message part

