comparison src/core/ngx_output_chain.c @ 3435:d65ba5392f59 stable-0.7

merge r3138, r3139, r3157, r3158, r3159, r3164, r3165, r3202, r3203, r3383, r3388, r3417, r3418: Win32 (mostly) and some Unix file related fixes: *) preserve errno while ngx_free() *) win32 ngx_file_info() utf8 support *) delete Win95 code *) log file name for read/write errors *) test incomplete WriteFile() *) handle short pwrite() to log an error cause: ENOSPC, EDQUOT, or EFBIG *) uniform ngx_directio_on/off() interface with other file functions *) do not create Win32 drive letter in ngx_create_full_path() *) ignore EACCES errors for top level directories in ngx_create_full_path() *) fix Win32 error messages when an temporary file replaces an existent file: *) do not rename an already renamed file *) now ngx_win32_rename_file() returns error code *) do not log failure inside ngx_win32_rename_file() *) fix Win32 error message when an temporary file replaces an existent file: return at once if ngx_win32_rename_file() was not failed and do not try to delete already the renamed temporary file *) skip URI trailing spaces under Win32 *) disable Win32 short file names
author Igor Sysoev <igor@sysoev.ru>
date Mon, 01 Feb 2010 15:06:25 +0000
parents 9ecd253fcc90
children
comparison
equal deleted inserted replaced
3434:8d310fbeaa38 3435:d65ba5392f59
508 } else { 508 } else {
509 509
510 #if (NGX_HAVE_ALIGNED_DIRECTIO) 510 #if (NGX_HAVE_ALIGNED_DIRECTIO)
511 511
512 if (ctx->unaligned) { 512 if (ctx->unaligned) {
513 if (ngx_directio_off(src->file->fd) == -1) { 513 if (ngx_directio_off(src->file->fd) == NGX_FILE_ERROR) {
514 ngx_log_error(NGX_LOG_ALERT, ctx->pool->log, ngx_errno, 514 ngx_log_error(NGX_LOG_ALERT, ctx->pool->log, ngx_errno,
515 ngx_directio_off_n " \"%s\" failed", 515 ngx_directio_off_n " \"%s\" failed",
516 src->file->name.data); 516 src->file->name.data);
517 } 517 }
518 } 518 }
526 if (ctx->unaligned) { 526 if (ctx->unaligned) {
527 ngx_err_t err; 527 ngx_err_t err;
528 528
529 err = ngx_errno; 529 err = ngx_errno;
530 530
531 if (ngx_directio_on(src->file->fd) == -1) { 531 if (ngx_directio_on(src->file->fd) == NGX_FILE_ERROR) {
532 ngx_log_error(NGX_LOG_ALERT, ctx->pool->log, ngx_errno, 532 ngx_log_error(NGX_LOG_ALERT, ctx->pool->log, ngx_errno,
533 ngx_directio_on_n " \"%s\" failed", 533 ngx_directio_on_n " \"%s\" failed",
534 src->file->name.data); 534 src->file->name.data);
535 } 535 }
536 536