diff src/event/modules/ngx_kqueue_module.c @ 172:1b490fc19afa NGINX_0_3_33

nginx 0.3.33 *) Feature: the "http_503" parameter of the "proxy_next_upstream" or "fastcgi_next_upstream" directives. *) Bugfix: ngx_http_perl_module did not work with inlined in the configuration code, if it was not started with the "sub" word. *) Bugfix: in the "post_action" directive.
author Igor Sysoev <http://sysoev.ru>
date Wed, 15 Mar 2006 00:00:00 +0300
parents 3314be145cb9
children f7cd062ee035
line wrap: on
line diff
--- a/src/event/modules/ngx_kqueue_module.c
+++ b/src/event/modules/ngx_kqueue_module.c
@@ -491,16 +491,19 @@ ngx_kqueue_process_events(ngx_cycle_t *c
 
     } else {
 
+        ts.tv_sec = timer / 1000;
+        ts.tv_nsec = (timer % 1000) * 1000000;
+
         /*
-         * 64-bit MacOSX kernel has the bug: kernel level ts.tv_nsec is
+         * 64-bit Darwin kernel has the bug: kernel level ts.tv_nsec is
          * the int32_t while user level ts.tv_nsec is the long (64-bit),
          * so on the big endian PowerPC all nanoseconds are lost.
-         * NGX_MACOSX_KEVENT_BUG_SHIFT on these machines is "<< 32".
          */
 
-        ts.tv_sec = timer / 1000;
-        ts.tv_nsec = (long) ((timer % 1000) * 1000000)
-                            NGX_MACOSX_KEVENT_BUG_SHIFT;
+#if (NGX_DARWIN_KEVENT_BUG)
+        ts.tv_nsec <<= 32;
+#endif
+
         tp = &ts;
     }