[distcc] distcc 2.12.1 patch for Tru64 UNIX

Albert Chin distcc at mlists.thewrittenword.com
Thu Mar 4 16:29:13 GMT 2004


On Sun, Feb 29, 2004 at 02:41:05PM +1100, Martin Pool wrote:
> On 19 Feb 2004, Albert Chin <distcc at mlists.thewrittenword.com> wrote:
> > Tru64 UNIX was failing the ParseMask_Case test until I applied the
> > patch below.
> > 
> > -- 
> > albert chin (china at thewrittenword.com)
> > 
> > -- snip snip
> > --- 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) ~0U;
> >          else
> > -            *mask = htonl(~(~0UL >> mask_bits));
> > +            *mask = htonl(~(~0U >> mask_bits));
> >      } else {
> > -        *mask = (in_addr_t) ~0UL;
> > +        *mask = (in_addr_t) ~0U;
> >      }
> >      return 0;
> >  }
> 
> Sorry, I don't understand properly why this is needed. 
> 
> I suppose long on tru64 is 64 bits.  Won't truncation just work when
> it's cast into in_addr_t?

sizeof(long) == 8
in_addr_t is 'unsigned int' and sizeof(int) == 4.

-- 
albert chin (china at thewrittenword.com)



More information about the distcc mailing list