This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Generate a valid config.h even if stdarg.h and varargs.h are both missing.
[metaconfig.git] / U / typedefs / ssizesize.U
CommitLineData
d048fb47
JH
1?RCS:
2?RCS: Copyright (c) 1999, Jarkko Hietaniemi
0065f4af 3?RCS:
d048fb47
JH
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:
0f00356b
JH
10?MAKE:ssizesize: Myread Typedef ssizetype Compile run
11?MAKE: -pick add $@ %< run
d048fb47
JH
12?S:ssizesize:
13?S: This variable contains the size of a ssizetype in bytes.
14?S:.
15?C:Ssize_t_size:
16?C: This symbol holds the size of a Ssize_t in bytes.
17?C:.
a8383192 18?H:#define Ssize_t_size $ssizesize /**/
d048fb47 19?H:.
d048fb47 20?T:yyy zzz
0065f4af 21?F:!try
0065f4af 22: Check size of Ssize_t
d048fb47
JH
23echo " "
24case "$ssizetype" in
25*_t) zzz="$ssizetype" ;;
26*) zzz="signed filesize" ;;
27esac
0065f4af 28echo "Checking the size of $zzz..." >&4
d048fb47
JH
29cat > try.c <<EOCP
30#include <sys/types.h>
31#include <stdio.h>
32int main() {
33 printf("%d\n", (int)sizeof($ssizetype));
34 exit(0);
35}
36EOCP
37set try
38if eval $compile_ok; then
0f00356b 39 yyy=`$run ./try`
d048fb47
JH
40 case "$yyy" in
41 '') ssizesize=4
42 echo "(I can't execute the test program--guessing $ssizesize.)" >&4
43 ;;
44 *) ssizesize=$yyy
45 echo "Your $zzz size is $ssizesize bytes."
46 ;;
47 esac
48else
49 ssizesize=4
50 echo "(I can't compile the test program--guessing $ssizesize.)" >&4
51fi
52
53