summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--ext/Setup.dj6
-rw-r--r--ext/etc/etc.c4
-rw-r--r--ext/etc/extconf.rb2
4 files changed, 18 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 93ecafedd4..5ec41c0d61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Mon Nov 24 19:32:55 2003 WATANABE Hirofumi <eban@ruby-lang.org>
+
+ * 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.
+
Mon Nov 24 17:00:00 2003 Tanaka Akira <akr@m17n.org>
* lib/open-uri.rb: validate option names.
diff --git a/ext/Setup.dj b/ext/Setup.dj
index b84960a2e0..f2ed3a4f16 100644
--- a/ext/Setup.dj
+++ b/ext/Setup.dj
@@ -2,7 +2,7 @@ option nodynamic
#Win32API
bigdecimal
-#curses
+curses
dbm
digest
digest/md5
@@ -10,7 +10,7 @@ digest/rmd160
digest/sha1
digest/sha2
#dl
-#etc
+etc
enumerator
fcntl
gdbm
@@ -30,4 +30,4 @@ syck
#tcltklib
#tk
#win32ole
-#zlib
+zlib
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 807a98c6b7..c42f279d58 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 bf6890ca9d..16f2da352b 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