diff options
Diffstat (limited to 'src/os')
-rw-r--r-- | src/os/unix/ngx_types.h | 2 | ||||
-rw-r--r-- | src/os/win32/ngx_sendfile.c | 7 | ||||
-rw-r--r-- | src/os/win32/ngx_types.h | 4 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/os/unix/ngx_types.h b/src/os/unix/ngx_types.h index 94417cba9..ba00950b0 100644 --- a/src/os/unix/ngx_types.h +++ b/src/os/unix/ngx_types.h @@ -5,6 +5,8 @@ #include <ngx_config.h> +#define QD_FMT "%qd" +#define QX_FMT "%qx" #endif /* _NGX_TYPES_H_INCLUDED_ */ diff --git a/src/os/win32/ngx_sendfile.c b/src/os/win32/ngx_sendfile.c index d17df6436..c41b3b319 100644 --- a/src/os/win32/ngx_sendfile.c +++ b/src/os/win32/ngx_sendfile.c @@ -53,7 +53,7 @@ int ngx_sendfile(ngx_socket_t s, ptfb = NULL; } -#if 0 +#if 1 tfrc = TransmitFile(s, fd, nbytes, 0, &olp, ptfb, 0); #else tfrc = TransmitFile(s, fd, nbytes, 0, NULL, ptfb, 0); @@ -67,8 +67,13 @@ int ngx_sendfile(ngx_socket_t s, rc = WSAGetOverlappedResult(s, &olp, (unsigned long *) sent, 0, NULL); #endif +#if 0 ngx_log_debug(log, "ngx_sendfile: %d, @%I64d %I64d:%d" _ tfrc _ offset _ *sent _ nbytes); +#else + ngx_log_debug(log, "ngx_sendfile: %d, @%I64d %d:%d" _ + tfrc _ offset _ olp.InternalHigh _ nbytes); +#endif if (rc == 0) { err = ngx_socket_errno; diff --git a/src/os/win32/ngx_types.h b/src/os/win32/ngx_types.h index 85a2c56d0..6a7587867 100644 --- a/src/os/win32/ngx_types.h +++ b/src/os/win32/ngx_types.h @@ -10,4 +10,8 @@ typedef long time_t; typedef unsigned __int64 off_t; +#define QD_FMT "%I64d" +#define QX_FMT "%I64x" + + #endif /* _NGX_TYPES_H_INCLUDED_ */ |