summaryrefslogtreecommitdiff
path: root/ext/etc/extconf.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-18 00:58:34 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-18 00:58:34 +0000
commit63a23dc678361f9d3031141748d0ba6485516a54 (patch)
tree3de807a21f7a33f5cb47c85380368c8df78f09b7 /ext/etc/extconf.rb
parent63fee735002b34d37598d4830ef35073202dda58 (diff)
downloadruby-63a23dc678361f9d3031141748d0ba6485516a54.tar.gz
* ext/etc/etc.c: Etc.uname method implemented.
* ext/etc/extconf.rb: Check uname() function. [ruby-core:62139] [Feature #9770] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/etc/extconf.rb')
-rw-r--r--ext/etc/extconf.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/etc/extconf.rb b/ext/etc/extconf.rb
index c26553e71a..26f0ad1364 100644
--- a/ext/etc/extconf.rb
+++ b/ext/etc/extconf.rb
@@ -1,6 +1,13 @@
require 'mkmf'
+headers = []
+%w[sys/utsname.h].each {|h|
+ if have_header(h, headers)
+ headers << h
+ end
+}
have_library("sun", "getpwnam") # NIS (== YP) interface for IRIX 4
+have_func("uname((struct utsname *)NULL)", headers)
have_func("getlogin")
have_func("getpwent")
have_func("getgrent")