This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Configure fixfest continues.
[metaconfig.git] / U / typedefs / gidsize.U
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:gidsize: Myread Typedef gidtype Compile
11 ?MAKE:  -pick add $@ %<
12 ?S:gidsize:
13 ?S:     This variable contains the size of a gidtype in bytes.
14 ?S:.
15 ?C:Gid_t_SIZE:
16 ?C:     This symbol holds the size of a Gid_t in bytes.
17 ?C:.
18 ?H:#define Gid_t_SIZE $gidsize          /* GID size */
19 ?H:.
20 ?F:!try
21 ?T:yyy zzz
22 ?LINT: set gidsize
23 echo " "
24 case "$gidtype" in
25 *_t) zzz="$gidtype"     ;;
26 *)   zzz="gid"          ;;
27 esac
28 echo "Checking the size of zzz..." >&4 
29 cat > try.c <<EOCP
30 #include <sys/types.h>
31 #include <stdio.h>
32 int main() {
33     printf("%d\n", sizeof($gidtype));
34 }
35 EOCP
36 set try
37 if eval $compile_ok; then
38         yyy=`./try`
39         case "$yyy" in
40         '')     gidsize=4
41                 echo "(I can't execute the test program--guessing $gidsize.)" >&4
42                 ;;
43         *)      gidsize=$yyy
44                 echo "Your $zzz size is $gidsize bytes."
45                 ;;
46         esac
47 else
48         gidsize=4
49         echo "(I can't compile the test program--guessing $gidsize.)" >&4
50 fi
51
52