diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-01-21 18:53:09 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-01-21 18:53:09 +0300 |
commit | 5aa6d223a60843dcc09caff8be659bd7e5d568e8 (patch) | |
tree | 98f23664d6ce6f6a1bc365be6592d9789a4a4f54 /src/os | |
parent | 467f437e275e5efad12cd77ef1ab0e93f48ae3d4 (diff) |
fix win32 ngx_is_dir(), etc
Diffstat (limited to 'src/os')
-rw-r--r-- | src/os/win32/ngx_files.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/os/win32/ngx_files.h b/src/os/win32/ngx_files.h index 174c6f574..5855e673f 100644 --- a/src/os/win32/ngx_files.h +++ b/src/os/win32/ngx_files.h @@ -132,8 +132,10 @@ ngx_int_t ngx_file_info(u_char *filename, ngx_file_info_t *fi); #define ngx_fd_info_n "GetFileInformationByHandle()" -#define ngx_is_dir(fi) ((fi)->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) -#define ngx_is_file(fi) !((fi)->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) +#define ngx_is_dir(fi) \ + (((fi)->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0) +#define ngx_is_file(fi) \ + (((fi)->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) #define ngx_is_link(fi) 0 #define ngx_is_exec(fi) 0 @@ -200,9 +202,9 @@ ngx_int_t ngx_de_link_info(u_char *name, ngx_dir_t *dir); #define ngx_de_link_info_n "dummy()" #define ngx_de_is_dir(dir) \ - ((dir)->finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + (((dir)->finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0) #define ngx_de_is_file(dir) \ - !((dir)->finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + (((dir)->finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) #define ngx_de_is_link(dir) 0 #define ngx_de_access(dir) 0 #define ngx_de_size(dir) \ |