Commit | Line | Data |
---|---|---|
d8875586 MBT |
1 | ?RCS: $Id: i_memory.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: $Log: i_memory.U,v $ | |
12 | ?RCS: Revision 3.0.1.3 1994/06/20 07:01:55 ram | |
13 | ?RCS: patch30: cosmetic changes | |
14 | ?RCS: | |
15 | ?RCS: Revision 3.0.1.2 1994/05/13 15:23:56 ram | |
16 | ?RCS: patch27: modified to avoid spurious Whoa warnings (ADO) | |
17 | ?RCS: | |
18 | ?RCS: Revision 3.0.1.1 1994/05/06 15:02:25 ram | |
19 | ?RCS: patch23: avoid conflicts with <string.h> | |
20 | ?RCS: | |
21 | ?RCS: Revision 3.0 1993/08/18 12:08:22 ram | |
22 | ?RCS: Baseline for dist 3.0 netwide release. | |
23 | ?RCS: | |
24 | ?MAKE:i_memory: Inhdr strings cppstdin cppflags cppminus contains rm Setvar | |
25 | ?MAKE: -pick add $@ %< | |
26 | ?S:i_memory: | |
27 | ?S: This variable conditionally defines the I_MEMORY symbol, and indicates | |
28 | ?S: whether a C program should include <memory.h>. | |
29 | ?S:. | |
30 | ?C:I_MEMORY: | |
31 | ?C: This symbol, if defined, indicates to the C program that it should | |
32 | ?C: include <memory.h>. | |
33 | ?C:. | |
34 | ?H:#$i_memory I_MEMORY /**/ | |
35 | ?H:. | |
36 | ?LINT:set i_memory | |
37 | ?X: | |
38 | ?X: Unfortunately, the definitions of memory functions sometimes | |
39 | ?X: conflict with those in <string.h>. We'll assume that if | |
40 | ?X: <string.h> contains memcpy, then we don't need memory.h | |
41 | ?X: | |
42 | : see if memory.h is available. | |
43 | val='' | |
44 | set memory.h val | |
45 | eval $inhdr | |
46 | ||
47 | : See if it conflicts with string.h | |
48 | case "$val" in | |
49 | $define) | |
50 | case "$strings" in | |
51 | '') ;; | |
52 | *) | |
53 | $cppstdin $cppflags $cppminus < $strings > mem.h | |
54 | if $contains 'memcpy' mem.h >/dev/null 2>&1; then | |
55 | echo " " | |
56 | echo "We won't be including <memory.h>." | |
57 | val="$undef" | |
58 | fi | |
59 | $rm -f mem.h | |
60 | ;; | |
61 | esac | |
62 | esac | |
63 | set i_memory | |
64 | eval $setvar | |
65 |