summaryrefslogtreecommitdiff
path: root/ext/etc/etc.c
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-08 10:00:43 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-08 10:00:43 +0000
commitb8ff4a843e4dbf1fab1f033a660f80cccf6a095d (patch)
tree9516ab54f8cd4b5c5f2a0e97b0d1cb9567cba6c7 /ext/etc/etc.c
parentd76fdc013bea0cd7881fb2d49e94264c834f374b (diff)
* lib/mkmf.rb (have_struct_member): moved from ext/socket/extconf.rb.
* ext/socket/extconf.rb: use macro_defined? instead of egrep_cpp. * ext/etc/extconf.rb: use have_struct_member. * ext/etc/etc.c: add prefix HAVE_ST_ to PW_ macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/etc/etc.c')
-rw-r--r--ext/etc/etc.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 76af10be77..b10943458d 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -58,27 +58,27 @@ setup_passwd(pwd)
rb_tainted_str_new2(pwd->pw_passwd),
INT2FIX(pwd->pw_uid),
INT2FIX(pwd->pw_gid),
-#ifdef PW_GECOS
+#ifdef HAVE_ST_PW_GECOS
rb_tainted_str_new2(pwd->pw_gecos),
#endif
rb_tainted_str_new2(pwd->pw_dir),
rb_tainted_str_new2(pwd->pw_shell),
-#ifdef PW_CHANGE
+#ifdef HAVE_ST_PW_CHANGE
INT2FIX(pwd->pw_change),
#endif
-#ifdef PW_QUOTA
+#ifdef HAVE_ST_PW_QUOTA
INT2FIX(pwd->pw_quota),
#endif
-#ifdef PW_AGE
+#ifdef HAVE_ST_PW_AGE
INT2FIX(pwd->pw_age),
#endif
-#ifdef PW_CLASS
+#ifdef HAVE_ST_PW_CLASS
rb_tainted_str_new2(pwd->pw_class),
#endif
-#ifdef PW_COMMENT
+#ifdef HAVE_ST_PW_COMMENT
rb_tainted_str_new2(pwd->pw_comment),
#endif
-#ifdef PW_EXPIRE
+#ifdef HAVE_ST_PW_EXPIRE
INT2FIX(pwd->pw_expire),
#endif
0 /*dummy*/
@@ -294,26 +294,26 @@ Init_etc()
sPasswd = rb_struct_define("Passwd",
"name", "passwd", "uid", "gid",
-#ifdef PW_GECOS
+#ifdef HAVE_ST_PW_GECOS
"gecos",
#endif
"dir", "shell",
-#ifdef PW_CHANGE
+#ifdef HAVE_ST_PW_CHANGE
"change",
#endif
-#ifdef PW_QUOTA
+#ifdef HAVE_ST_PW_QUOTA
"quota",
#endif
-#ifdef PW_AGE
+#ifdef HAVE_ST_PW_AGE
"age",
#endif
-#ifdef PW_CLASS
+#ifdef HAVE_ST_PW_CLASS
"uclass",
#endif
-#ifdef PW_COMMENT
+#ifdef HAVE_ST_PW_COMMENT
"comment",
#endif
-#ifdef PW_EXPIRE
+#ifdef HAVE_ST_PW_EXPIRE
"expire",
#endif
0);