ruby-changes:10813
From: nobu <ko1@a...>
Date: Wed, 18 Feb 2009 01:58:23 +0900 (JST)
Subject: [ruby-changes:10813] Ruby:r22381 (ruby_1_8): * ext/etc/etc.c (sGroup): getgrent may not be available.
nobu 2009-02-18 01:58:12 +0900 (Wed, 18 Feb 2009) New Revision: 22381 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22381 Log: * ext/etc/etc.c (sGroup): getgrent may not be available. Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/ext/etc/etc.c Index: ruby_1_8/ext/etc/etc.c =================================================================== --- ruby_1_8/ext/etc/etc.c (revision 22380) +++ ruby_1_8/ext/etc/etc.c (revision 22381) @@ -27,7 +27,10 @@ #define uid_t int #endif -static VALUE sPasswd, sGroup; +static VALUE sPasswd; +#ifdef HAVE_GETGRENT +static VALUE sGroup; +#endif #ifndef _WIN32 char *getenv(); @@ -139,7 +142,7 @@ uid = getuid(); } pwd = getpwuid(uid); - if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %d", uid); + if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %d", (int)uid); return setup_passwd(pwd); #else return Qnil; @@ -341,7 +344,7 @@ rb_secure(4); gid = PW_VAL2GID(id); grp = getgrgid(gid); - if (grp == 0) rb_raise(rb_eArgError, "can't find group for %d", gid); + if (grp == 0) rb_raise(rb_eArgError, "can't find group for %d", (int)gid); return setup_group(grp); #else return Qnil; Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 22380) +++ ruby_1_8/ChangeLog (revision 22381) @@ -1,3 +1,7 @@ +Wed Feb 18 01:58:11 2009 Nobuyoshi Nakada <nobu@r...> + + * ext/etc/etc.c (sGroup): getgrent may not be available. + Tue Feb 17 17:02:45 2009 Nobuyoshi Nakada <nobu@r...> * version.c, version.h: NO_STRING_LITERAL_CONCATENATION support. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/