Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/os/unix
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-10-25 19:29:23 +0400
committerIgor Sysoev <igor@sysoev.ru>2004-10-25 19:29:23 +0400
commit723e6cc248470b95f62e338cd5e1a6514975f9cc (patch)
treedd9fb2b16d384f241c2303d3cbb6e25aeeb89ab0 /src/os/unix
parent4925ed843a96d9b2dbb41ef961cc37e9fa03539a (diff)
nginx-0.1.3-RELEASE importrelease-0.1.3
*) Feature: the ngx_http_autoindex_module and the autoindex directive. *) Feature: the proxy_set_x_url directive. *) Bugfix: proxy module may get caught in an endless loop when sendfile is not used.
Diffstat (limited to 'src/os/unix')
-rw-r--r--src/os/unix/ngx_errno.c4
-rw-r--r--src/os/unix/ngx_errno.h2
-rw-r--r--src/os/unix/ngx_files.c6
-rw-r--r--src/os/unix/ngx_files.h2
-rw-r--r--src/os/unix/ngx_types.h3
5 files changed, 10 insertions, 7 deletions
diff --git a/src/os/unix/ngx_errno.c b/src/os/unix/ngx_errno.c
index 2faf63a00..0c93d23a1 100644
--- a/src/os/unix/ngx_errno.c
+++ b/src/os/unix/ngx_errno.c
@@ -8,7 +8,7 @@
#include <ngx_core.h>
-#if (HAVE_STRERROR_R)
+#if (NGX_STRERROR_R)
ngx_int_t ngx_strerror_r(int err, char *errstr, size_t size)
{
@@ -31,7 +31,7 @@ ngx_int_t ngx_strerror_r(int err, char *errstr, size_t size)
return len;
}
-#elif (HAVE_GNU_STRERROR_R)
+#elif (NGX_GNU_STRERROR_R)
/* Linux strerror_r() */
diff --git a/src/os/unix/ngx_errno.h b/src/os/unix/ngx_errno.h
index 7218bb291..cc9b1d19f 100644
--- a/src/os/unix/ngx_errno.h
+++ b/src/os/unix/ngx_errno.h
@@ -51,6 +51,8 @@ ngx_int_t ngx_strerror_r(int err, char *errstr, size_t size);
#else
+/* Solaris has threads-safe strerror() */
+
#define ngx_strerror_r(err, errstr, size) \
(char *) ngx_cpystrn(errstr, strerror(err), size) - (errstr)
diff --git a/src/os/unix/ngx_files.c b/src/os/unix/ngx_files.c
index f2ba3a451..da75ba022 100644
--- a/src/os/unix/ngx_files.c
+++ b/src/os/unix/ngx_files.c
@@ -15,7 +15,7 @@ ssize_t ngx_read_file(ngx_file_t *file, u_char *buf, size_t size, off_t offset)
ngx_log_debug4(NGX_LOG_DEBUG_CORE, file->log, 0,
"read: %d, %X, %d, " OFF_T_FMT, file->fd, buf, size, offset);
-#if (HAVE_PREAD)
+#if (NGX_PREAD)
n = pread(file->fd, buf, size, offset);
@@ -57,7 +57,7 @@ ssize_t ngx_write_file(ngx_file_t *file, u_char *buf, size_t size, off_t offset)
{
ssize_t n;
-#if (HAVE_PWRITE)
+#if (NGX_PWRITE)
n = pwrite(file->fd, buf, size, offset);
@@ -206,7 +206,7 @@ int ngx_open_dir(ngx_str_t *name, ngx_dir_t *dir)
return NGX_ERROR;
}
- dir->info_valid = 0;
+ dir->valid_info = 0;
return NGX_OK;
}
diff --git a/src/os/unix/ngx_files.h b/src/os/unix/ngx_files.h
index 06c22f5d3..b789d6184 100644
--- a/src/os/unix/ngx_files.h
+++ b/src/os/unix/ngx_files.h
@@ -98,7 +98,7 @@ int ngx_open_dir(ngx_str_t *name, ngx_dir_t *dir);
#define ngx_delete_dir_n "rmdir()"
-#define ngx_de_name(dir) (dir)->de->d_name
+#define ngx_de_name(dir) ((u_char *) (dir)->de->d_name)
#if (NGX_FREEBSD)
#define ngx_de_namelen(dir) (dir)->de->d_namlen
#else
diff --git a/src/os/unix/ngx_types.h b/src/os/unix/ngx_types.h
index 49fb17de8..870c414b8 100644
--- a/src/os/unix/ngx_types.h
+++ b/src/os/unix/ngx_types.h
@@ -19,7 +19,8 @@ typedef struct {
DIR *dir;
struct dirent *de;
struct stat info;
- unsigned info_valid;
+
+ ngx_uint_t valid_info:1; /* unsigned valid_info:1; */
} ngx_dir_t;