summaryrefslogtreecommitdiff
path: root/ext/etc
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-24 10:42:17 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-24 10:42:17 +0000
commit9421725f53a40c8ac3e7ede3e76726f59eaddd51 (patch)
tree326e0874760cd2334b456170a28803b73ba9c2df /ext/etc
parent483ac5644036ec1f1cf6e74b773c9315c611c8b3 (diff)
* ext/etc/extconf.rb: check for pw_passwd in struct passwd and
gr_passwd in struct group for DJGPP. * ext/etc/etc.c: ditto. * ext/Setup.dj: support for curses, etc, zlib. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/etc')
-rw-r--r--ext/etc/etc.c4
-rw-r--r--ext/etc/extconf.rb2
2 files changed, 6 insertions, 0 deletions
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 807a98c..c42f279 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -67,7 +67,9 @@ setup_passwd(pwd)
if (pwd == 0) rb_sys_fail("/etc/passwd");
return rb_struct_new(sPasswd,
safe_setup_str(pwd->pw_name),
+#ifdef HAVE_ST_PW_PASSWD
safe_setup_str(pwd->pw_passwd),
+#endif
INT2FIX(pwd->pw_uid),
INT2FIX(pwd->pw_gid),
#ifdef HAVE_ST_PW_GECOS
@@ -235,7 +237,9 @@ setup_group(grp)
}
return rb_struct_new(sGroup,
safe_setup_str(grp->gr_name),
+#ifdef HAVE_ST_GR_PASSWD
safe_setup_str(grp->gr_passwd),
+#endif
INT2FIX(grp->gr_gid),
mem);
}
diff --git a/ext/etc/extconf.rb b/ext/etc/extconf.rb
index bf6890c..16f2da3 100644
--- a/ext/etc/extconf.rb
+++ b/ext/etc/extconf.rb
@@ -12,5 +12,7 @@ if a or b or c
have_struct_member('struct passwd', 'pw_class', 'pwd.h')
have_struct_member('struct passwd', 'pw_comment', 'pwd.h') unless /cygwin/ === RUBY_PLATFORM
have_struct_member('struct passwd', 'pw_expire', 'pwd.h')
+ have_struct_member('struct passwd', 'pw_passwd', 'pwd.h')
+ have_struct_member('struct group', 'gr_passwd', 'grp.h')
create_makefile("etc")
end