This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Populate metaconfig branch.
[metaconfig.git] / dist-3.0at70 / mcon / U / d_volatile.U
1 ?RCS: $Id: d_volatile.U,v 3.0.1.2 1995/07/25 14:08:49 ram Exp $
2 ?RCS:
3 ?RCS: Copyright (c) 1991-1993, 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 3.0.
10 ?RCS:
11 ?RCS: $Log: d_volatile.U,v $
12 ?RCS: Revision 3.0.1.2  1995/07/25  14:08:49  ram
13 ?RCS: patch56: made cc and ccflags optional dependencies
14 ?RCS:
15 ?RCS: Revision 3.0.1.1  1993/09/09  11:49:51  ram
16 ?RCS: patch9: volatile definition was swapped over with undef
17 ?RCS:
18 ?RCS: Revision 3.0  1993/08/18  12:07:57  ram
19 ?RCS: Baseline for dist 3.0 netwide release.
20 ?RCS:
21 ?MAKE:d_volatile: cat +cc +ccflags rm Setvar
22 ?MAKE:  -pick add $@ %<
23 ?S:d_volatile:
24 ?S:     This variable conditionally defines the HASVOLATILE symbol, which
25 ?S:     indicates to the C program that this C compiler knows about the
26 ?S:     volatile declaration.
27 ?S:.
28 ?C:HASVOLATILE ~ %<:
29 ?C:     This symbol, if defined, indicates that this C compiler knows about
30 ?C:     the volatile declaration.
31 ?C:.
32 ?H:?%<:#$d_volatile     HASVOLATILE     /**/
33 ?H:?%<:#ifndef HASVOLATILE
34 ?H:?%<:#define volatile
35 ?H:?%<:#endif
36 ?H:.
37 ?W:%<:volatile
38 ?LINT:set d_volatile
39 ?LINT:known volatile
40 : check for volatile keyword
41 echo " "
42 echo 'Checking to see if your C compiler knows about "volatile"...' >&4
43 $cat >try.c <<'EOCP'
44 main()
45 {
46 ?X:
47 ?X: The following seven lines added by Bill Campbell <billc@sierra.com>
48 ?X: detect that MIPS compilers do not handle volatile in all situations.
49 ?X:
50         typedef struct _goo_struct goo_struct;
51         goo_struct * volatile goo = ((goo_struct *)0);
52         struct _goo_struct {
53                 long long_int;
54                 int reg_int;
55                 char char_var;
56         };
57         typedef unsigned short foo_t;
58         char *volatile foo;
59         volatile int bar;
60         volatile foo_t blech;
61         foo = foo;
62 }
63 EOCP
64 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
65         val="$define"
66         echo "Yup, it does."
67 else
68         val="$undef"
69         echo "Nope, it doesn't."
70 fi
71 set d_volatile
72 eval $setvar
73 $rm -f try.*
74