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

xtl not 64-bit compliant



The test programs "xdr" and "giop" in xtl-1.3/examples/tests
fail because xdr.h and giop.h make assumptions about the
size of the intrinsic data types. I'll make a patch to sort
this out, but thought you might be interested in the
results of a small program on an Alpha machine.

Angus

+++++++++++++++++++++++++++++++++++++++++++++++++++
#include <iostream.h>

int main()
{
	bool aBool;
	char aChar;
	unsigned char anUChar;
	short aShort;
	unsigned short anUShort;
	int anInt; 
	unsigned int anUInt;
	long aLong; 
	unsigned long anULong;
	long long aLongLong; 
	unsigned long long anULongLong;
	float aFloat;
	double aDouble;

	cout << "bool               " << sizeof( aBool ) << "\n"
	     << "char               " << sizeof( aChar ) << "\n"
	     << "unsigned char      " << sizeof( anUChar ) << "\n"
	     << "short              " << sizeof( aShort ) << "\n"
	     << "unsigned short     " << sizeof( anUShort ) << "\n"
	     << "int                " << sizeof( anInt ) << "\n"
	     << "unsigned int       " << sizeof( anUInt ) << "\n"
	     << "long               " << sizeof( aLong ) << "\n"
	     << "unsigned long      " << sizeof( anULong ) << "\n"
	     << "long long          " << sizeof( aLongLong ) << "\n"
	     << "unsigned long long " << sizeof( anULongLong ) << "\n"
	     << "float              " << sizeof( aFloat ) << "\n"
	     << "double             " << sizeof( aDouble ) << endl;

	return 1;
}
+++++++++++++++++++++++++++++++++++++++++++++++++++
bool			8
char			1
unsigned char		1
short			2
unsigned short		2
int			4
unsigned int		4
long			8
unsigned long		8
long long		8
unsigned long long	8
float			4
double			8