1 ?RCS: $Id: d_longlong.U,v $
3 ?RCS: Copyright (c) 1998 Andy Dougherty
5 ?RCS: You may distribute under the terms of either the GNU General Public
6 ?RCS: License or the Artistic License, as specified in the README file.
8 ?RCS: $Log: d_longlong.U,v $
10 ?MAKE:d_longlong longlongsize: Compile Setvar Myread run \
11 cat rm_try test longsize
12 ?MAKE: -pick add $@ %<
14 ?S: This variable conditionally defines HAS_LONG_LONG if
15 ?S: the long long type is supported.
18 ?S: This variable contains the value of the LONGLONGSIZE symbol, which
19 ?S: indicates to the C program how many bytes there are in a long long,
20 ?S: if this system supports long long.
23 ?C: This symbol will be defined if the C compiler supports long long.
26 ?C: This symbol contains the size of a long long, so that the
27 ?C: C preprocessor can make decisions based on it. It is only
28 ?C: defined if the system supports long long.
30 ?H:#$d_longlong HAS_LONG_LONG /**/
31 ?H:?LONGLONGSIZE:#ifdef HAS_LONG_LONG
32 ?H:?LONGLONGSIZE:#define LONGLONGSIZE $longlongsize /**/
33 ?H:?LONGLONGSIZE:#endif
39 echo "Checking to see if you have long long..." >&4
40 echo 'int main() { long long x = 7; return 0; }' > try.c
42 if eval $compile; then
44 echo "You have long long."
47 echo "You do not have long long."
53 @if LONGLONGSIZE || longlongsize
54 : check for length of long long
55 ?X: Check only if d_longlong and if longlongsize is not already set.
56 case "${d_longlong}${longlongsize}" in
59 echo "Checking to see how big your long longs are..." >&4
64 printf("%d\n", (int)sizeof(long long));
69 if eval $compile_ok; then
70 longlongsize=`$run ./try`
71 echo "Your long longs are $longlongsize bytes long."
75 echo "(I can't seem to compile the test program. Guessing...)"
76 rp="What is the size of a long long (in bytes)?"
80 if $test "X$longsize" = "X$longlongsize"; then
81 echo "(That isn't any different from an ordinary long.)"