summaryrefslogtreecommitdiff
path: root/mcon/U/i_pwd.U
blob: 8ee4156fbc25f4767f86f14fdd65dd97cd463a26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
?RCS: $Id$
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_pwd.U,v $
?RCS: Revision 3.0.1.2  1995/07/25  14:10:57  ram
?RCS: patch56: use setvar so hint file values can override our guesses (ADO)
?RCS:
?RCS: Revision 3.0.1.1  1994/05/06  15:03:27  ram
?RCS: patch23: had forgotten cppminus in cppstdin test (ADO)
?RCS:
?RCS: Revision 3.0  1993/08/18  12:08:25  ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?X:
?X: This unit checks whether there is a pwd system or not
?X:
?MAKE:i_pwd d_pwquota d_pwage d_pwchange d_pwclass d_pwexpire d_pwcomment: \
	contains rm cppstdin cppflags cppminus Inhdr Findhdr Setvar
?MAKE:	-pick add $@ %<
?S:i_pwd:
?S:	This variable conditionally defines I_PWD, which indicates
?S:	to the C program that it should include <pwd.h>.
?S:.
?S:d_pwquota:
?S:	This varaible conditionally defines PWQUOTA, which indicates
?S:	that struct passwd contains pw_quota.
?S:.
?S:d_pwage:
?S:	This varaible conditionally defines PWAGE, which indicates
?S:	that struct passwd contains pw_age.
?S:.
?S:d_pwchange:
?S:	This varaible conditionally defines PWCHANGE, which indicates
?S:	that struct passwd contains pw_change.
?S:.
?S:d_pwclass:
?S:	This varaible conditionally defines PWCLASS, which indicates
?S:	that struct passwd contains pw_class.
?S:.
?S:d_pwexpire:
?S:	This varaible conditionally defines PWEXPIRE, which indicates
?S:	that struct passwd contains pw_expire.
?S:.
?S:d_pwcomment:
?S:	This varaible conditionally defines PWCOMMENT, which indicates
?S:	that struct passwd contains pw_comment.
?S:.
?C:I_PWD:
?C:	This symbol, if defined, indicates to the C program that it should
?C:	include <pwd.h>.
?C:.
?C:PWQUOTA:
?C:	This symbol, if defined, indicates to the C program that struct passwd
?C:	contains pw_quota.
?C:.
?C:PWAGE:
?C:	This symbol, if defined, indicates to the C program that struct passwd
?C:	contains pw_age.
?C:.
?C:PWCHANGE:
?C:	This symbol, if defined, indicates to the C program that struct passwd
?C:	contains pw_change.
?C:.
?C:PWCLASS:
?C:	This symbol, if defined, indicates to the C program that struct passwd
?C:	contains pw_class.
?C:.
?C:PWEXPIRE:
?C:	This symbol, if defined, indicates to the C program that struct passwd
?C:	contains pw_expire.
?C:.
?C:PWCOMMENT:
?C:	This symbol, if defined, indicates to the C program that struct passwd
?C:	contains pw_comment.
?C:.
?H:#$i_pwd I_PWD		/**/
?H:#$d_pwquota PWQUOTA	/**/
?H:#$d_pwage PWAGE	/**/
?H:#$d_pwchange PWCHANGE	/**/
?H:#$d_pwclass PWCLASS	/**/
?H:#$d_pwexpire PWEXPIRE	/**/
?H:#$d_pwcomment PWCOMMENT	/**/
?H:.
?LINT: set i_pwd d_pwquota d_pwage d_pwchange d_pwclass d_pwexpire d_pwcomment
?T:xxx
: see if this is a pwd.h system
set pwd.h i_pwd
eval $inhdr

case "$i_pwd" in
$define)
	xxx=`./findhdr pwd.h`
	$cppstdin $cppflags $cppminus < $xxx >$$.h

	if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
		val="$define"
	else
		val="$undef"
	fi
	set d_pwquota
	eval $setvar

	if $contains 'pw_age' $$.h >/dev/null 2>&1; then
		val="$define"
	else
		val="$undef"
	fi
	set d_pwage
	eval $setvar

	if $contains 'pw_change' $$.h >/dev/null 2>&1; then
		val="$define"
	else
		val="$undef"
	fi
	set d_pwchange
	eval $setvar

	if $contains 'pw_class' $$.h >/dev/null 2>&1; then
		val="$define"
	else
		val="$undef"
	fi
	set d_pwclass
	eval $setvar

	if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
		val="$define"
	else
		val="$undef"
	fi
	set d_pwexpire
	eval $setvar

	if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
		val="$define"
	else
		val="$undef"
	fi
	set d_pwcomment
	eval $setvar

	$rm -f $$.h
	;;
*)
	val="$undef"; 
	set d_pwquota; eval $setvar
	set d_pwage; eval $setvar
	set d_pwchange; eval $setvar
	set d_pwclass; eval $setvar
	set d_pwexpire; eval $setvar
	set d_pwcomment; eval $setvar
	;;
esac