This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add the files from dist/meta to perl's repo
[metaconfig.git] / dist / U / d_dbl_dig.U
1 ?RCS: $Id: d_dbl_dig.U 1 2006-08-24 12:32:52Z rmanfredi $
2 ?RCS:
3 ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
4 ?RCS: 
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
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 Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 4.0.
10 ?RCS:
11 ?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
12 ?RCS:
13 ?RCS: $Log: d_dbl_dig.U,v $
14 ?RCS: Revision 3.0.1.1  1994/08/29  16:07:28  ram
15 ?RCS: patch32: created by ADO
16 ?RCS:
17 ?MAKE:d_dbl_dig: Myread contains cat rm Setvar i_limits i_float \
18         cppstdin cppflags cppminus
19 ?MAKE:  -pick add $@ %<
20 ?S:d_dbl_dig:
21 ?S:     This variable conditionally defines d_dbl_dig if this system's
22 ?S:     header files provide DBL_DIG, which is the number of significant
23 ?S:     digits in a double precision number.
24 ?S:.
25 ?C:HAS_DBL_DIG:
26 ?C:     This symbol, if defined, indicates that this system's <float.h>
27 ?C:     or <limits.h> defines the symbol DBL_DIG, which is the number
28 ?C:     of significant digits in a double precision number.  If this
29 ?C:     symbol is not defined, a guess of 15 is usually pretty good.
30 ?C:.
31 ?H:#$d_dbl_dig HAS_DBL_DIG      /**/
32 ?H:.
33 ?F:!dbl_dig.c
34 ?LINT:set d_dbl_dig
35 : See if number of significant digits in a double precision number is known
36 echo " "
37 $cat >dbl_dig.c <<EOM
38 #$i_limits I_LIMITS
39 #$i_float I_FLOAT
40 #ifdef I_LIMITS
41 #include <limits.h>
42 #endif
43 #ifdef I_FLOAT
44 #include <float.h>
45 #endif
46 #ifdef DBL_DIG
47 printf("Contains DBL_DIG");
48 #endif
49 EOM
50 $cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null
51 if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then
52         echo "DBL_DIG found." >&4
53         val="$define"
54 else
55         echo "DBL_DIG NOT found." >&4
56         val="$undef"
57 fi
58 $rm -f dbl_dig.?
59 set d_dbl_dig
60 eval $setvar
61