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 Sun, Jul 12, 2009 at 04:41:47PM +0000, David Holland wrote:
> >> If that isn't the case it might be better to adjust how ntohl is
> >> defined...?
> >
> > Possibly. But I didn't want to change an important global interface,
> > at least not without prior discussion.
>
> Well, discussion time! :-)
Well, I guess it could look like this on Big Endian ports:
#define ntohl(x) ((uint32_t)(x))
But with that definition you could compile broken code like this ...
static char David[] = "Holland";
uint32_t foo;
foo = ntohl(David);
... on e.g. NetBSD/amiga. It would of course fail under NetBSD/i386
where ntohl() is a function that expects a uint32_t as the argument.
Kind regards
--
Matthias Scheler http://zhadum.org.uk/
Home |
Main Index |
Thread Index |
Old Index