This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix a copy-paste error in d_double_has_nan description
[metaconfig.git] / U / modified / d_longlong.U
1 ?RCS: $Id: d_longlong.U,v $
2 ?RCS:
3 ?RCS: Copyright (c) 1998 Andy Dougherty
4 ?RCS:
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.
7 ?RCS:
8 ?RCS: $Log: d_longlong.U,v $
9 ?RCS:
10 ?MAKE:d_longlong longlongsize: Compile Setvar Myread run \
11         cat rm_try test longsize
12 ?MAKE:  -pick add $@ %<
13 ?S:d_longlong:
14 ?S:     This variable conditionally defines HAS_LONG_LONG if
15 ?S:     the long long type is supported.
16 ?S:.
17 ?S:longlongsize:
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.
21 ?S:.
22 ?C:HAS_LONG_LONG:
23 ?C:     This symbol will be defined if the C compiler supports long long.
24 ?C:.
25 ?C:LONGLONGSIZE:
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.
29 ?C:.
30 ?H:#$d_longlong HAS_LONG_LONG           /**/
31 ?H:?LONGLONGSIZE:#ifdef HAS_LONG_LONG
32 ?H:?LONGLONGSIZE:#define LONGLONGSIZE $longlongsize             /**/
33 ?H:?LONGLONGSIZE:#endif
34 ?H:.
35 ?F:!try
36 ?LINT:set d_longlong
37 : check for long long
38 echo " "
39 echo "Checking to see if you have long long..." >&4
40 echo 'int main() { long long x = 7; return 0; }' > try.c
41 set try
42 if eval $compile; then
43         val="$define"
44         echo "You have long long."
45 else
46         val="$undef"
47         echo "You do not have long long."
48 fi
49 $rm_try
50 set d_longlong
51 eval $setvar
52
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
57 $define)
58         echo " "
59         echo "Checking to see how big your long longs are..." >&4
60         $cat >try.c <<'EOCP'
61 #include <stdio.h>
62 int main()
63 {
64     printf("%d\n", (int)sizeof(long long));
65     return(0);
66 }
67 EOCP
68         set try
69         if eval $compile_ok; then
70                 longlongsize=`$run ./try`
71                 echo "Your long longs are $longlongsize bytes long."
72         else
73                 dflt='8'
74                 echo " "
75                 echo "(I can't seem to compile the test program.  Guessing...)"
76                 rp="What is the size of a long long (in bytes)?"
77                 . ./myread
78                 longlongsize="$ans"
79         fi
80         if $test "X$longsize" = "X$longlongsize"; then
81                 echo "(That isn't any different from an ordinary long.)"
82         fi
83         ;;
84 esac
85 $rm_try
86 @end
87