The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM



Thread: Unsigned int
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 03-03-2002
Perderabo's Avatar
Perderabo Perderabo is online now
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,717
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.
Reply With Quote