Latest update - 9235
This commit is contained in:
+1
-1
@@ -112,7 +112,7 @@ install: build $NGX_INSTALL_PERL_MODULES
|
||||
test ! -f '\$(DESTDIR)$NGX_SBIN_PATH' \\
|
||||
|| mv '\$(DESTDIR)$NGX_SBIN_PATH' \\
|
||||
'\$(DESTDIR)$NGX_SBIN_PATH.old'
|
||||
cp $NGX_OBJS/nginx '\$(DESTDIR)$NGX_SBIN_PATH'
|
||||
cp $NGX_OBJS/nginx$ngx_binext '\$(DESTDIR)$NGX_SBIN_PATH'
|
||||
|
||||
test -d '\$(DESTDIR)$NGX_CONF_PREFIX' \\
|
||||
|| mkdir -p '\$(DESTDIR)$NGX_CONF_PREFIX'
|
||||
|
||||
@@ -64,6 +64,23 @@ if [ $ngx_found = no ]; then
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# Homebrew on Apple Silicon
|
||||
|
||||
ngx_feature="GeoIP library in /opt/homebrew/"
|
||||
ngx_feature_path="/opt/homebrew/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lGeoIP"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/homebrew/lib -lGeoIP"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
|
||||
CORE_INCS="$CORE_INCS $ngx_feature_path"
|
||||
|
||||
@@ -46,6 +46,22 @@ if [ $ngx_found = no ]; then
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# Homebrew on Apple Silicon
|
||||
|
||||
ngx_feature="Google perftools in /opt/homebrew/"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lprofiler"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/homebrew/lib -lprofiler"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
|
||||
|
||||
@@ -65,6 +65,23 @@ if [ $ngx_found = no ]; then
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# Homebrew on Apple Silicon
|
||||
|
||||
ngx_feature="GD library in /opt/homebrew/"
|
||||
ngx_feature_path="/opt/homebrew/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lgd"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/homebrew/lib -lgd"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
|
||||
CORE_INCS="$CORE_INCS $ngx_feature_path"
|
||||
|
||||
@@ -122,6 +122,24 @@ else
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# Homebrew on Apple Silicon
|
||||
|
||||
ngx_feature="OpenSSL library in /opt/homebrew/"
|
||||
ngx_feature_path="/opt/homebrew/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lssl -lcrypto"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/homebrew/lib -lssl -lcrypto"
|
||||
fi
|
||||
|
||||
ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
have=NGX_SSL . auto/have
|
||||
CORE_INCS="$CORE_INCS $ngx_feature_path"
|
||||
|
||||
@@ -182,6 +182,22 @@ else
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# Homebrew on Apple Silicon
|
||||
|
||||
ngx_feature="PCRE library in /opt/homebrew/"
|
||||
ngx_feature_path="/opt/homebrew/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lpcre"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/homebrew/lib -lpcre"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_INCS="$CORE_INCS $ngx_feature_path"
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
|
||||
@@ -115,6 +115,21 @@ case "$NGX_MACHINE" in
|
||||
NGX_MACH_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
ppc64* | powerpc64*)
|
||||
have=NGX_ALIGNMENT value=16 . auto/define
|
||||
NGX_MACH_CACHE_LINE=128
|
||||
;;
|
||||
|
||||
riscv64)
|
||||
have=NGX_ALIGNMENT value=16 . auto/define
|
||||
NGX_MACH_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
s390x)
|
||||
have=NGX_ALIGNMENT value=16 . auto/define
|
||||
NGX_MACH_CACHE_LINE=256
|
||||
;;
|
||||
|
||||
*)
|
||||
have=NGX_ALIGNMENT value=16 . auto/define
|
||||
NGX_MACH_CACHE_LINE=32
|
||||
|
||||
@@ -228,6 +228,10 @@ ngx_feature_test="struct crypt_data cd;
|
||||
crypt_r(\"key\", \"salt\", &cd);"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CRYPT_LIB="-lcrypt"
|
||||
fi
|
||||
|
||||
|
||||
ngx_include="sys/vfs.h"; . auto/include
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ ngx_binext=".exe"
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
|
||||
gcc)
|
||||
clang | gcc)
|
||||
CORE_LIBS="$CORE_LIBS -ladvapi32 -lws2_32"
|
||||
MAIN_LINK="$MAIN_LINK -Wl,--export-all-symbols"
|
||||
MAIN_LINK="$MAIN_LINK -Wl,--out-implib=$NGX_OBJS/libnginx.a"
|
||||
|
||||
+1
-1
@@ -507,7 +507,7 @@ ngx_cidr_match(struct sockaddr *sa, ngx_array_t *cidrs)
|
||||
|
||||
p = inaddr6->s6_addr;
|
||||
|
||||
inaddr = p[12] << 24;
|
||||
inaddr = (in_addr_t) p[12] << 24;
|
||||
inaddr += p[13] << 16;
|
||||
inaddr += p[14] << 8;
|
||||
inaddr += p[15];
|
||||
|
||||
@@ -148,7 +148,7 @@ ngx_http_access_handler(ngx_http_request_t *r)
|
||||
p = sin6->sin6_addr.s6_addr;
|
||||
|
||||
if (alcf->rules && IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
|
||||
addr = p[12] << 24;
|
||||
addr = (in_addr_t) p[12] << 24;
|
||||
addr += p[13] << 16;
|
||||
addr += p[14] << 8;
|
||||
addr += p[15];
|
||||
|
||||
@@ -199,7 +199,7 @@ ngx_http_geo_cidr_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v,
|
||||
p = inaddr6->s6_addr;
|
||||
|
||||
if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
|
||||
inaddr = p[12] << 24;
|
||||
inaddr = (in_addr_t) p[12] << 24;
|
||||
inaddr += p[13] << 16;
|
||||
inaddr += p[14] << 8;
|
||||
inaddr += p[15];
|
||||
@@ -272,7 +272,7 @@ ngx_http_geo_range_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v,
|
||||
if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
|
||||
p = inaddr6->s6_addr;
|
||||
|
||||
inaddr = p[12] << 24;
|
||||
inaddr = (in_addr_t) p[12] << 24;
|
||||
inaddr += p[13] << 16;
|
||||
inaddr += p[14] << 8;
|
||||
inaddr += p[15];
|
||||
@@ -1259,7 +1259,7 @@ ngx_http_geo_value(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
|
||||
return gvvn->value;
|
||||
}
|
||||
|
||||
val = ngx_palloc(ctx->pool, sizeof(ngx_http_variable_value_t));
|
||||
val = ngx_pcalloc(ctx->pool, sizeof(ngx_http_variable_value_t));
|
||||
if (val == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -1271,8 +1271,6 @@ ngx_http_geo_value(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
|
||||
}
|
||||
|
||||
val->valid = 1;
|
||||
val->no_cacheable = 0;
|
||||
val->not_found = 0;
|
||||
|
||||
gvvn = ngx_palloc(ctx->temp_pool,
|
||||
sizeof(ngx_http_geo_variable_value_node_t));
|
||||
|
||||
@@ -266,7 +266,7 @@ ngx_http_geoip_addr(ngx_http_request_t *r, ngx_http_geoip_conf_t *gcf)
|
||||
if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
|
||||
p = inaddr6->s6_addr;
|
||||
|
||||
inaddr = p[12] << 24;
|
||||
inaddr = (in_addr_t) p[12] << 24;
|
||||
inaddr += p[13] << 16;
|
||||
inaddr += p[14] << 8;
|
||||
inaddr += p[15];
|
||||
|
||||
@@ -489,6 +489,7 @@ ngx_http_rewrite_return(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
}
|
||||
|
||||
if (cf->args->nelts == 2) {
|
||||
ngx_str_set(&ret->text.value, "");
|
||||
return NGX_CONF_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,11 +9,12 @@
|
||||
#include <ngx_core.h>
|
||||
|
||||
|
||||
char ngx_darwin_kern_ostype[16];
|
||||
char ngx_darwin_kern_osrelease[128];
|
||||
int ngx_darwin_hw_ncpu;
|
||||
int ngx_darwin_kern_ipc_somaxconn;
|
||||
u_long ngx_darwin_net_inet_tcp_sendspace;
|
||||
char ngx_darwin_kern_ostype[16];
|
||||
char ngx_darwin_kern_osrelease[128];
|
||||
int ngx_darwin_hw_ncpu;
|
||||
int ngx_darwin_kern_ipc_somaxconn;
|
||||
u_long ngx_darwin_net_inet_tcp_sendspace;
|
||||
int64_t ngx_darwin_hw_cachelinesize;
|
||||
|
||||
ngx_uint_t ngx_debug_malloc;
|
||||
|
||||
@@ -56,6 +57,10 @@ sysctl_t sysctls[] = {
|
||||
&ngx_darwin_kern_ipc_somaxconn,
|
||||
sizeof(ngx_darwin_kern_ipc_somaxconn), 0 },
|
||||
|
||||
{ "hw.cachelinesize",
|
||||
&ngx_darwin_hw_cachelinesize,
|
||||
sizeof(ngx_darwin_hw_cachelinesize), 0 },
|
||||
|
||||
{ NULL, NULL, 0, 0 }
|
||||
};
|
||||
|
||||
@@ -155,6 +160,7 @@ ngx_os_specific_init(ngx_log_t *log)
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
ngx_cacheline_size = ngx_darwin_hw_cachelinesize;
|
||||
ngx_ncpu = ngx_darwin_hw_ncpu;
|
||||
|
||||
if (ngx_darwin_kern_ipc_somaxconn > 32767) {
|
||||
|
||||
@@ -51,7 +51,10 @@ ngx_os_init(ngx_log_t *log)
|
||||
}
|
||||
|
||||
ngx_pagesize = getpagesize();
|
||||
ngx_cacheline_size = NGX_CPU_CACHE_LINE;
|
||||
|
||||
if (ngx_cacheline_size == 0) {
|
||||
ngx_cacheline_size = NGX_CPU_CACHE_LINE;
|
||||
}
|
||||
|
||||
for (n = ngx_pagesize; n >>= 1; ngx_pagesize_shift++) { /* void */ }
|
||||
|
||||
|
||||
@@ -154,7 +154,8 @@ ngx_int_t ngx_file_info(u_char *filename, ngx_file_info_t *fi);
|
||||
(((off_t) (fi)->nFileSizeHigh << 32) | (fi)->nFileSizeLow)
|
||||
#define ngx_file_fs_size(fi) ngx_file_size(fi)
|
||||
|
||||
#define ngx_file_uniq(fi) (*(ngx_file_uniq_t *) &(fi)->nFileIndexHigh)
|
||||
#define ngx_file_uniq(fi) \
|
||||
(((ngx_file_uniq_t) (fi)->nFileIndexHigh << 32) | (fi)->nFileIndexLow)
|
||||
|
||||
|
||||
/* 116444736000000000 is commented in src/os/win32/ngx_time.c */
|
||||
|
||||
@@ -144,7 +144,7 @@ ngx_stream_access_handler(ngx_stream_session_t *s)
|
||||
p = sin6->sin6_addr.s6_addr;
|
||||
|
||||
if (ascf->rules && IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
|
||||
addr = p[12] << 24;
|
||||
addr = (in_addr_t) p[12] << 24;
|
||||
addr += p[13] << 16;
|
||||
addr += p[14] << 8;
|
||||
addr += p[15];
|
||||
|
||||
@@ -190,7 +190,7 @@ ngx_stream_geo_cidr_variable(ngx_stream_session_t *s,
|
||||
p = inaddr6->s6_addr;
|
||||
|
||||
if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
|
||||
inaddr = p[12] << 24;
|
||||
inaddr = (in_addr_t) p[12] << 24;
|
||||
inaddr += p[13] << 16;
|
||||
inaddr += p[14] << 8;
|
||||
inaddr += p[15];
|
||||
@@ -263,7 +263,7 @@ ngx_stream_geo_range_variable(ngx_stream_session_t *s,
|
||||
if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
|
||||
p = inaddr6->s6_addr;
|
||||
|
||||
inaddr = p[12] << 24;
|
||||
inaddr = (in_addr_t) p[12] << 24;
|
||||
inaddr += p[13] << 16;
|
||||
inaddr += p[14] << 8;
|
||||
inaddr += p[15];
|
||||
@@ -1209,7 +1209,7 @@ ngx_stream_geo_value(ngx_conf_t *cf, ngx_stream_geo_conf_ctx_t *ctx,
|
||||
return gvvn->value;
|
||||
}
|
||||
|
||||
val = ngx_palloc(ctx->pool, sizeof(ngx_stream_variable_value_t));
|
||||
val = ngx_pcalloc(ctx->pool, sizeof(ngx_stream_variable_value_t));
|
||||
if (val == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -1221,8 +1221,6 @@ ngx_stream_geo_value(ngx_conf_t *cf, ngx_stream_geo_conf_ctx_t *ctx,
|
||||
}
|
||||
|
||||
val->valid = 1;
|
||||
val->no_cacheable = 0;
|
||||
val->not_found = 0;
|
||||
|
||||
gvvn = ngx_palloc(ctx->temp_pool,
|
||||
sizeof(ngx_stream_geo_variable_value_node_t));
|
||||
|
||||
@@ -236,7 +236,7 @@ ngx_stream_geoip_addr(ngx_stream_session_t *s, ngx_stream_geoip_conf_t *gcf)
|
||||
if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
|
||||
p = inaddr6->s6_addr;
|
||||
|
||||
inaddr = p[12] << 24;
|
||||
inaddr = (in_addr_t) p[12] << 24;
|
||||
inaddr += p[13] << 16;
|
||||
inaddr += p[14] << 8;
|
||||
inaddr += p[15];
|
||||
|
||||
Reference in New Issue
Block a user