This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add the files from dist/meta to perl's repo
[metaconfig.git] / dist / U / sbrktype.U
1 ?RCS: $Id: sbrktype.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: sbrktype.U,v $
12 ?RCS: Revision 3.0  1993/08/18  12:09:43  ram
13 ?RCS: Baseline for dist 3.0 netwide release.
14 ?RCS:
15 ?MAKE:sbrktype: Myread Oldconfig Loc contains Findhdr
16 ?MAKE:  -pick add $@ %<
17 ?S:sbrktype:
18 ?S:     This variable defines sbrktype to be something like caddr_t, char *, 
19 ?S:     or whatever type is used to declare sbrk() in the kernel.
20 ?S:.
21 ?C:Caddr_t (SBRKTYPE):
22 ?C:     This symbol holds the type of a core address. It is inteded to be used
23 ?C:     to safely declare the return type of system calls like sbrk(). It might
24 ?C:     be necessary to include <sys/types.h> as well.
25 ?C:.
26 ?H:#define Caddr_t $sbrktype    /* <core address> type */
27 ?H:.
28 : see what type sbrk is declared as in the kernel
29 case "$sbrktype" in
30 '')
31         if $contains 'caddr_t;' `./findhdr sys/types.h` >/dev/null 2>&1 ; then
32                 dflt='caddr_t';
33         else
34                 dflt='char *';
35         fi
36         ;;
37 *)  dflt="$sbrktype"
38         ;;
39 esac
40 echo " "
41 rp="What is the return type of sbrk() on this system?"
42 . ./myread
43 sbrktype="$ans"
44