[omniORB] long long
Bill Janssen
janssen@parc.xerox.com
Wed, 8 Apr 1998 14:40:15 PDT
Excerpts from ext.omniorb: 8-Apr-98 Re: [omniORB] long long Sai-Lai
Lo@orl.co.uk (666*)
> // IDL
> typedef struct longlong {
> long hi;
> long lo;
> };
For platforms which don't have direct 64-bit support, this is like what
we do in the ILU kernel. We actually switch depending on the endianness
of the machine as to which "long" value comes first. We access long
longs in the kernel via macros which hide what the real implementation
is. Works pretty well.
We've been considering moving to an infinite-precision fixed-point model
(basically, do away with all built-in integer types and replace them
with a single fixed-point constructor, where by fixed-point we mean a
range of rational numbers with a fixed denominator) which simplifies
this kind of work, and in fact already have that working in our kernel.
In this model, there are always integer values (that is, constructed
fixed-point types with a denominator of 1) which fit within native C
types, and other values which don't. By providing a uniform framework
for this from the beginning, "long long" or any other outsize type just
fit right in.
Bill