1999-01-19 23:59:39 -05:00
|
|
|
require 'mkmf'
|
|
|
|
|
1998-01-16 07:13:05 -05:00
|
|
|
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
|
2002-09-08 06:00:43 -04:00
|
|
|
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')
|
2005-09-06 19:35:31 -04:00
|
|
|
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
|
2002-09-08 06:00:43 -04:00
|
|
|
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')
|
2003-11-24 05:42:17 -05:00
|
|
|
have_struct_member('struct passwd', 'pw_passwd', 'pwd.h')
|
|
|
|
have_struct_member('struct group', 'gr_passwd', 'grp.h')
|
1998-01-16 07:13:05 -05:00
|
|
|
create_makefile("etc")
|
|
|
|
end
|