summaryrefslogtreecommitdiff
path: root/trunk/ext/etc/extconf.rb
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 15:02:05 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 15:02:05 +0000
commit0dc342de848a642ecce8db697b8fecd83a63e117 (patch)
tree2b7ed4724aff1f86073e4740134bda9c4aac1a39 /trunk/ext/etc/extconf.rb
parentef70cf7138ab8034b5b806f466e4b484b24f0f88 (diff)
added tag v1_9_0_4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_9_0_4@18845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'trunk/ext/etc/extconf.rb')
-rw-r--r--trunk/ext/etc/extconf.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/trunk/ext/etc/extconf.rb b/trunk/ext/etc/extconf.rb
new file mode 100644
index 0000000000..2914bfb196
--- /dev/null
+++ b/trunk/ext/etc/extconf.rb
@@ -0,0 +1,28 @@
+require 'mkmf'
+
+have_library("sun", "getpwnam") # NIS (== YP) interface for IRIX 4
+a = have_func("getlogin")
+b = have_func("getpwent")
+c = have_func("getgrent")
+if a or b or c
+ have_struct_member('struct passwd', 'pw_gecos', 'pwd.h')
+ have_struct_member('struct passwd', 'pw_change', 'pwd.h')
+ have_struct_member('struct passwd', 'pw_quota', 'pwd.h')
+ if have_struct_member('struct passwd', 'pw_age', 'pwd.h')
+ case what_type?('struct passwd', 'pw_age', 'pwd.h')
+ when "string"
+ f = "safe_setup_str"
+ when "long long"
+ f = "LL2NUM"
+ else
+ f = "INT2NUM"
+ end
+ $defs.push("-DPW_AGE2VAL="+f)
+ end
+ 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