| 1 | ?RCS: $Id: i_pwd.U,v 3.0.1.2 1995/07/25 14:10:57 ram Exp $ |
| 2 | ?RCS: |
| 3 | ?RCS: Copyright (c) 1991-1993, Raphael Manfredi |
| 4 | ?RCS: |
| 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 3.0. |
| 10 | ?RCS: |
| 11 | ?RCS: $Log: i_pwd.U,v $ |
| 12 | ?RCS: Revision 3.0.1.2 1995/07/25 14:10:57 ram |
| 13 | ?RCS: patch56: use setvar so hint file values can override our guesses (ADO) |
| 14 | ?RCS: |
| 15 | ?RCS: Revision 3.0.1.1 1994/05/06 15:03:27 ram |
| 16 | ?RCS: patch23: had forgotten cppminus in cppstdin test (ADO) |
| 17 | ?RCS: |
| 18 | ?RCS: Revision 3.0 1993/08/18 12:08:25 ram |
| 19 | ?RCS: Baseline for dist 3.0 netwide release. |
| 20 | ?RCS: |
| 21 | ?X: |
| 22 | ?X: This unit checks whether there is a pwd system or not |
| 23 | ?X: |
| 24 | ?MAKE:i_pwd d_pwquota d_pwage d_pwchange d_pwclass d_pwexpire \ |
| 25 | d_pwgecos d_pwpasswd d_pwcomment: \ |
| 26 | contains rm cppstdin cppflags cppminus Inhdr Findhdr Setvar |
| 27 | ?MAKE: -pick add $@ %< |
| 28 | ?S:i_pwd: |
| 29 | ?S: This variable conditionally defines I_PWD, which indicates |
| 30 | ?S: to the C program that it should include <pwd.h>. |
| 31 | ?S:. |
| 32 | ?S:d_pwquota: |
| 33 | ?S: This variable conditionally defines PWQUOTA, which indicates |
| 34 | ?S: that struct passwd contains pw_quota. |
| 35 | ?S:. |
| 36 | ?S:d_pwage: |
| 37 | ?S: This variable conditionally defines PWAGE, which indicates |
| 38 | ?S: that struct passwd contains pw_age. |
| 39 | ?S:. |
| 40 | ?S:d_pwchange: |
| 41 | ?S: This variable conditionally defines PWCHANGE, which indicates |
| 42 | ?S: that struct passwd contains pw_change. |
| 43 | ?S:. |
| 44 | ?S:d_pwclass: |
| 45 | ?S: This variable conditionally defines PWCLASS, which indicates |
| 46 | ?S: that struct passwd contains pw_class. |
| 47 | ?S:. |
| 48 | ?S:d_pwexpire: |
| 49 | ?S: This variable conditionally defines PWEXPIRE, which indicates |
| 50 | ?S: that struct passwd contains pw_expire. |
| 51 | ?S:. |
| 52 | ?S:d_pwcomment: |
| 53 | ?S: This variable conditionally defines PWCOMMENT, which indicates |
| 54 | ?S: that struct passwd contains pw_comment. |
| 55 | ?S:. |
| 56 | ?S:d_pwgecos: |
| 57 | ?S: This variable conditionally defines PWGECOS, which indicates |
| 58 | ?S: that struct passwd contains pw_gecos. |
| 59 | ?S:. |
| 60 | ?S:d_pwpasswd: |
| 61 | ?S: This variable conditionally defines PWPASSWD, which indicates |
| 62 | ?S: that struct passwd contains pw_passwd. |
| 63 | ?S:. |
| 64 | ?C:I_PWD: |
| 65 | ?C: This symbol, if defined, indicates to the C program that it should |
| 66 | ?C: include <pwd.h>. |
| 67 | ?C:. |
| 68 | ?C:PWQUOTA: |
| 69 | ?C: This symbol, if defined, indicates to the C program that struct passwd |
| 70 | ?C: contains pw_quota. |
| 71 | ?C:. |
| 72 | ?C:PWAGE: |
| 73 | ?C: This symbol, if defined, indicates to the C program that struct passwd |
| 74 | ?C: contains pw_age. |
| 75 | ?C:. |
| 76 | ?C:PWCHANGE: |
| 77 | ?C: This symbol, if defined, indicates to the C program that struct passwd |
| 78 | ?C: contains pw_change. |
| 79 | ?C:. |
| 80 | ?C:PWCLASS: |
| 81 | ?C: This symbol, if defined, indicates to the C program that struct passwd |
| 82 | ?C: contains pw_class. |
| 83 | ?C:. |
| 84 | ?C:PWEXPIRE: |
| 85 | ?C: This symbol, if defined, indicates to the C program that struct passwd |
| 86 | ?C: contains pw_expire. |
| 87 | ?C:. |
| 88 | ?C:PWCOMMENT: |
| 89 | ?C: This symbol, if defined, indicates to the C program that struct passwd |
| 90 | ?C: contains pw_comment. |
| 91 | ?C:. |
| 92 | ?C:PWGECOS: |
| 93 | ?C: This symbol, if defined, indicates to the C program that struct passwd |
| 94 | ?C: contains pw_gecos. |
| 95 | ?C:. |
| 96 | ?C:PWPASSWD: |
| 97 | ?C: This symbol, if defined, indicates to the C program that struct passwd |
| 98 | ?C: contains pw_passwd. |
| 99 | ?C:. |
| 100 | ?H:#$i_pwd I_PWD /**/ |
| 101 | ?H:#$d_pwquota PWQUOTA /**/ |
| 102 | ?H:#$d_pwage PWAGE /**/ |
| 103 | ?H:#$d_pwchange PWCHANGE /**/ |
| 104 | ?H:#$d_pwclass PWCLASS /**/ |
| 105 | ?H:#$d_pwexpire PWEXPIRE /**/ |
| 106 | ?H:#$d_pwcomment PWCOMMENT /**/ |
| 107 | ?H:#$d_pwgecos PWGECOS /**/ |
| 108 | ?H:#$d_pwpasswd PWPASSWD /**/ |
| 109 | ?H:. |
| 110 | ?LINT: set i_pwd d_pwquota d_pwage d_pwchange d_pwclass d_pwexpire d_pwcomment |
| 111 | ?LINT: set d_pwgecos d_pwpasswd |
| 112 | ?T:xxx |
| 113 | : see if this is a pwd.h system |
| 114 | set pwd.h i_pwd |
| 115 | eval $inhdr |
| 116 | |
| 117 | case "$i_pwd" in |
| 118 | $define) |
| 119 | xxx=`./findhdr pwd.h` |
| 120 | $cppstdin $cppflags $cppminus < $xxx >$$.h |
| 121 | |
| 122 | if $contains 'pw_quota' $$.h >/dev/null 2>&1; then |
| 123 | val="$define" |
| 124 | else |
| 125 | val="$undef" |
| 126 | fi |
| 127 | set d_pwquota |
| 128 | eval $setvar |
| 129 | |
| 130 | if $contains 'pw_age' $$.h >/dev/null 2>&1; then |
| 131 | val="$define" |
| 132 | else |
| 133 | val="$undef" |
| 134 | fi |
| 135 | set d_pwage |
| 136 | eval $setvar |
| 137 | |
| 138 | if $contains 'pw_change' $$.h >/dev/null 2>&1; then |
| 139 | val="$define" |
| 140 | else |
| 141 | val="$undef" |
| 142 | fi |
| 143 | set d_pwchange |
| 144 | eval $setvar |
| 145 | |
| 146 | if $contains 'pw_class' $$.h >/dev/null 2>&1; then |
| 147 | val="$define" |
| 148 | else |
| 149 | val="$undef" |
| 150 | fi |
| 151 | set d_pwclass |
| 152 | eval $setvar |
| 153 | |
| 154 | if $contains 'pw_expire' $$.h >/dev/null 2>&1; then |
| 155 | val="$define" |
| 156 | else |
| 157 | val="$undef" |
| 158 | fi |
| 159 | set d_pwexpire |
| 160 | eval $setvar |
| 161 | |
| 162 | if $contains 'pw_comment' $$.h >/dev/null 2>&1; then |
| 163 | val="$define" |
| 164 | else |
| 165 | val="$undef" |
| 166 | fi |
| 167 | set d_pwcomment |
| 168 | eval $setvar |
| 169 | |
| 170 | if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then |
| 171 | val="$define" |
| 172 | else |
| 173 | val="$undef" |
| 174 | fi |
| 175 | set d_pwgecos |
| 176 | eval $setvar |
| 177 | |
| 178 | if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then |
| 179 | val="$define" |
| 180 | else |
| 181 | val="$undef" |
| 182 | fi |
| 183 | set d_pwpasswd |
| 184 | eval $setvar |
| 185 | |
| 186 | $rm -f $$.h |
| 187 | ;; |
| 188 | *) |
| 189 | val="$undef"; |
| 190 | set d_pwquota; eval $setvar |
| 191 | set d_pwage; eval $setvar |
| 192 | set d_pwchange; eval $setvar |
| 193 | set d_pwclass; eval $setvar |
| 194 | set d_pwexpire; eval $setvar |
| 195 | set d_pwcomment; eval $setvar |
| 196 | set d_pwgecos; eval $setvar |
| 197 | set d_pwpasswd; eval $setvar |
| 198 | ;; |
| 199 | esac |
| 200 | |