fix conflicting names "true" and "false"
Igor Sysoev
13 years ago
1015 | 1015 | case ngx_http_script_file_dir: |
1016 | 1016 | case ngx_http_script_file_exists: |
1017 | 1017 | case ngx_http_script_file_exec: |
1018 | goto false; | |
1018 | goto false_value; | |
1019 | 1019 | |
1020 | 1020 | case ngx_http_script_file_not_plain: |
1021 | 1021 | case ngx_http_script_file_not_dir: |
1022 | 1022 | case ngx_http_script_file_not_exists: |
1023 | 1023 | case ngx_http_script_file_not_exec: |
1024 | goto true; | |
1025 | } | |
1026 | ||
1027 | goto false; | |
1024 | goto true_value; | |
1025 | } | |
1026 | ||
1027 | goto false_value; | |
1028 | 1028 | } |
1029 | 1029 | |
1030 | 1030 | switch (code->op) { |
1031 | 1031 | case ngx_http_script_file_plain: |
1032 | 1032 | if (of.is_file) { |
1033 | goto true; | |
1034 | } | |
1035 | goto false; | |
1033 | goto true_value; | |
1034 | } | |
1035 | goto false_value; | |
1036 | 1036 | |
1037 | 1037 | case ngx_http_script_file_not_plain: |
1038 | 1038 | if (of.is_file) { |
1039 | goto false; | |
1040 | } | |
1041 | goto true; | |
1039 | goto false_value; | |
1040 | } | |
1041 | goto true_value; | |
1042 | 1042 | |
1043 | 1043 | case ngx_http_script_file_dir: |
1044 | 1044 | if (of.is_dir) { |
1045 | goto true; | |
1046 | } | |
1047 | goto false; | |
1045 | goto true_value; | |
1046 | } | |
1047 | goto false_value; | |
1048 | 1048 | |
1049 | 1049 | case ngx_http_script_file_not_dir: |
1050 | 1050 | if (of.is_dir) { |
1051 | goto false; | |
1052 | } | |
1053 | goto true; | |
1051 | goto false_value; | |
1052 | } | |
1053 | goto true_value; | |
1054 | 1054 | |
1055 | 1055 | case ngx_http_script_file_exists: |
1056 | 1056 | if (of.is_file || of.is_dir || of.is_link) { |
1057 | goto true; | |
1058 | } | |
1059 | goto false; | |
1057 | goto true_value; | |
1058 | } | |
1059 | goto false_value; | |
1060 | 1060 | |
1061 | 1061 | case ngx_http_script_file_not_exists: |
1062 | 1062 | if (of.is_file || of.is_dir || of.is_link) { |
1063 | goto false; | |
1064 | } | |
1065 | goto true; | |
1063 | goto false_value; | |
1064 | } | |
1065 | goto true_value; | |
1066 | 1066 | |
1067 | 1067 | case ngx_http_script_file_exec: |
1068 | 1068 | if (of.is_exec) { |
1069 | goto true; | |
1070 | } | |
1071 | goto false; | |
1069 | goto true_value; | |
1070 | } | |
1071 | goto false_value; | |
1072 | 1072 | |
1073 | 1073 | case ngx_http_script_file_not_exec: |
1074 | 1074 | if (of.is_exec) { |
1075 | goto false; | |
1076 | } | |
1077 | goto true; | |
1078 | } | |
1079 | ||
1080 | false: | |
1075 | goto false_value; | |
1076 | } | |
1077 | goto true_value; | |
1078 | } | |
1079 | ||
1080 | false_value: | |
1081 | 1081 | |
1082 | 1082 | ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
1083 | 1083 | "http script file op false"); |
1085 | 1085 | *value = ngx_http_variable_null_value; |
1086 | 1086 | return; |
1087 | 1087 | |
1088 | true: | |
1088 | true_value: | |
1089 | 1089 | |
1090 | 1090 | *value = ngx_http_variable_true_value; |
1091 | 1091 | return; |
20 | 20 | |
21 | 21 | #include <libkern/OSAtomic.h> |
22 | 22 | |
23 | /* "bool" conflicts with perl's CORE/handy.h | |
24 | * "true" and "false" conflict with nginx, and of course we can rename them, | |
25 | * but we need to undef "bool" anyway | |
26 | */ | |
23 | /* "bool" conflicts with perl's CORE/handy.h */ | |
27 | 24 | #undef bool |
28 | #undef true | |
29 | #undef false | |
30 | 25 | |
31 | 26 | |
32 | 27 | #define NGX_HAVE_ATOMIC_OPS 1 |