mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
fix conflicting names "true" and "false"
This commit is contained in:
parent
e513a89220
commit
a3e9f7d306
@ -1016,69 +1016,69 @@ ngx_http_script_file_code(ngx_http_script_engine_t *e)
|
|||||||
case ngx_http_script_file_dir:
|
case ngx_http_script_file_dir:
|
||||||
case ngx_http_script_file_exists:
|
case ngx_http_script_file_exists:
|
||||||
case ngx_http_script_file_exec:
|
case ngx_http_script_file_exec:
|
||||||
goto false;
|
goto false_value;
|
||||||
|
|
||||||
case ngx_http_script_file_not_plain:
|
case ngx_http_script_file_not_plain:
|
||||||
case ngx_http_script_file_not_dir:
|
case ngx_http_script_file_not_dir:
|
||||||
case ngx_http_script_file_not_exists:
|
case ngx_http_script_file_not_exists:
|
||||||
case ngx_http_script_file_not_exec:
|
case ngx_http_script_file_not_exec:
|
||||||
goto true;
|
goto true_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
goto false;
|
goto false_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (code->op) {
|
switch (code->op) {
|
||||||
case ngx_http_script_file_plain:
|
case ngx_http_script_file_plain:
|
||||||
if (of.is_file) {
|
if (of.is_file) {
|
||||||
goto true;
|
goto true_value;
|
||||||
}
|
}
|
||||||
goto false;
|
goto false_value;
|
||||||
|
|
||||||
case ngx_http_script_file_not_plain:
|
case ngx_http_script_file_not_plain:
|
||||||
if (of.is_file) {
|
if (of.is_file) {
|
||||||
goto false;
|
goto false_value;
|
||||||
}
|
}
|
||||||
goto true;
|
goto true_value;
|
||||||
|
|
||||||
case ngx_http_script_file_dir:
|
case ngx_http_script_file_dir:
|
||||||
if (of.is_dir) {
|
if (of.is_dir) {
|
||||||
goto true;
|
goto true_value;
|
||||||
}
|
}
|
||||||
goto false;
|
goto false_value;
|
||||||
|
|
||||||
case ngx_http_script_file_not_dir:
|
case ngx_http_script_file_not_dir:
|
||||||
if (of.is_dir) {
|
if (of.is_dir) {
|
||||||
goto false;
|
goto false_value;
|
||||||
}
|
}
|
||||||
goto true;
|
goto true_value;
|
||||||
|
|
||||||
case ngx_http_script_file_exists:
|
case ngx_http_script_file_exists:
|
||||||
if (of.is_file || of.is_dir || of.is_link) {
|
if (of.is_file || of.is_dir || of.is_link) {
|
||||||
goto true;
|
goto true_value;
|
||||||
}
|
}
|
||||||
goto false;
|
goto false_value;
|
||||||
|
|
||||||
case ngx_http_script_file_not_exists:
|
case ngx_http_script_file_not_exists:
|
||||||
if (of.is_file || of.is_dir || of.is_link) {
|
if (of.is_file || of.is_dir || of.is_link) {
|
||||||
goto false;
|
goto false_value;
|
||||||
}
|
}
|
||||||
goto true;
|
goto true_value;
|
||||||
|
|
||||||
case ngx_http_script_file_exec:
|
case ngx_http_script_file_exec:
|
||||||
if (of.is_exec) {
|
if (of.is_exec) {
|
||||||
goto true;
|
goto true_value;
|
||||||
}
|
}
|
||||||
goto false;
|
goto false_value;
|
||||||
|
|
||||||
case ngx_http_script_file_not_exec:
|
case ngx_http_script_file_not_exec:
|
||||||
if (of.is_exec) {
|
if (of.is_exec) {
|
||||||
goto false;
|
goto false_value;
|
||||||
}
|
}
|
||||||
goto true;
|
goto true_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
false:
|
false_value:
|
||||||
|
|
||||||
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
|
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
|
||||||
"http script file op false");
|
"http script file op false");
|
||||||
@ -1086,7 +1086,7 @@ false:
|
|||||||
*value = ngx_http_variable_null_value;
|
*value = ngx_http_variable_null_value;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
true:
|
true_value:
|
||||||
|
|
||||||
*value = ngx_http_variable_true_value;
|
*value = ngx_http_variable_true_value;
|
||||||
return;
|
return;
|
||||||
|
@ -21,13 +21,8 @@
|
|||||||
|
|
||||||
#include <libkern/OSAtomic.h>
|
#include <libkern/OSAtomic.h>
|
||||||
|
|
||||||
/* "bool" conflicts with perl's CORE/handy.h
|
/* "bool" conflicts with perl's CORE/handy.h */
|
||||||
* "true" and "false" conflict with nginx, and of course we can rename them,
|
|
||||||
* but we need to undef "bool" anyway
|
|
||||||
*/
|
|
||||||
#undef bool
|
#undef bool
|
||||||
#undef true
|
|
||||||
#undef false
|
|
||||||
|
|
||||||
|
|
||||||
#define NGX_HAVE_ATOMIC_OPS 1
|
#define NGX_HAVE_ATOMIC_OPS 1
|
||||||
|
Loading…
Reference in New Issue
Block a user