summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Meissner <wmeissner@gmail.com>2013-03-08 11:11:28 +1000
committerWayne Meissner <wmeissner@gmail.com>2013-03-08 11:14:23 +1000
commit794b924c26b692a8d3f1ac2a47f2ee39f81e35c1 (patch)
tree0deb12927bf142191f71e349a9c198a6cb7048f3
parentc8cf7dd3a8b89ccb34e5942d119af02dfdcac20f (diff)
downloadffi-794b924c26b692a8d3f1ac2a47f2ee39f81e35c1.tar.gz
Only strip options if preceded by whitespace
-rw-r--r--ext/ffi_c/extconf.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/ffi_c/extconf.rb b/ext/ffi_c/extconf.rb
index b60ddeb..74a3b64 100644
--- a/ext/ffi_c/extconf.rb
+++ b/ext/ffi_c/extconf.rb
@@ -7,8 +7,8 @@ if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
# recent versions of ruby add restrictive ansi and warning flags on a whim - kill them all
$warnflags = ''
- $CFLAGS.gsub!(/-ansi/, '')
- $CFLAGS.gsub!(/-std=[^\s]+/, '')
+ $CFLAGS.gsub!(/[\s+]-ansi/, '')
+ $CFLAGS.gsub!(/[\s+]-std=[^\s]+/, '')
# solaris needs -c99 for <stdbool.h>
$CFLAGS << " -std=c99" if RbConfig::CONFIG['host_os'] =~ /solaris/