[distcc] distcc 2.12.1 patch for Tru64 UNIX

Albert Chin distcc at mlists.thewrittenword.com
Thu Mar 4 18:41:36 GMT 2004


On Thu, Mar 04, 2004 at 10:31:05AM -0800, Wayne Davison wrote:
> 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.

Fails on Solaris but works on Tru64 UNIX.

-- 
albert chin (china at thewrittenword.com)



More information about the distcc mailing list