This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add sig/pid/uid size and sign probes.
[metaconfig.git] / U / typedefs / gidsign.U
CommitLineData
5d52f3dc
JH
1?RCS:
2?RCS: Copyright (c) 1999, Jarkko Hietaniemi
3?RCS:
4?RCS: You may redistribute only under the terms of the Artistic Licence,
5?RCS: as specified in the README file that comes with the distribution.
6?RCS: You may reuse parts of this distribution only within the terms of
7?RCS: that same Artistic Licence; a copy of which may be found at the root
8?RCS: of the source tree for dist 3.0.
9?RCS:
10?MAKE:gidsign: Myread Typedef gidtype
11?MAKE: -pick add $@ %<
12?S:gidsign:
13?S: This variable contains the signedness of a gidtype.
14?S: 1 for unsigned, -1 for signed.
15?S:.
16?C:Gid_t_SIGN:
17?C: This symbol holds the signedess of a Gid_t.
18?C: 1 for unsigned, -1 for signed.
19?C:.
20?H:#define Gid_t_SIGN $gidsign /* GID sign */
21?H:.
22?F:!try
23?T:yyy
24?LINT: set gidsign
25echo " "
26echo "Checking the sign of $gidtype..." >&4
27ry.c <<'EOCP'
28#include <sys/types.h>
29#include <stdio.h>
30int main() {
31 $gidtype foo = -1;
32 if (foo < 0)
33 printf("-1\n");
34 else
35 printf("1\n");
36}
37EOCP
38if eval $compile; then
39 yyy=`./try`
40 case "$yyy" in
41 '') gidsign=1
42 echo "(I can't execute the test program--guessing unsigned.)" >&4
43 ;;
44 *) gidsign=$yyy
45 case "$gidsign" in
46 1) echo "Your $gidtype is unsigned." ;;
47 -1) echo "Your $gidtype is signed." ;;
48 esac
49 esac
50else
51 gidsign=1
52 echo "(I can't compile the test program--guessing unsigned.)" >&4
53fi
54
55