On HP-UX, this program works:
Code:
#include<stdlib.h>
#include<stdio.h>
main()
{
long i;
i=5000000000;
printf("i = %ld \n", i);
exit (0);
}
To get this to work I had to specify the +DD64 option on the cc command. HP's compiler defaults to 32 bit mode.
This page says:
Quote:
The HP-UX 64-bit data model is called LP64 because longs and pointers are 64 bits. In this model, ints remain 32 bits.
The LP64 data model is the emerging standard on 64-bit UNIX systems provided by leading system vendors. Applications that transition to the LP64 data model on HP-UX systems are highly portable to other LP64 vendor platforms.
|