diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-06-05 04:43:17 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-06-05 04:43:17 +0000 |
commit | ee075dcfb3257bf08fc43fff4c9032a1d3306840 (patch) | |
tree | abee653bfd09ab04a700fffe88b8383f326aaac3 /ext | |
parent | 1c2291a141cebfef58ce193e0534f9a4cc813191 (diff) | |
download | ruby-ee075dcfb3257bf08fc43fff4c9032a1d3306840.tar.gz ruby-ee075dcfb3257bf08fc43fff4c9032a1d3306840.tar.xz ruby-ee075dcfb3257bf08fc43fff4c9032a1d3306840.zip |
* ext/etc/extconf.rb: use egrep_cpp.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/etc/extconf.rb | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/ext/etc/extconf.rb b/ext/etc/extconf.rb index 6fe881046..b920d91a9 100644 --- a/ext/etc/extconf.rb +++ b/ext/etc/extconf.rb @@ -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 |