about summary refs log tree commit homepage
path: root/ext/unicorn_http/extconf.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-01-04 17:50:51 -0800
committerEric Wong <normalperson@yhbt.net>2011-01-04 17:51:59 -0800
commitd100025759450dd1cbeccd1a3e44c46921bba26b (patch)
tree8f623be43ae96cc9246a43b01fb5650751ca3769 /ext/unicorn_http/extconf.rb
parent6183611108c571dbed29dfe2854b9f06757fd27f (diff)
downloadunicorn-d100025759450dd1cbeccd1a3e44c46921bba26b.tar.gz
This can return a static string and be significantly
faster as it reduces object allocations and Ruby method
calls for the fastest websites that serve thousands of
requests a second.

It assumes the Ruby runtime is single-threaded, but that
is the case of Ruby 1.8 and 1.9 and also what Unicorn
is all about.  This change is safe for Rainbows! under 1.8
and 1.9.
Diffstat (limited to 'ext/unicorn_http/extconf.rb')
-rw-r--r--ext/unicorn_http/extconf.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/unicorn_http/extconf.rb b/ext/unicorn_http/extconf.rb
index a2c8442..7da82e7 100644
--- a/ext/unicorn_http/extconf.rb
+++ b/ext/unicorn_http/extconf.rb
@@ -4,5 +4,6 @@ require 'mkmf'
 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("gmtime_r", "time.h")
 
 create_makefile("unicorn_http")