Commit | Line | Data |
---|---|---|
c6667804 | 1 | ?RCS: $Id$ |
d8875586 MBT |
2 | ?RCS: |
3 | ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi | |
4 | ?RCS: | |
c6667804 | 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 | |
c6667804 | 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: gidtype.U,v $ | |
12 | ?RCS: Revision 3.0.1.3 1994/08/29 16:21:44 ram | |
13 | ?RCS: patch32: now uses new Typedef unit to compute type information | |
14 | ?RCS: patch32: removed useless usage of Setvar (for now) | |
15 | ?RCS: | |
16 | ?RCS: Revision 3.0.1.2 1994/05/13 15:21:07 ram | |
17 | ?RCS: patch27: added lint hint | |
18 | ?RCS: | |
19 | ?RCS: Revision 3.0.1.1 1994/05/06 15:01:51 ram | |
20 | ?RCS: patch23: protected gidtype setting via setvar (ADO) | |
21 | ?RCS: patch23: made Gid_t comment more explicit (ADO) | |
22 | ?RCS: | |
23 | ?RCS: Revision 3.0 1993/08/18 12:08:11 ram | |
24 | ?RCS: Baseline for dist 3.0 netwide release. | |
25 | ?RCS: | |
26 | ?MAKE:gidtype: Myread Typedef Findhdr | |
27 | ?MAKE: -pick add $@ %< | |
28 | ?S:gidtype: | |
29 | ?S: This variable defines Gid_t to be something like gid_t, int, | |
30 | ?S: ushort, or whatever type is used to declare the return type | |
31 | ?S: of getgid(). Typically, it is the type of group ids in the kernel. | |
32 | ?S:. | |
33 | ?C:Gid_t (GIDTYPE): | |
34 | ?C: This symbol holds the return type of getgid() and the type of | |
35 | ?C: argument to setrgid() and related functions. Typically, | |
36 | ?C: it is the type of group ids in the kernel. It can be int, ushort, | |
37 | ?C: uid_t, etc... It may be necessary to include <sys/types.h> to get | |
38 | ?C: any typedef'ed information. | |
39 | ?C:. | |
40 | ?H:#define Gid_t $gidtype /* Type for getgid(), etc... */ | |
41 | ?H:. | |
42 | ?T:xxx | |
43 | : see what type gids are declared as in the kernel | |
44 | set gid_t gidtype xxx stdio.h sys/types.h | |
45 | eval $typedef | |
46 | case "$gidtype" in | |
47 | xxx) | |
48 | xxx=`./findhdr sys/user.h` | |
49 | set `grep 'groups\[NGROUPS\];' "$xxx" 2>/dev/null` unsigned short | |
50 | case $1 in | |
51 | unsigned) dflt="$1 $2" ;; | |
52 | *) dflt="$1" ;; | |
53 | esac | |
54 | ;; | |
55 | *) dflt="$gidtype";; | |
56 | esac | |
57 | echo " " | |
58 | rp="What is the type for group ids returned by getgid()?" | |
59 | . ./myread | |
60 | gidtype="$ans" | |
61 |