mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/etc/etc.c (etc_each_group): defines only when Etc::Group is
available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f35308b3ef
commit
22f1a984f1
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Feb 19 15:14:25 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/etc/etc.c (etc_each_group): defines only when Etc::Group is
|
||||
available.
|
||||
|
||||
Thu Feb 19 15:11:40 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* eval_intern.h (translit_char): moved from ruby.c.
|
||||
|
|
|
@ -468,6 +468,7 @@ etc_group(VALUE obj)
|
|||
return Qnil;
|
||||
}
|
||||
|
||||
#ifdef HAVE_GETPWENT
|
||||
/* Iterates for each entry in the /etc/group file if a block is given.
|
||||
* If no block is given, returns the enumerator.
|
||||
*
|
||||
|
@ -489,12 +490,11 @@ etc_group(VALUE obj)
|
|||
static VALUE
|
||||
etc_each_group(VALUE obj)
|
||||
{
|
||||
#ifdef HAVE_GETPWENT
|
||||
RETURN_ENUMERATOR(obj, 0, 0);
|
||||
each_group();
|
||||
#endif
|
||||
return obj;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Resets the process of reading the /etc/group file, so that the next call
|
||||
* to getgrent will return the first entry again.
|
||||
|
|
Loading…
Reference in a new issue