Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/usr.bin/gencat



On Thu, Apr 16, 2009 at 01:52:52PM +0000, Matthias Scheler wrote:
 > Modified Files:
 >      src/usr.bin/gencat: gencat.c
 > 
 > Log Message:
 > Fix build problem on big endian ports where ntohl() doesn't convert the
 > argument to "uint32_t" automatically.
 > 
 > To generate a diff of this commit:
 > cvs rdiff -u -r1.28 -r1.29 src/usr.bin/gencat/gencat.c

-       if (ntohl(cat_hdr.__magic) != _NLS_MAGIC)
+       if (ntohl((uint32_t)cat_hdr.__magic) != _NLS_MAGIC)

Dare I ask how ntohl is defined on these platforms? I would have
expected that routine integer promotions would make the argument 32
bits wide.

If that isn't the case it might be better to adjust how ntohl is
defined...?

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index