Last change
on this file since 3547 was
11,
checked in by aslmd, 14 years ago
|
spiga@svn-planeto:ajoute le modele meso-echelle martien
|
File size:
934 bytes
|
Line | |
---|
1 | #define _FILE_OFFSET_BITS 64 |
---|
2 | #include <stdio.h> |
---|
3 | #include <stdlib.h> |
---|
4 | #include <errno.h> |
---|
5 | main() |
---|
6 | { |
---|
7 | FILE *fp ; |
---|
8 | long long y ; |
---|
9 | int retval ; |
---|
10 | int result1 ; |
---|
11 | #ifdef TEST_FSEEKO |
---|
12 | off_t x ; |
---|
13 | off_t result2 ; |
---|
14 | #endif |
---|
15 | #ifdef TEST_FSEEKO64 |
---|
16 | long long x ; |
---|
17 | int result2 ; |
---|
18 | #endif |
---|
19 | fp = NULL ; |
---|
20 | fp = fopen( "Makefile" , "r" ) ; |
---|
21 | #ifdef TEST_FSEEKO |
---|
22 | x = 0xffffffff ; |
---|
23 | result1 = (sizeof(x) == 8) ; |
---|
24 | result2 = fseeko( fp, x, SEEK_SET ) ; |
---|
25 | #endif |
---|
26 | #ifdef TEST_FSEEKO64 |
---|
27 | x = 0xffffffffL ; |
---|
28 | result1 = (sizeof(x) == 8) ; |
---|
29 | result2 = fseeko64( fp, x, SEEK_SET ) ; |
---|
30 | #endif |
---|
31 | if ( result2 ) perror("error") ; |
---|
32 | fprintf(stdout,"pointer is 8 bytes: %s\n",result1?"true":"false") ; |
---|
33 | fprintf(stdout,"seek returns correctly: %s\n",!result2?"true":"false") ; |
---|
34 | if ( result1 && !result2 ) { |
---|
35 | fprintf(stdout,"status: OK\n") ; |
---|
36 | retval = 0 ; |
---|
37 | } else { |
---|
38 | fprintf(stdout,"status: BUMMER\n") ; |
---|
39 | retval = 1 ; |
---|
40 | } |
---|
41 | fclose(fp) ; |
---|
42 | exit(retval) ; |
---|
43 | } |
---|
44 | |
---|
Note: See
TracBrowser
for help on using the repository browser.