Mail Archives: djgpp/2000/02/24/18:03:39
Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> writes:
> On Thu, 24 Feb 2000, Dieter Buerssner wrote:
>
> > unsigned long l;
> > float x;
> > fread(&l, sizeof l, 1, fp);
> > l = ntohl(l);
> > x = *(float *)&l;
> >
> > My question, is this really more portable? In the libc info for ntohl
> > under Portability I read: not ANSI, not POSIX. Is this function
> > generally available?
>
> I've seen them on every Unix box I had access to.
>
> > Also, one other problem might arise when
> > unsigned long is 64bit (i.e. Alpha, which uses IEEE floating point).
>
> I don't have access to an Alpha to check. Anybody?
I do, but the original test program has been snipped, and I'm not
entirely sure from context what it was testing. Someone care to send
it to me?
--
Nate Eldredge
neldredge AT hmc DOT edu
- Raw text -