mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* file.c (rb_home_dir): checks if HAVE_PWD_H. [ruby-dev:38049]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
90f84988fc
commit
4caba4ebd0
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Thu Feb 19 13:56:00 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* file.c (rb_home_dir): checks if HAVE_PWD_H. [ruby-dev:38049]
|
||||||
|
|
||||||
Thu Feb 19 08:45:48 2009 TAKANO Mitsuhiro (takano32) <tak@no32.tk>
|
Thu Feb 19 08:45:48 2009 TAKANO Mitsuhiro (takano32) <tak@no32.tk>
|
||||||
|
|
||||||
* ext/socket/rubysocket.h: add "#include <sys/stat.h>"
|
* ext/socket/rubysocket.h: add "#include <sys/stat.h>"
|
||||||
|
|
2
file.c
2
file.c
|
@ -2621,7 +2621,7 @@ rb_home_dir(const char *user, VALUE result)
|
||||||
memcpy(buf = RSTRING_PTR(result), dir, dirlen);
|
memcpy(buf = RSTRING_PTR(result), dir, dirlen);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#ifdef HAVE_GETPWENT
|
#ifdef HAVE_PWD_H
|
||||||
struct passwd *pwPtr = getpwnam(user);
|
struct passwd *pwPtr = getpwnam(user);
|
||||||
if (!pwPtr) {
|
if (!pwPtr) {
|
||||||
endpwent();
|
endpwent();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue