?RCS: $Id$ ?RCS: ?RCS: Copyright (c) 1999 Jarkko Hietaniemi ?RCS: ?RCS: You may distribute under the terms of either the GNU General Public ?RCS: License or the Artistic License, as specified in the README file. ?RCS: ?MAKE:uselargefiles: Myread Oldconfig Setvar test lseeksize fpossize \ fpostype Compile echo n c cat lseektype rm ?MAKE: -pick add $@ %< ?Y:TOP ?S:uselargefiles: ?S: This variable conditionally defines the USE_LARGE_FILES symbol, ?S: and indicates that large file interfaces should be used when ?S: available. The use64bits symbol will also be turned on if necessary. ?S:. ?C:USE_LARGE_FILES: ?C: This symbol, if defined, indicates that large file support ?C: should be used when available. The USE_64_BITS symbol will ?C: also be turned on if necessary. ?C:. ?H:?%<:#ifndef USE_LARGE_FILES ?H:?%<:#$uselargefiles USE_LARGE_FILES /**/ ?H:?%<:#endif ?H:. ?F:!uselfs.cbu !try ?T:yyy zzz ?LINT:set uselargefiles ?LINT:extern use64bits ?LINT:change use64bits ?LINT:change lseeksize ?LINT:change fpossize case "$lseeksize:$fpossize" in 8:8) cat <&4 $cat >try.c < #include int main() { printf("%d\n", (int)sizeof($lseektype)); return(0); } EOCP set try if eval $compile_ok; then lseeksize=`./try` $echo "Your file offsets are now $lseeksize bytes long." else dflt="$lseeksize" echo " " echo "(I can't seem to compile the test program. Guessing...)" rp="What is the size of your file offsets (in bytes)?" . ./myread lseeksize="$ans" fi case "$fpostype" in *_t) zzz="$fpostype" ;; *) zzz="fpos_t" ;; esac $echo $n "Rechecking the size of $zzz...$c" >&4 $cat > try.c < #include int main() { printf("%d\n", (int)sizeof($fpostype)); exit(0); } EOCP set try if eval $compile_ok; then yyy=`./try` dflt="$lseeksize" case "$yyy" in '') echo " " echo "(I can't execute the test program--guessing $fpossize.)" >&4 ;; *) fpossize=$yyy echo " $fpossize bytes." >&4 ;; esac else dflt="$fpossize" echo " " echo "(I can't compile the test program. Guessing...)" >&4 rp="What is the size of your file positions (in bytes)?" . ./myread fpossize="$ans" fi $rm -f try.c try fi ;; esac