Developed by: John Walker, JSW Technology
Distributed by: Aonix
Copyright John Walker & JSW Technology 1997-2001.
All Rights Reserved.
The information contained herein is subject to change without notice.
ObjectAda is a trademark of Aonix
Microsoft, Visual C++, Win32 and Windows NT are trademarks of Microsoft, Inc.
Phar Lap is Registered in the U.S. Patent and Trademark Office by Phar Lap
Software, Inc.
ETS is a trademark of Phar Lap Software, Inc.
Last updated: 15 October 2001
This Release Note contains information that supplements the Ada Binding to the Phar Lap ETS Kernel software and documentation.
Go back to Ada Binding to the Phar Lap ETS Kernel
Go back to start of JSW Technology Home Page
The C Mapping Guide is not included on the CD ObjectAda Version 7.2 Documentation. It is included in the online help.
The 64 bit types, Int64 and Unsigned_Int64, in package VCTypes should have been declared with a representation clause, an alignment attribute and pragma convention C_Pass_By_Copy.
The full declaration of these types should be:
type Int64 is record
Low : unsigned;
High : int;
end record;
for Int64 use record
Low at 0 range 0 .. 31;
High at 4 range 0 .. 31;
end record;
for Int64'Alignment use 1;
pragma Convention (C_Pass_By_Copy, Int64);
type Unsigned_Int64 is record
Low : unsigned;
High : unsigned;
end record;
for Unsigned_Int64 use record
Low at 0 range 0 .. 31;
High at 4 range 0 .. 31;
end record;
for Unsigned_Int64'Alignment use 1;
pragma Convention (C_Pass_By_Copy, Unsigned_Int64);
Where a global object (function or data) is declared twice, once with a leading underline and once without, and both objects have the same type then the object with the leading underline is mapped to Ada without the underline and the object without the leading underline is not mapped.
This "optimisation" has proved to be too general as in the case of toupper, which has a different specification to _toupper. In this case the Ada function, toupper, is, incorrectly, mapped to the C function _toupper.
The optimisation has been applied in the following cases.
The optimisation has been removed from Version 3.2 of the bindings.
To work around this problem copy the function specification from the binding and remove the Link_Name. This will cause ObjectAda to map the function name to the link name. Note that it is case sensitive.
For example, instead of:
function toupper (
P1 : VC.Int)
return VC.Int;
pragma Import (cdecl, toupper, Link_Name=>"__toupper");
use:
function toupper (
P1 : VC.Int)
return VC.Int;
pragma Import (cdecl, toupper);