aboutsummaryrefslogtreecommitdiffstats
path: root/ext/etc/extconf.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-18 04:13:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-18 04:13:09 +0000
commit562f256c54dbb1a0a26699ba3dceba24062a9b11 (patch)
tree765bda387c202be5cf3db52886842b7d79ba29f7 /ext/etc/extconf.rb
parentbf6efa76c0abcd1a2577cf0ca49f8137d3483b60 (diff)
downloadruby-562f256c54dbb1a0a26699ba3dceba24062a9b11.tar.gz
* configure.in (pid_t, uid_t, gid_t): check if defined.
* intern.h, process.c, rubyio.h, ext/etc/etc.c, ext/pty/pty.c: use rb_{pid,uid,gid}_t instead of plain int. [ruby-dev:30376] * ext/etc/extconf.rb (PIDT2NUM, NUM2PIDT, UIDT2NUM, NUM2UIDT, GIDT2NUM, NUM2GIDT): moved to configure.in. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/etc/extconf.rb')
-rw-r--r--ext/etc/extconf.rb15
1 files changed, 0 insertions, 15 deletions
diff --git a/ext/etc/extconf.rb b/ext/etc/extconf.rb
index dbd0672545..2914bfb196 100644
--- a/ext/etc/extconf.rb
+++ b/ext/etc/extconf.rb
@@ -24,20 +24,5 @@ if a or b or c
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')
- [%w"uid_t pwd.h", %w"gid_t grp.h"].each do |t, *h|
- h.unshift("sys/types.h")
- f = "INT2NUM"
- if have_type(t, h)
- if try_static_assert("sizeof(#{t}) > sizeof(long)", h)
- f = "LL2NUM"
- end
- if try_static_assert("(#{t})-1 > 0", h)
- f = "U#{f}"
- end
- end
- t = t.chomp('_t').upcase
- $defs.push("-DPW_#{t}2VAL=#{f}")
- $defs.push("-DPW_VAL2#{t}=#{f.sub(/([A-Z]+)2(NUM)/, '\22\1')}")
- end
create_makefile("etc")
end