summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-08 14:29:22 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-08 14:29:22 +0000
commitd558bb59c8d9c752babe1249cc1932126feebf7e (patch)
treebdaadf1e71b5f67cf308931f4c44b9c625605143
parent9652eae6e7f618bddb898d0c630a1983b1b77ac9 (diff)
* process.c (get_sc_ngroups_max): try to use NGROUPS_MAX at first if
_SC_NGROUP_MAX is not defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--process.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e3b2af32d1..dce5daa607 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Mar 8 23:27:38 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * process.c (get_sc_ngroups_max): try to use NGROUPS_MAX at first if
+ _SC_NGROUP_MAX is not defined.
+
Tue Mar 8 23:10:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* misc/ruby-mode.el (ruby-parse-partial): fix for array in block.
diff --git a/process.c b/process.c
index 4b6c164d6b..ebaa0239b7 100644
--- a/process.c
+++ b/process.c
@@ -4550,6 +4550,8 @@ static int get_sc_ngroups_max(void)
{
#ifdef _SC_NGROUPS_MAX
return (int)sysconf(_SC_NGROUPS_MAX);
+#elif defined(NGROUPS_MAX)
+ return (int)NGROUPS_MAX;
#else
return 32;
#endif