summaryrefslogtreecommitdiff
path: root/mcon/U/groupstype.U
blob: 39727f109bd9711bcbdd0b8e09b0e3c23e5bd5a3 (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
?RCS: $Id$
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS: 
?RCS: You may redistribute only under the terms of the Artistic Licence,
?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 Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS: 
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
?RCS:
?RCS: $Log: groupstype.U,v $
?RCS: Revision 3.0.1.2  1994/10/29  16:18:08  ram
?RCS: patch36: no longer uses Setvar to set 'groupstype' (ADO)
?RCS: patch36: typo fix in the word 'argument' (ADO)
?RCS:
?RCS: Revision 3.0.1.1  1994/06/20  07:00:18  ram
?RCS: patch30: created by ADO
?RCS:
?MAKE:groupstype: gidtype d_getgrps Myread Oldconfig Findhdr cat d_setgrps
?MAKE:	-pick add $@ %<
?INIT:groupstype=''
?S:groupstype:
?S:	This variable defines Groups_t to be something like gid_t, int, 
?S:	ushort, or whatever type is used for the second argument to
?S:	getgroups() and setgroups().  Usually, this is the same as
?S:	gidtype (gid_t), but sometimes it isn't.
?S:.
?C:Groups_t (GROUPSTYPE):
?C:	This symbol holds the type used for the second argument to
?C:	getgroups() and setgroups().  Usually, this is the same as
?C:	gidtype (gid_t) , but sometimes it isn't.
?C:	It can be int, ushort, gid_t, etc... 
?C:	It may be necessary to include <sys/types.h> to get any 
?C:	typedef'ed information.  This is only required if you have
?C:	getgroups() or setgroups()..
?C:.
?H:?%<:#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
?H:?%<:#define Groups_t $groupstype	/* Type for 2nd arg to [sg]etgroups() */
?H:?%<:#endif
?H:.
?W:%<:getgroups HAS_GETGROUPS setgroups HAS_SETGROUPS
: Find type of 2nd arg to 'getgroups()' and 'setgroups()'
echo " "
case "$d_getgrps$d_setgrps" in
*define*)
	case "$groupstype" in
	'') dflt="$gidtype" ;;
	*)  dflt="$groupstype" ;;
	esac
	$cat <<EOM
What type of pointer is the second argument to getgroups() and setgroups()?
Usually this is the same as group ids, $gidtype, but not always.

EOM
	rp='What type pointer is the second argument to getgroups() and setgroups()?'
	. ./myread
	groupstype="$ans"
	;;
*)  groupstype="$gidtype";;
esac