?RCS: ?RCS: Copyright (c) 1999, Jarkko Hietaniemi ?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 License; a copy of which may be found at the root ?RCS: of the source tree for dist 3.0. ?RCS: ?MAKE:uidsize: Myread Typedef uidtype Compile run i_stdlib ?MAKE: -pick add $@ %< ?S:uidsize: ?S: This variable contains the size of a uidtype in bytes. ?S:. ?C:Uid_t_size: ?C: This symbol holds the size of a Uid_t in bytes. ?C:. ?H:#define Uid_t_size $uidsize /* UID size */ ?H:. ?T:yyy zzz ?F:!try : Check size of UID echo " " case "$uidtype" in *_t) zzz="$uidtype" ;; *) zzz="uid" ;; esac echo "Checking the size of $zzz..." >&4 cat > try.c < #include #$i_stdlib I_STDLIB #ifdef I_STDLIB #include #endif int main() { printf("%d\n", (int)sizeof($uidtype)); exit(0); } EOCP set try if eval $compile_ok; then yyy=`$run ./try` case "$yyy" in '') uidsize=4 echo "(I can't execute the test program--guessing $uidsize.)" >&4 ;; *) uidsize=$yyy echo "Your $zzz is $uidsize bytes long." ;; esac else uidsize=4 echo "(I can't compile the test program--guessing $uidsize.)" >&4 fi