1
/* Sample program for configure to test Large File support on target
5
#define _LARGEFILE_SOURCE
7
#define _FILE_OFFSET_BITS 64
14
int main( int, char **argv )
16
// check that off_t can hold 2^63 - 1 and perform basic operations...
17
#define OFF_T_64 (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
18
if (OFF_T_64 % 2147483647 != 1)
21
// stat breaks on SCO OpenServer
23
stat( argv[0], &buf );
24
if (!S_ISREG(buf.st_mode))
27
FILE *file = fopen( argv[0], "r" );
28
off_t offset = ftello( file );
29
fseek( file, offset, SEEK_CUR );