1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* file.c (RB_MAX_GROUPS): moved to

* internal.h (RB_MAX_GROUPS): here.

* file.c (rb_group_member): use RB_MAX_GROUPS instead of
  RUBY_GROUP_MAX. They are the same.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kosaki 2013-02-21 04:41:39 +00:00
parent 1cda6e3968
commit e93a68abfa
4 changed files with 10 additions and 5 deletions

View file

@ -1,3 +1,11 @@
Thu Feb 21 13:37:07 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* file.c (RB_MAX_GROUPS): moved to
* internal.h (RB_MAX_GROUPS): here.
* file.c (rb_group_member): use RB_MAX_GROUPS instead of
RUBY_GROUP_MAX. They are the same.
Thu Feb 21 13:15:40 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* file.c (access_internal): removed.

5
file.c
View file

@ -1013,9 +1013,6 @@ rb_file_lstat(VALUE obj)
#endif
}
/* Linux allow 65536 groups and it is maximum value as far as we know. */
#define RUBY_GROUP_MAX 65536
static int
rb_group_member(GETGROUPS_T gid)
{
@ -1036,7 +1033,7 @@ rb_group_member(GETGROUPS_T gid)
* accept more larger value.
* So we don't trunk NGROUPS anymore.
*/
while (groups <= RUBY_GROUP_MAX) {
while (groups <= RB_MAX_GROUPS) {
gary = ALLOCV_N(GETGROUPS_T, v, groups);
anum = getgroups(groups, gary);
if (anum != groups)

View file

@ -191,6 +191,7 @@ VALUE rb_proc_location(VALUE self);
st_index_t rb_hash_proc(st_index_t hash, VALUE proc);
/* process.c */
#define RB_MAX_GROUPS (65536)
struct rb_execarg {
int use_shell;

View file

@ -5432,7 +5432,6 @@ proc_setgid(VALUE obj, VALUE id)
* HP-UX 20
* Windows 1015
*/
#define RB_MAX_GROUPS (65536)
static int _maxgroups = -1;
static int
get_sc_ngroups_max(void)