mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/etc/extconf.rb: use egrep_cpp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9307e0402b
commit
ac376af4f4
2 changed files with 6 additions and 11 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Jun 5 13:41:13 2001 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* ext/etc/extconf.rb: use egrep_cpp.
|
||||
|
||||
Mon Jun 4 04:14:53 2001 Wakou Aoyama <wakou@fsinet.or.jp>
|
||||
|
||||
* lib/shellwords.rb: don't destroy argument.
|
||||
|
|
|
@ -1,17 +1,8 @@
|
|||
require 'mkmf'
|
||||
|
||||
def etc_grep_header(field)
|
||||
f = open("conftest.c", "w")
|
||||
f.print <<EOF
|
||||
#include <pwd.h>
|
||||
EOF
|
||||
f.close
|
||||
begin
|
||||
if xsystem("#{CPP} | egrep #{field}")
|
||||
$defs.push(format("-D%s", field.upcase))
|
||||
end
|
||||
ensure
|
||||
system "rm -f conftest.c"
|
||||
if egrep_cpp(field, "#include <pwd.h>\n")
|
||||
$defs.push(format("-D%s", field.upcase))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue