3 * This code was copied from http://www.gromacs.org/
4 * and its toplevel COPYING file starts with:
6 * GROMACS is free software, distributed under the GNU General Public License
10 #cmakedefine _LARGEFILE_SOURCE
11 #cmakedefine _LARGEFILE64_SOURCE
12 #cmakedefine _LARGE_FILES
13 #cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
15 #include <sys/types.h>
19 int main(int argc, char **argv)
21 /* Cause a compile-time error if off_t is smaller than 64 bits,
22 * and make sure we have ftello / fseeko.
24 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
25 int off_t_is_large[ (LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1 ];
26 FILE *fp = fopen(argv[0],"r");
27 off_t offset = ftello( fp );
29 fseeko( fp, offset, SEEK_CUR );