path: root/mcon/U/i_memory.U
diff options
Diffstat (limited to 'mcon/U/i_memory.U')
1 files changed, 65 insertions, 0 deletions
diff --git a/mcon/U/i_memory.U b/mcon/U/i_memory.U
new file mode 100644
index 0000000..d3e6561
--- /dev/null
+++ b/mcon/U/i_memory.U
@@ -0,0 +1,65 @@
+?RCS: $Id: i_memory.U,v 1994/06/20 07:01:55 ram Exp $
+?RCS: Copyright (c) 1991-1993, 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 3.0.
+?RCS: $Log: i_memory.U,v $
+?RCS: Revision 1994/06/20 07:01:55 ram
+?RCS: patch30: cosmetic changes
+?RCS: Revision 1994/05/13 15:23:56 ram
+?RCS: patch27: modified to avoid spurious Whoa warnings (ADO)
+?RCS: Revision 1994/05/06 15:02:25 ram
+?RCS: patch23: avoid conflicts with <string.h>
+?RCS: Revision 3.0 1993/08/18 12:08:22 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?MAKE:i_memory: Inhdr strings cppstdin cppflags cppminus contains rm Setvar
+?MAKE: -pick add $@ %<
+?S: This variable conditionally defines the I_MEMORY symbol, and indicates
+?S: whether a C program should include <memory.h>.
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <memory.h>.
+?H:#$i_memory I_MEMORY /**/
+?LINT:set i_memory
+?X: Unfortunately, the definitions of memory functions sometimes
+?X: conflict with those in <string.h>. We'll assume that if
+?X: <string.h> contains memcpy, then we don't need memory.h
+: see if memory.h is available.
+set memory.h val
+eval $inhdr
+: See if it conflicts with string.h
+case "$val" in
+ case "$strings" in
+ '') ;;
+ *)
+ $cppstdin $cppflags $cppminus < $strings > mem.h
+ if $contains 'memcpy' mem.h >/dev/null 2>&1; then
+ echo " "
+ echo "We won't be including <memory.h>."
+ val="$undef"
+ fi
+ $rm -f mem.h
+ ;;
+ esac
+set i_memory
+eval $setvar