summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-03 05:42:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-03 05:42:35 +0000
commitabd0e48c5769b30c524c3b537fc70013e836bf68 (patch)
tree33be3203615d35efda60fa63409b55d82c2f2afd /ext
parent052ca546a39620cc742a92f902b4330bbf2137a8 (diff)
downloadruby-abd0e48c5769b30c524c3b537fc70013e836bf68.tar.gz
ruby-abd0e48c5769b30c524c3b537fc70013e836bf68.tar.xz
ruby-abd0e48c5769b30c524c3b537fc70013e836bf68.zip
* ext/etc/extconf.rb (PW_UID2VAL, PW_GID2VAL): defaulted to conversion
from int, and sys/types.h needs to be included before grp.h. fixed: [ruby-dev:28938] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/etc/extconf.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/etc/extconf.rb b/ext/etc/extconf.rb
index 5cdb824fd..2496d36aa 100644
--- a/ext/etc/extconf.rb
+++ b/ext/etc/extconf.rb
@@ -25,18 +25,17 @@ if a or b or c
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 << "sys/types.h"
+ h.unshift("sys/types.h")
+ f = "INT2NUM"
if have_type(t, h)
if try_static_assert("sizeof(#{t}) > sizeof(long)", h)
f = "LL2NUM"
- else
- f = "INT2NUM"
end
if try_static_assert("(#{t})-1 > 0", h)
f = "U#{f}"
end
- $defs.push("-DPW_#{t.chomp('_t').upcase}2VAL=#{f}")
end
+ $defs.push("-DPW_#{t.chomp('_t').upcase}2VAL=#{f}")
end
create_makefile("etc")
end