?RCS:
?RCS: Copyright (c) 1999, Jarkko Hietaniemi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
-?MAKE:fpossize: Myread Typedef fpostype Compile
+?MAKE:fpossize: Myread Typedef fpostype Compile longsize run i_stdlib
?MAKE: -pick add $@ %<
?S:fpossize:
?S: This variable contains the size of a fpostype in bytes.
?S:.
-?C:Fpos_t_SIZE:
+?C:Fpos_t_size:
?C: This symbol holds the size of a Fpos_t in bytes.
?C:.
-?H:#define Fpos_t_SIZE $fpossize /* FPOS size */
+?H:#define Fpos_t_size $fpossize /* FPOS size */
?H:.
-?F:!try
?T:yyy zzz
-?LINT: set fpossize
+?F:!try
+: Check size for Fpos_t
echo " "
case "$fpostype" in
*_t) zzz="$fpostype" ;;
*) zzz="fpos_t" ;;
esac
-echo "Checking the size of $zzz..." >&4
+echo "Checking the size of $zzz..." >&4
cat > try.c <<EOCP
#include <sys/types.h>
#include <stdio.h>
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
int main() {
- printf("%d\n", sizeof($fpostype));
+ printf("%d\n", (int)sizeof($fpostype));
+ exit(0);
}
EOCP
set try
if eval $compile_ok; then
- yyy=`./try`
+ yyy=`$run ./try`
case "$yyy" in
'') fpossize=4
echo "(I can't execute the test program--guessing $fpossize.)" >&4
;;
*) fpossize=$yyy
- echo "Your $zzz size is $fpossize bytes."
+ echo "Your $zzz is $fpossize bytes long."
;;
esac
else
- fpossize=4
- echo "(I can't compile the test program--guessing $fpossize.)" >&4
+ dflt="$longsize"
+ echo " " >&4
+ 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
-