[distcc] distcc 2.12.1 patch for Tru64 UNIX

Wayne Davison wayned at samba.org
Thu Mar 4 18:31:05 GMT 2004


On Sun, Feb 29, 2004 at 02:41:05PM +1100, Martin Pool wrote:
> Sorry, I don't understand properly why this is needed. 

I wonder if it's just causing a warning?  You could move the '~' around
to eliminate the resizing:

--- src/access.c.orig	2004-02-19 02:14:33.000000000 -0600
+++ src/access.c	2004-02-19 02:14:43.000000000 -0600
@@ -95,11 +95,11 @@
          * is undefined.  (And indeed it fails on i386 because the SHR does
          * not saturate.)  */
         if (mask_bits == 32)
-            *mask = (in_addr_t) ~0UL;
+            *mask = ~(in_addr_t)0;
         else
-            *mask = htonl(~(~0UL >> mask_bits));
+            *mask = htonl(~(in_addr_t)0 << (32 - mask_bits));
     } else {
-        *mask = (in_addr_t) ~0UL;
+        *mask = ~(in_addr_t)0;
     }
     return 0;
 }

I switched the direction of the shift to avoid any problems with sign
extention.  I didn't test any of this, though.

..wayne..



More information about the distcc mailing list