3 ?RCS: Copyright (c) 1991-1997, 2004-2006, 2012 Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic License,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic License; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 4.0.
11 ?MAKE:intsize longsize shortsize: Assert Myread cat rm +cc +ccflags echo n c
12 ?MAKE: -pick add $@ %<
14 ?S: This variable contains the value of the INTSIZE symbol, which
15 ?S: indicates to the C program how many bytes there are in an int.
18 ?S: This variable contains the value of the LONGSIZE symbol, which
19 ?S: indicates to the C program how many bytes there are in a long.
22 ?S: This variable contains the value of the SHORTSIZE symbol which
23 ?S: indicates to the C program how many bytes there are in a short.
26 ?C: This symbol contains the value of sizeof(int) so that the C
27 ?C: preprocessor can make decisions based on it.
30 ?C: This symbol contains the value of sizeof(long) so that the C
31 ?C: preprocessor can make decisions based on it.
34 ?C: This symbol contains the value of sizeof(short) so that the C
35 ?C: preprocessor can make decisions based on it.
37 ?H:#define INTSIZE $intsize
38 ?H:#define LONGSIZE $longsize
39 ?H:#define SHORTSIZE $shortsize
42 ?LINT: set shortsize intsize longsize
43 : check for lengths of integral types
46 @if SHORTSIZE || shortsize
49 @if INTSIZE || intsize
52 @if LONGSIZE || longsize
56 $echo $n "Checking to see how big your ${t}s are...$c" >&4
57 for size in 2 4 8 16 error; do
59 #include "static_assert.h"
63 STATIC_ASSERT($size == sizeof(foo));
67 if $cc -c $ccflags try.c >/dev/null 2>&1; then break; fi
72 echo " cannot compute it." >&4
78 rp="What is the size of the \"$t\" type (in bytes)?"
83 echo " $size bytes." >&4