gpsd-dev
[Top][All Lists]
Advanced

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

Re: long long unsigned on 32-bit machines


From: Greg Troxel
Subject: Re: long long unsigned on 32-bit machines
Date: Sun, 26 Jan 2020 12:04:15 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (berkeley-unix)

Sanjeev Gupta <address@hidden> writes:

[The rest of the issues  have been adequately discussed.]

> BTW, is anyone else running on 32-bits, in production?

I find this to be a bizarre question for two reasons.

First, we are nowhere near the point where it can be assumed that a
POSIX-compliant system is overwhelmingly likely to have a 64-bit CPU
architecture.  (We are to the point where it can be assumed that a UNIX
system is not running on a 16-bit CPU, with apologies to the PDP-11 and
2.11BSD crowds.)

It seems obvious to me that many systems are in use with 32-bit CPUs (or
running in a 32-bit CPU mode even if the hardware can do different
things).  I personally have a half dozen.

So any suggestion that gpsd is even sort of on the cusp of being changed
to only build on 64-bit CPU types is frightening.

Regardless, code has to be written portably, and C is messy in that the
width of types like "long" is not specified.

Second, people talk about "32-bit" and "64-bit" as if that defines the
CPU type.  Word size is one thing, and then there is CPU architecture
family.  I think you were asking "is anyone using any 32-bit CPU type",
but there is a distressing trend to assume the world is all x86 and
that therefore 32- and 64-bit are specific CPU types.

Keep in mind that on different CPU architectures, int, long, long long,
etc. may in general have different sizes even across two CPU types with
the same native word size.  A notable example is the DEC Alpha, where
int was 64 bits.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]