about summary refs log tree commit homepage
path: root/ext
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-09-14 17:34:46 -0700
committerEric Wong <normalperson@yhbt.net>2009-09-14 23:17:55 -0700
commitf37c23704cb73d57e9e478295d1641df1d9104c7 (patch)
treebf6cd5b631dceadb3b2e15caf34f3d0a8e6e48b0 /ext
parentfaeb894d1db8e6893405545f00ae5da01157015e (diff)
downloadunicorn-f37c23704cb73d57e9e478295d1641df1d9104c7.tar.gz
Rubinius has no rb_str_modify() function, it /may/
not need it.
Diffstat (limited to 'ext')
-rw-r--r--ext/unicorn_http/ext_help.h4
-rw-r--r--ext/unicorn_http/extconf.rb1
2 files changed, 5 insertions, 0 deletions
diff --git a/ext/unicorn_http/ext_help.h b/ext/unicorn_http/ext_help.h
index 83e80a0..8df2d80 100644
--- a/ext/unicorn_http/ext_help.h
+++ b/ext/unicorn_http/ext_help.h
@@ -33,6 +33,10 @@ static void rb_18_str_set_len(VALUE str, long len)
 #  endif
 #endif /* ! defined(OFFT2NUM) */
 
+#ifndef HAVE_RB_STR_MODIFY
+#  define rb_str_modify(x) do {} while (0)
+#endif
+
 static inline int str_cstr_eq(VALUE val, const char *ptr, size_t len)
 {
   return (RSTRING_LEN(val) == len && !memcmp(ptr, RSTRING_PTR(val), len));
diff --git a/ext/unicorn_http/extconf.rb b/ext/unicorn_http/extconf.rb
index 2bf0f48..164df66 100644
--- a/ext/unicorn_http/extconf.rb
+++ b/ext/unicorn_http/extconf.rb
@@ -6,4 +6,5 @@ dir_config("unicorn_http")
 have_macro("SIZEOF_OFF_T", "ruby.h") or check_sizeof("off_t", "sys/types.h")
 have_macro("SIZEOF_LONG", "ruby.h") or check_sizeof("long", "sys/types.h")
 have_func("rb_str_set_len", "ruby.h")
+have_func("rb_str_modify", "ruby.h")
 create_makefile("unicorn_http")