From 8296cd0fff593364698e3a8ca3905103eee131ee Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 1 Oct 2021 03:09:18 +0000 Subject: extconf.rb: get rid of unnecessary checks SIZEOF_*, *2NUM and NUM2* should all be defined by ruby.h and dependencies it pulls in since Ruby 2.0 and possibly earlier. INT_MAX and LLONG_MAX are in limits.h which is POSIX. HAVE_GMTIME_R is already defined by ruby/config.h, so we shouldn't have to check for it, either. Combined, these changes speed up extconf.rb by several seconds. --- ext/unicorn_http/extconf.rb | 5 ----- 1 file changed, 5 deletions(-) (limited to 'ext/unicorn_http/extconf.rb') diff --git a/ext/unicorn_http/extconf.rb b/ext/unicorn_http/extconf.rb index 8bdc1c9..46070a7 100644 --- a/ext/unicorn_http/extconf.rb +++ b/ext/unicorn_http/extconf.rb @@ -6,12 +6,7 @@ unless RUBY_VERSION < '3.1' "It might not properly work with #{RUBY_VERSION}" end -have_macro("SIZEOF_OFF_T", "ruby.h") or check_sizeof("off_t", "sys/types.h") -have_macro("SIZEOF_SIZE_T", "ruby.h") or check_sizeof("size_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") or abort 'Ruby 2.0+ required' have_func("rb_hash_clear", "ruby.h") or abort 'Ruby 2.0+ required' -have_func("gmtime_r", "time.h") message('checking if String#-@ (str_uminus) dedupes... ') begin -- cgit v1.2.3-24-ge0c7