diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-07-29 20:55:11 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-07-29 20:55:11 +0400 |
commit | 0f17f6ce9f4188f1916c742f1fd1072ec8d33dbf (patch) | |
tree | f943f0921ba1038c7b87b13310abe8b9071b8a10 /src/os | |
parent | a089857143b4879c7a12d6be7c030b7dfc6dcb8d (diff) |
case insensitive file system location support provided by locale only
Diffstat (limited to 'src/os')
-rw-r--r-- | src/os/unix/ngx_files.h | 12 | ||||
-rw-r--r-- | src/os/win32/ngx_files.h | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/os/unix/ngx_files.h b/src/os/unix/ngx_files.h index a223b34e8..0c080c494 100644 --- a/src/os/unix/ngx_files.h +++ b/src/os/unix/ngx_files.h @@ -19,6 +19,8 @@ #ifdef __CYGWIN__ +#define NGX_HAVE_CASELESS_FILESYSTEM 1 + #define ngx_open_file(name, mode, create, access) \ open((const char *) name, mode|create|O_BINARY, access) @@ -103,6 +105,16 @@ ngx_int_t ngx_set_file_time(u_char *name, ngx_fd_t fd, time_t s); #define ngx_file_uniq(sb) (sb)->st_ino +#if (NGX_HAVE_CASELESS_FILESYSTEM) + +#define ngx_filename_cmp(s1, s2, n) strncasecmp((char *) s1, (char *) s2, n) + +#else + +#define ngx_filename_cmp ngx_memcmp + +#endif + #define ngx_getcwd(buf, size) (getcwd(buf, size) != NULL) #define ngx_getcwd_n "getcwd()" diff --git a/src/os/win32/ngx_files.h b/src/os/win32/ngx_files.h index 5f926417c..0c4e14fa3 100644 --- a/src/os/win32/ngx_files.h +++ b/src/os/win32/ngx_files.h @@ -123,6 +123,9 @@ ngx_int_t ngx_file_info(u_char *filename, ngx_file_info_t *fi); - 116444736000000000) / 10000000) +#define ngx_filename_cmp(s1, s2, n) strnicmp((char *) s1, (char *) s2, n) + + #define ngx_getcwd(buf, size) GetCurrentDirectory(size, buf) #define ngx_getcwd_n "GetCurrentDirectory()" #define NGX_MAX_PATH MAX_PATH |