summaryrefslogtreecommitdiff
path: root/mcon/U/i_memory.U
blob: d3e6561b4db9d065dd491355cd3050f6b4765f93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
?RCS: $Id: i_memory.U,v 3.0.1.3 1994/06/20 07:01:55 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
?RCS: 
?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:
?RCS: $Log: i_memory.U,v $
?RCS: Revision 3.0.1.3  1994/06/20  07:01:55  ram
?RCS: patch30: cosmetic changes
?RCS:
?RCS: Revision 3.0.1.2  1994/05/13  15:23:56  ram
?RCS: patch27: modified to avoid spurious Whoa warnings (ADO)
?RCS:
?RCS: Revision 3.0.1.1  1994/05/06  15:02:25  ram
?RCS: patch23: avoid conflicts with <string.h>
?RCS:
?RCS: Revision 3.0  1993/08/18  12:08:22  ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?MAKE:i_memory: Inhdr strings cppstdin cppflags cppminus contains rm Setvar
?MAKE:	-pick add $@ %<
?S:i_memory:
?S:	This variable conditionally defines the I_MEMORY symbol, and indicates
?S:	whether a C program should include <memory.h>.
?S:.
?C:I_MEMORY:
?C:	This symbol, if defined, indicates to the C program that it should
?C:	include <memory.h>.
?C:.
?H:#$i_memory I_MEMORY		/**/
?H:.
?LINT:set i_memory
?X:
?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
?X:
: see if memory.h is available.
val=''
set memory.h val
eval $inhdr

: See if it conflicts with string.h
case "$val" in
$define)
	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
esac
set i_memory
eval $setvar