diff --git a/src/os/unix/ngx_files.h b/src/os/unix/ngx_files.h index c4eccf1fe..d4ad8a467 100644 --- a/src/os/unix/ngx_files.h +++ b/src/os/unix/ngx_files.h @@ -55,7 +55,12 @@ ssize_t ngx_write_chain_to_file(ngx_file_t *file, ngx_chain_t *ce, off_t offset, ngx_pool_t *pool); +#define ngx_read_fd read +#define ngx_read_fd_n "read()" + #define ngx_write_fd write +#define ngx_write_fd_n "write()" + #define ngx_linefeed(p) *p++ = LF; #define NGX_LINEFEED_SIZE 1 diff --git a/src/os/win32/ngx_files.h b/src/os/win32/ngx_files.h index f5a97f8b4..96e0c8d44 100644 --- a/src/os/win32/ngx_files.h +++ b/src/os/win32/ngx_files.h @@ -68,7 +68,12 @@ ngx_int_t ngx_file_append_mode(ngx_fd_t fd); #define ngx_close_file_n "CloseHandle()" +#define ngx_read_fd(fd, buf, size) ReadFile(fd, buf, size, NULL, NULL) +#define ngx_read_fd_n "ReadFile()" + #define ngx_write_fd(fd, buf, size) WriteFile(fd, buf, size, NULL, NULL) +#define ngx_write_fd_n "WriteFile()" + #define ngx_linefeed(p) *p++ = CR; *p++ = LF; #define NGX_LINEFEED_SIZE 2