[omniORB] Declaration of _CORBA_ULONGLONG_DECL on gcc (32 and 64 - bit)

Matej Kenda matejken at gmail.com
Mon Jul 13 13:53:09 BST 2009


On Thu, Jul 2, 2009 at 10:28 AM, Duncan Grisby<duncan at grisby.org> wrote:
> That's a historical artifact -- the trad version predates GCC on 64 bit
> platforms. I don't think anyone really uses the trad build on
> non-Windows platforms any more do they?

I doubt that.

>> Example:
>>
>> CORBA::Any_var any_value;
>> any_value = server->GetParameterByName("parameter.name");
>> unsigned long long value;
>> any_value ==> value;
>>
>> This code fails to compile for 64-bit target:
>
> You're not meant to mix non-CORBA types with CORBA types without being
> explicit about it, so that's not expected to work in the C++ mapping.
> There are too many integer types for all of them to map to CORBA types.
> The same issue arises on 32 bit platforms about whether CORBA::Long is
> int or long, for example.

Thank you for the explanation. It is definitely the best thing to do.

> I don't think it's appropriate to change the autoconf build to use long
> long for 64 bit types on 64 bit platforms. It definitely can't be done
> on the 4.1.x branch because it would break binary compatibility.

I can understand that.

Just a suggestion: Would it make sense to use mapping to types,
declared in <inttypes.h>, namely int32_t, uint32_t, int64_t uint64_t?

> Of course, nothing stops you from using your own patched version that
> does use long long.

Yes, that's true, however I prefer using "standard" packages, provided
by the Linux distribution.

Regards,

Matej



More information about the omniORB-list mailing list