?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:gidsign: Myread Typedef gidtype Compile run ?MAKE: -pick add $@ %< ?S:gidsign: ?S: This variable contains the signedness of a gidtype. ?S: 1 for unsigned, -1 for signed. ?S:. ?C:Gid_t_sign: ?C: This symbol holds the signedness of a Gid_t. ?C: 1 for unsigned, -1 for signed. ?C:. ?H:#define Gid_t_sign $gidsign /* GID sign */ ?H:. ?T:yyy zzz ?F:!try : Check if GID is signed echo " " case "$gidtype" in *_t) zzz="$gidtype" ;; *) zzz="gid" ;; esac echo "Checking the sign of $zzz..." >&4 cat > try.c < #include int main() { $gidtype foo = -1; if (foo < 0) printf("-1\n"); else printf("1\n"); } EOCP set try if eval $compile; then yyy=`$run ./try` case "$yyy" in '') gidsign=1 echo "(I can't execute the test program--guessing unsigned.)" >&4 ;; *) gidsign=$yyy case "$gidsign" in 1) echo "Your $zzz is unsigned." ;; -1) echo "Your $zzz is signed." ;; esac ;; esac else gidsign=1 echo "(I can't compile the test program--guessing unsigned.)" >&4 fi