> See the code below, which just prints sizeof(long) > > drkirkby@hpbox:~$ /home/dclarke/local/bin/gcc test.c > drkirkby@hpbox:~$ file a.out > a.out: PA-RISC1.1 shared executable dynamically linked -not stripped > drkirkby@hpbox:~$ ./a.out > sizeof(long)=4 > drkirkby@hpbox:~$ /opt/hp-gcc64-4.4.0/bin/gcc test.c > drkirkby@hpbox:~$ file a.out > a.out: ELF-64 executable object file - PA-RISC 2.0 (LP64) > drkirkby@hpbox:~$ ./a.out > sizeof(long)=8 > drkirkby@hpbox:~$ cat test.c > #include <stdio.h> > int main(int argc, char **argv){ > > printf("sizeof(long)=%d\n",sizeof(long)); > } Please try this : /* * Main function */ /* Feature test switches */ #define _POSIX_SOURCE 1 /* System Headers */ #include <errno.h> #include <stdio.h> #include <sys/types.h> #include <time.h> #include <stdlib.h> #include <unistd.h> /* Macros */ #define TRUE 1 #define FALSE 0 /* External function */ /* * Function to print size of basic data types */ int main(int argc, char *argv[]) { printf ("\nC\n"); printf ( "sizeof char = %d\n", sizeof (char)); printf ( "sizeof double = %d\n", sizeof (double)); printf ( "sizeof float = %d\n", sizeof (float)); printf ( "sizeof int = %d\n", sizeof (int)); printf ( "sizeof long = %d\n", sizeof (long)); printf ( "sizeof long long = %d\n", sizeof (long long)); printf ( "sizeof short = %d\n", sizeof (short)); printf ( "sizeof void * = %d\n", sizeof (void *)); printf ( "sizeof clock_t = %d\n", sizeof (clock_t)); printf ( "sizeof gid_t = %d\n", sizeof (gid_t)); printf ( "sizeof pid_t = %d\n", sizeof (pid_t)); printf ( "sizeof size_t = %d\n", sizeof (size_t)); printf ( "sizeof ssize_t = %d\n", sizeof (ssize_t)); printf ( "sizeof time_t = %d\n", sizeof (time_t)); printf ( "sizeof uid_t = %d\n", sizeof (uid_t)); printf ( "sizeof \"\" = %d\n", sizeof ("")); return(0); } Also what do you get from gcc --version and please compile the above with gcc -v and show me what you see. -- Dennis Clarke dclarke@xxxxxxxxxxxxxx <- Email related to the open source Solaris dclarke@xxxxxxxxxxxxx <- Email related to open source for Solaris