OSF DCE Application Development Guide--Introduction and Style Guide

RPC Parameters
.
}
On a 32-bit machine, your code could probably use a short safely (since that is how your
implementation probably defines idl_short_int, but such usage is not portable to other
machine types and is therefore not recommended.
The following table shows the IDL to C type mappings for the IDL primitive types.
TABLE 6-2. IDL/NDR/C Type Mappings: Part 1
________________________________________________________________________
IDL Type NDR Type Defined C Type C Type
________________________________________________________________________
________________________________________________________________________
boolean boolean idl_boolean unsigned char
________________________________________________________________________
char character idl_char unsigned char
________________________________________________________________________
byte uninterpreted octet idl_byte unsigned char
________________________________________________________________________
small small idl_small_int char
________________________________________________________________________
short short idl_short_int short int
________________________________________________________________________
long long idl_long_int long int
________________________________________________________________________
16- or 32- Bit Machines:
Big Endian:
struct {
long high;
unsignedlong low;
}
Little Endian:
struct {
unsignedlong low;
long high;
}
64-Bit Machines:
long
hyper hyper idl_hyper_int
________________________________________________________________________
unsigned small unsigned small idl_usmall_int unsigned char
________________________________________________________________________
unsigned short unsigned short idl_ushort_int unsigned shortint
________________________________________________________________________
unsigned long unsigned long idl_ulong_int unsigned long int
________________________________________________________________________
16- or 32-Bit Machines:
Big Endian:
struct {
unsignedlong high;
unsignedlong low;
}
Little Endian:
struct {
unsignedlong low;
unsignedlong high;
unsigned hyper unsigned hyper idl_uhyper_int
________________________________________________________________________
124246 Tandem Computers Incorporated 67