about summary refs log tree commit homepage
path: root/ext/unicorn_http/httpdate.c
diff options
context:
space:
mode:
authorEric Wong <bofh@yhbt.net>2021-10-01 03:09:18 +0000
committerEric Wong <bofh@yhbt.net>2021-10-04 17:39:55 -0900
commit8296cd0fff593364698e3a8ca3905103eee131ee (patch)
treec9d8a092ac3a57f2d4c108d60ec9b427e636720a /ext/unicorn_http/httpdate.c
parentfc7c85fc446d4c3e33ea1694426a574c7c695566 (diff)
downloadunicorn-8296cd0fff593364698e3a8ca3905103eee131ee.tar.gz
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.
Diffstat (limited to 'ext/unicorn_http/httpdate.c')
-rw-r--r--ext/unicorn_http/httpdate.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/unicorn_http/httpdate.c b/ext/unicorn_http/httpdate.c
index b59d038..3f512dd 100644
--- a/ext/unicorn_http/httpdate.c
+++ b/ext/unicorn_http/httpdate.c
@@ -11,6 +11,7 @@ static const char months[] = "Jan\0Feb\0Mar\0Apr\0May\0Jun\0"
 
 /* for people on wonky systems only */
 #ifndef HAVE_GMTIME_R
+# warning using fake gmtime_r
 static struct tm * my_gmtime_r(time_t *now, struct tm *tm)
 {
         struct tm *global = gmtime(now);