Commit | Line | Data |
---|---|---|
33a01fd2 | 1 | ?RCS: $Id$ |
d8875586 MBT |
2 | ?RCS: |
3 | ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi | |
4 | ?RCS: | |
33a01fd2 | 5 | ?RCS: You may redistribute only under the terms of the Artistic License, |
d8875586 MBT |
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 | |
33a01fd2 | 8 | ?RCS: that same Artistic License; a copy of which may be found at the root |
d8875586 MBT |
9 | ?RCS: of the source tree for dist 4.0. |
10 | ?RCS: | |
11 | ?RCS: $Log: uidtype.U,v $ | |
12 | ?RCS: Revision 3.0.1.3 1994/08/29 16:33:25 ram | |
13 | ?RCS: patch32: now uses new Typedef unit to compute type information | |
14 | ?RCS: | |
15 | ?RCS: Revision 3.0.1.2 1994/06/20 07:09:36 ram | |
16 | ?RCS: patch30: comment for uidtype referred to the obsoleted symbol | |
17 | ?RCS: | |
18 | ?RCS: Revision 3.0.1.1 1994/05/13 15:28:27 ram | |
33a01fd2 MBT |
19 | ?RCS: patch27: made conform to its gidtype.U companion |
20 | ?RCS: patch27: question now explicitely mentions getuid() | |
d8875586 MBT |
21 | ?RCS: |
22 | ?RCS: Revision 3.0 1993/08/18 12:09:56 ram | |
23 | ?RCS: Baseline for dist 3.0 netwide release. | |
24 | ?RCS: | |
25 | ?MAKE:uidtype: Myread Typedef Findhdr | |
26 | ?MAKE: -pick add $@ %< | |
27 | ?S:uidtype: | |
28 | ?S: This variable defines Uid_t to be something like uid_t, int, | |
29 | ?S: ushort, or whatever type is used to declare user ids in the kernel. | |
30 | ?S:. | |
31 | ?C:Uid_t (UIDTYPE): | |
32 | ?C: This symbol holds the type used to declare user ids in the kernel. | |
33 | ?C: It can be int, ushort, uid_t, etc... It may be necessary to include | |
34 | ?C: <sys/types.h> to get any typedef'ed information. | |
35 | ?C:. | |
36 | ?H:#define Uid_t $uidtype /* UID type */ | |
37 | ?H:. | |
38 | ?T:xxx | |
39 | : see what type uids are declared as in the kernel | |
40 | set uid_t uidtype xxx stdio.h sys/types.h | |
41 | eval $typedef | |
42 | case "$uidtype" in | |
43 | xxx) | |
44 | xxx=`./findhdr sys/user.h` | |
45 | set `grep '_ruid;' "$xxx" 2>/dev/null` unsigned short | |
46 | case $1 in | |
47 | unsigned) dflt="$1 $2" ;; | |
48 | *) dflt="$1" ;; | |
49 | esac | |
50 | ;; | |
51 | *) dflt="$uidtype";; | |
52 | esac | |
53 | echo " " | |
54 | rp="What is the type for user ids returned by getuid()?" | |
55 | . ./myread | |
56 | uidtype="$ans" | |
57 |