diff options
author | Eric Wong <bofh@yhbt.net> | 2021-10-01 03:09:18 +0000 |
---|---|---|
committer | Eric Wong <bofh@yhbt.net> | 2021-10-04 17:39:55 -0900 |
commit | 8296cd0fff593364698e3a8ca3905103eee131ee (patch) | |
tree | c9d8a092ac3a57f2d4c108d60ec9b427e636720a /ext/unicorn_http/ext_help.h | |
parent | fc7c85fc446d4c3e33ea1694426a574c7c695566 (diff) | |
download | unicorn-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/ext_help.h')
-rw-r--r-- | ext/unicorn_http/ext_help.h | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/ext/unicorn_http/ext_help.h b/ext/unicorn_http/ext_help.h index 747c36c..86a187e 100644 --- a/ext/unicorn_http/ext_help.h +++ b/ext/unicorn_http/ext_help.h @@ -8,30 +8,6 @@ # define assert_frozen(f) do {} while (0) #endif /* !defined(OBJ_FROZEN) */ -#if !defined(OFFT2NUM) -# if SIZEOF_OFF_T == SIZEOF_LONG -# define OFFT2NUM(n) LONG2NUM(n) -# else -# define OFFT2NUM(n) LL2NUM(n) -# endif -#endif /* ! defined(OFFT2NUM) */ - -#if !defined(SIZET2NUM) -# if SIZEOF_SIZE_T == SIZEOF_LONG -# define SIZET2NUM(n) ULONG2NUM(n) -# else -# define SIZET2NUM(n) ULL2NUM(n) -# endif -#endif /* ! defined(SIZET2NUM) */ - -#if !defined(NUM2SIZET) -# if SIZEOF_SIZE_T == SIZEOF_LONG -# define NUM2SIZET(n) ((size_t)NUM2ULONG(n)) -# else -# define NUM2SIZET(n) ((size_t)NUM2ULL(n)) -# endif -#endif /* ! defined(NUM2SIZET) */ - static inline int str_cstr_eq(VALUE val, const char *ptr, long len) { return (RSTRING_LEN(val) == len && !memcmp(ptr, RSTRING_PTR(val), len)); |