This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add the files from dist/meta to perl's repo
[metaconfig.git] / dist / U / groupstype.U
CommitLineData
d8875586
MBT
1?RCS: $Id: groupstype.U 1 2006-08-24 12:32:52Z rmanfredi $
2?RCS:
3?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
4?RCS:
5?RCS: You may redistribute only under the terms of the Artistic Licence,
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 Licence; a copy of which may be found at the root
9?RCS: of the source tree for dist 4.0.
10?RCS:
11?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
12?RCS:
13?RCS: $Log: groupstype.U,v $
14?RCS: Revision 3.0.1.2 1994/10/29 16:18:08 ram
15?RCS: patch36: no longer uses Setvar to set 'groupstype' (ADO)
16?RCS: patch36: typo fix in the word 'argument' (ADO)
17?RCS:
18?RCS: Revision 3.0.1.1 1994/06/20 07:00:18 ram
19?RCS: patch30: created by ADO
20?RCS:
21?MAKE:groupstype: gidtype d_getgrps Myread Oldconfig Findhdr cat d_setgrps
22?MAKE: -pick add $@ %<
23?INIT:groupstype=''
24?S:groupstype:
25?S: This variable defines Groups_t to be something like gid_t, int,
26?S: ushort, or whatever type is used for the second argument to
27?S: getgroups() and setgroups(). Usually, this is the same as
28?S: gidtype (gid_t), but sometimes it isn't.
29?S:.
30?C:Groups_t (GROUPSTYPE):
31?C: This symbol holds the type used for the second argument to
32?C: getgroups() and setgroups(). Usually, this is the same as
33?C: gidtype (gid_t) , but sometimes it isn't.
34?C: It can be int, ushort, gid_t, etc...
35?C: It may be necessary to include <sys/types.h> to get any
36?C: typedef'ed information. This is only required if you have
37?C: getgroups() or setgroups()..
38?C:.
39?H:?%<:#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
40?H:?%<:#define Groups_t $groupstype /* Type for 2nd arg to [sg]etgroups() */
41?H:?%<:#endif
42?H:.
43?W:%<:getgroups HAS_GETGROUPS setgroups HAS_SETGROUPS
44: Find type of 2nd arg to 'getgroups()' and 'setgroups()'
45echo " "
46case "$d_getgrps$d_setgrps" in
47*define*)
48 case "$groupstype" in
49 '') dflt="$gidtype" ;;
50 *) dflt="$groupstype" ;;
51 esac
52 $cat <<EOM
53What type of pointer is the second argument to getgroups() and setgroups()?
54Usually this is the same as group ids, $gidtype, but not always.
55
56EOM
57 rp='What type pointer is the second argument to getgroups() and setgroups()?'
58 . ./myread
59 groupstype="$ans"
60 ;;
61*) groupstype="$gidtype";;
62esac
63