1 ?RCS: $Id: nlist_pfx.U 1 2006-08-24 12:32:52Z rmanfredi $
3 ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
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.
11 ?RCS: $Log: nlist_pfx.U,v $
12 ?RCS: Revision 3.0.1.1 1994/10/29 16:26:18 ram
13 ?RCS: patch36: added ?F: line for metalint file checking
15 ?RCS: Revision 3.0 1993/08/18 12:09:25 ram
16 ?RCS: Baseline for dist 3.0 netwide release.
18 ?MAKE:nlist_pfx nlist_fnd: cat test Myread Oldconfig libnlist \
20 ?MAKE: -pick add $@ %<
22 ?S: This variable holds any characters which precede the symbol name
23 ?S: when doing an nlist search.
26 ?S: This variable holds the member of the nlist structure which is
27 ?S: nonzero if an nlist search succeeds. Presently, it is always "n_value".
30 ?C: This manifest constant holds the string of characters which should
31 ?C: precede the symbol name when doing an nlist search.
34 ?C: This manifest constant holds the member of the nlist structure which
35 ?C: is nonzero if an nlist search succeeds.
37 ?H:#define NLIST_PREFIX $nlist_pfx /**/
38 ?H:#define NLIST_FOUND $nlist_fnd /**/
42 : Nose around for nlist stuff
44 echo "Checking out nlist stuff..." >&4
45 $cat >nlisttest.c <<'EOCP'
55 static struct nlist nl[] = {
66 printf("%ld\n", loc);}
71 if(nlist("./nlisttest", nl) == -1) exit(-1);
73 printf("%d %d %d\n", nl[i].n_name, nl[i].n_type, nl[i].n_value);
82 if $cc $ccflags -o nlisttest nlisttest.c $libnlist >/dev/null 2>&1 ; then
87 if $test "$3" = "0" ; then
88 echo "$nlist_fnd is 0 if nlist() fails, as I expected."
91 Hello, Jim. We have just discovered that $nlist_fnd was nonzero on an
92 nlist() lookup failure! Your mission, should you choose to accept it, is to
93 edit either config.sh (to provide a Good value for nlist_fnd) or The Code
94 (to find an alternative to NLIST_FOUND), and reporting the full details of
95 your success to the MetaConfig Police. Of course, should you fail...
97 nlist_fnd="/* Bletch! */ */"
101 if $test "$nlist_loc" = "$3" ; then
102 echo "Symbols are stored with no initial characters."
106 if $test "$nlist_loc" = "$3" ; then
107 echo "Symbols are stored with an initial underscore."
111 if $test "$nlist_loc" = "$3" ; then
112 echo "Symbols are stored with an initial dot."
116 I can't figure out the symbol prefix!
117 You get to edit config.sh and fix 'nlist_pfx' (Configure will let you do this
118 at the end of its configuration questions), or config.h and fix the value of
119 the NLIST_PREFIX symbol.
121 nlist_pfx="/* Bletch! */ */"
127 I can't get the nlist test program working!
128 You get to edit config.sh and fix 'nlist_pfx' (Configure will let you do this
129 at the end of its configuration questions) and 'nlist_fnd', or config.h and
130 fix the value of the NLIST_PREFIX and NLIST_FOUND symbols.
132 nlist_pfx="/* Bletch! */ */"
133 nlist_fnd="/* Bletch! */ */"