3 ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic License,
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 License; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 4.0.
11 ?RCS: $Log: Typedef.U,v $
12 ?RCS: Revision 3.0.1.3 1995/07/25 13:42:07 ram
13 ?RCS: patch56: added backslash escapes within evals to prevent space problems
15 ?RCS: Revision 3.0.1.2 1994/10/29 16:01:16 ram
16 ?RCS: patch36: don't clobber visible 'val' variable, use 'varval' instead
18 ?RCS: Revision 3.0.1.1 1994/08/29 16:05:14 ram
19 ?RCS: patch32: created
22 ?X: This unit checks for the definition of a given typedef.
25 ?X: set typedef val_t default [includes]
28 ?MAKE:Typedef: cppstdin cppminus cppflags rm contains Oldconfig
29 ?MAKE: -pick add $@ %<
34 ?S: This shell variable is used internally by Configure to check
35 ?S: wether a given typedef is defined or not. A typical use is:
36 ?S: set typedef val_t default [includes]
38 ?S: That will return val_t set to default if the typedef was not found,
39 ?S: to typedef otherwise. If no includes are specified, look in sys/types.h.
41 ?T:type var def inclist varval inc
42 : define an is-a-typedef? function
43 typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
45 "") inclist="sys/types.h";;
51 for inc in $inclist; do
52 echo "#include <$inc>" >>temp.c;
54 $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
55 if $contains $type temp.E >/dev/null 2>&1; then
61 *) eval "$var=\$varval";;