Image

Could someone with a 64 bit Linux system be kind enough to compile the code behind the cut tag with each of the compilation options, execute it, and post the results?

Thanks in advance, I'm working on an open source project and I'd like to at least make a stab at getting 64 bit file compatability.

Compilation 1, 32 bit file system:

cc sizeof.c -o sizeof

Compilation 2, 64 bit file system:

cc sizeof.c -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o sizeof



#include    <stdio.h>
#include    <stdlib.h>

int     main( void )
{
     printf( "\nsizeof( int )\t\t= %d ",        sizeof( int ));
     printf( "\nsizeof( long )\t\t= %d ",       sizeof( long ));
     printf( "\nsizeof( short )\t\t= %d ",      sizeof( short ));

     printf( "\nsizeof( off_t )\t\t= %d ",      sizeof( off_t ));
     printf( "\nsizeof( size_t )\t= %d ",       sizeof( size_t ));
     printf( "\nsizeof( ssize_t )\t= %d ",      sizeof( ssize_t ));
     printf( "\nsizeof( long long )\t= %d ",    sizeof( long long ));

#ifdef __USE_FILE_OFFSET64
     printf( "\n\nDefined: __USE_FILE_OFFSET64 " );
#endif

#ifdef _FILE_OFFSET_BITS
     printf( "\n\nDefined: _FILE_OFFSET_BITS " );
#endif

#ifdef _LARGEFILE_SOURCE
     printf( "\n\nDefined: _LARGEFILE_SOURCE " );
#endif

#ifdef __cplusplus
     printf( "\n\nDefined: __cplusplus " );
#endif

     printf( "\n\n" );

     return( 0 );
}