nginx-0.1.3-RELEASE import
*) 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.
diff --git a/src/os/unix/ngx_errno.c b/src/os/unix/ngx_errno.c
index 2faf63a..0c93d23 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 @@
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 7218bb2..cc9b1d1 100644
--- a/src/os/unix/ngx_errno.h
+++ b/src/os/unix/ngx_errno.h
@@ -51,6 +51,8 @@
#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 f2ba3a4..da75ba0 100644
--- a/src/os/unix/ngx_files.c
+++ b/src/os/unix/ngx_files.c
@@ -15,7 +15,7 @@
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 n;
-#if (HAVE_PWRITE)
+#if (NGX_PWRITE)
n = pwrite(file->fd, buf, size, offset);
@@ -206,7 +206,7 @@
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 06c22f5..b789d61 100644
--- a/src/os/unix/ngx_files.h
+++ b/src/os/unix/ngx_files.h
@@ -98,7 +98,7 @@
#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 49fb17d..870c414 100644
--- a/src/os/unix/ngx_types.h
+++ b/src/os/unix/ngx_types.h
@@ -19,7 +19,8 @@
DIR *dir;
struct dirent *de;
struct stat info;
- unsigned info_valid;
+
+ ngx_uint_t valid_info:1; /* unsigned valid_info:1; */
} ngx_dir_t;