summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-09 12:24:37 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-09 12:24:37 +0000
commitefbc2d7f0fbe316892b0eb984390458ba6d829ea (patch)
treebd13b5db303e3519fe07b4b155e220a70812e4cb
parent286a00f46b194b3329bc17c2c8d2eb6db6dcbc5c (diff)
merge revision(s) 39352,39360:
* 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. * process.c (RB_MAX_GROUPS): moved to git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--file.c5
-rw-r--r--internal.h1
-rw-r--r--process.c1
-rw-r--r--version.h2
5 files changed, 11 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 9353df996d..9f95e3bc27 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sat Mar 9 21:23:36 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * process.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.
+
Sat Mar 9 21:15:39 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* file.c (access_internal): removed.
diff --git a/file.c b/file.c
index 8ac9a7a44e..7d53f8d98f 100644
--- a/file.c
+++ b/file.c
@@ -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)
diff --git a/internal.h b/internal.h
index 8630b8bbf3..b5871fcd55 100644
--- a/internal.h
+++ b/internal.h
@@ -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;
diff --git a/process.c b/process.c
index c52562274c..34a38cb18e 100644
--- a/process.c
+++ b/process.c
@@ -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)
diff --git a/version.h b/version.h
index 43e970daea..b97bf507c0 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.0.0"
#define RUBY_RELEASE_DATE "2013-03-09"
-#define RUBY_PATCHLEVEL 21
+#define RUBY_PATCHLEVEL 22
#define RUBY_RELEASE_YEAR 2013
#define RUBY_RELEASE_MONTH 3