1 ?X: These units are based on the ones supplied with dist-3.0
2 ?X: patchlevel 22. They have been changed or enhanced to work with
3 ?X: perl5alpha. I would appreciate hearing about any changes,
4 ?X: corrections, or enhancements.
5 ?X: Andy Dougherty doughera@lafcol.lafayette.edu
8 ?X: Easton, PA 18042-1782
9 ?X: Sat Apr 2 15:45:17 EST 1994
10 ?RCS: $Id: mallocsrc.U,v 3.0 1993/08/18 12:09:12 ram Exp $
12 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
14 ?RCS: You may redistribute only under the terms of the Artistic Licence,
15 ?RCS: as specified in the README file that comes with the distribution.
16 ?RCS: You may reuse parts of this distribution only within the terms of
17 ?RCS: that same Artistic Licence; a copy of which may be found at the root
18 ?RCS: of the source tree for dist 3.0.
20 ?RCS: $Log: mallocsrc.U,v $
21 ?RCS: Revision 3.0 1993/08/18 12:09:12 ram
22 ?RCS: Baseline for dist 3.0 netwide release.
24 ?MAKE:mallocsrc mallocobj usemymalloc malloctype: Myread Oldconfig package \
25 Guess test rm cat +cc +ccflags Findhdr
26 ?MAKE: -pick add $@ %<
28 ?S: This variable contains y if the malloc that comes with this package
29 ?S: is desired over the system's version of malloc. People often include
30 ?S: special versions of malloc for effiency, but such versions are often
31 ?S: less portable. See also mallocsrc and mallocobj.
34 ?S: This variable contains the name of the malloc.c that comes with
35 ?S: the package, if that malloc.c is preferred over the system malloc.
36 ?S: Otherwise the value is null. This variable is intended for generating
40 ?S: This variable contains the name of the malloc.o that this package
41 ?S: generates, if that malloc.o is preferred over the system malloc.
42 ?S: Otherwise the value is null. This variable is intended for generating
43 ?S: Makefiles. See mallocsrc.
46 ?S: This variable contains the kind of ptr returned by malloc and realloc.
48 ?C:Malloc_t (MALLOCPTRTYPE):
49 ?C: This symbol is the type of pointer returned by malloc and realloc.
51 ?H:#define Malloc_t $malloctype /**/
53 ?X: Cannot test for mallocsrc; it is the unit's name and there is a bug in
54 ?X: the interpreter which defines all the names, even though they are not used.
56 : determine which malloc to compile in
57 : Old versions had dflt='y' only for bsd or v7.
59 case "$usemymalloc" in
67 *) dflt="$usemymalloc"
70 rp="Do you wish to attempt to use the malloc that comes with $package?"
74 y*) mallocsrc='malloc.c'; mallocobj='malloc.o';;
75 *) mallocsrc=''; mallocobj='';;
79 @if MALLOCPTRTYPE || Malloc_t
80 : compute the type returned by malloc
84 if $test `./findhdr malloc.h`; then
85 echo "#include <malloc.h>" > malloc.c
88 $cat >>malloc.c <<'END'
91 if $cc $ccflags -c malloc.c >/dev/null 2>&1; then
99 echo "Your system wants malloc to return '$malloctype', it would seem." >&4