path: root/mcon/U/d_volatile.U
diff options
authorrmanfredi <rmanfredi@190e5f8e-a817-0410-acf6-e9863daed9af>2006-08-24 12:32:52 +0000
committerrmanfredi <rmanfredi@190e5f8e-a817-0410-acf6-e9863daed9af>2006-08-24 12:32:52 +0000
commit8bfc5756fb68e0b13d7e7c0073ad5b9a4790d1b6 (patch)
treedee05e98bc53766d609ef2a3a07a5672627d812c /mcon/U/d_volatile.U
Moving project to sourceforge.
git-svn-id: 190e5f8e-a817-0410-acf6-e9863daed9af
Diffstat (limited to 'mcon/U/d_volatile.U')
1 files changed, 74 insertions, 0 deletions
diff --git a/mcon/U/d_volatile.U b/mcon/U/d_volatile.U
new file mode 100644
index 0000000..f94ca4f
--- /dev/null
+++ b/mcon/U/d_volatile.U
@@ -0,0 +1,74 @@
+?RCS: $Id$
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS: $Log: d_volatile.U,v $
+?RCS: Revision 1995/07/25 14:08:49 ram
+?RCS: patch56: made cc and ccflags optional dependencies
+?RCS: Revision 1993/09/09 11:49:51 ram
+?RCS: patch9: volatile definition was swapped over with undef
+?RCS: Revision 3.0 1993/08/18 12:07:57 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?MAKE:d_volatile: cat +cc +ccflags rm Setvar
+?MAKE: -pick add $@ %<
+?S: This variable conditionally defines the HASVOLATILE symbol, which
+?S: indicates to the C program that this C compiler knows about the
+?S: volatile declaration.
+?C: This symbol, if defined, indicates that this C compiler knows about
+?C: the volatile declaration.
+?H:?%<:#$d_volatile HASVOLATILE /**/
+?H:?%<:#ifndef HASVOLATILE
+?H:?%<:#define volatile
+?LINT:set d_volatile
+?LINT:known volatile
+: check for volatile keyword
+echo " "
+echo 'Checking to see if your C compiler knows about "volatile"...' >&4
+$cat >try.c <<'EOCP'
+int main()
+?X: The following seven lines added by Bill Campbell <>
+?X: detect that MIPS compilers do not handle volatile in all situations.
+ typedef struct _goo_struct goo_struct;
+ goo_struct * volatile goo = ((goo_struct *)0);
+ struct _goo_struct {
+ long long_int;
+ int reg_int;
+ char char_var;
+ };
+ typedef unsigned short foo_t;
+ char *volatile foo;
+ volatile int bar;
+ volatile foo_t blech;
+ foo = foo;
+if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
+ val="$define"
+ echo "Yup, it does."
+ val="$undef"
+ echo "Nope, it doesn't."
+set d_volatile
+eval $setvar
+$rm -f try.*