From: Yukihiro Matsumoto Date: 2006-02-16T17:49:49+09:00 Subject: Re: pack("l"), 64 bit question Hi, In message "Re: pack("l"), 64 bit question" on Thu, 16 Feb 2006 17:45:50 +0900, H.Yamamoto writes: | |>This means EXTEND32() macro in pack.c is not working on 64bit Solaris |>(and perhaps on other 64bit systems neither). I have no 64bit machine |>at hand. Could somebody confirm? | |Me neigher. But we can use HP TestDrive :-) | |Probably this patch will solve the problem. Daniel, could you try this patch on your 64bit box? matz. |--- pack.c 13 Oct 2005 14:30:49 -0000 1.62.2.12 |+++ pack.c 16 Feb 2006 06:01:07 -0000 |@@ -347,11 +347,11 @@ num2i32(x) | return 0; /* not reached */ | } | |-#if SIZEOF_LONG == SIZE32 || SIZEOF_INT == SIZE32 |+#if SIZEOF_LONG == SIZE32 | # define EXTEND32(x) | #else | /* invariant in modulo 1<<31 */ |-# define EXTEND32(x) do {if (!natint) {(x) = (I32)(((1<<31)-1-(x))^~(~0<<31));}} while(0) |+# define EXTEND32(x) do { if (!natint) {(x) = (((1L<<31)-1-(x))^~(~0L<<31));}} while(0) | #endif | #if SIZEOF_SHORT == SIZE16 | # define EXTEND16(x)