]> git.kaiwu.me - nginx.git/commitdiff
fix conflicting names "true" and "false"
authorIgor Sysoev <igor@sysoev.ru>
Thu, 31 Jul 2008 07:55:46 +0000 (07:55 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 31 Jul 2008 07:55:46 +0000 (07:55 +0000)
src/http/ngx_http_script.c
src/os/unix/ngx_atomic.h

index 0ffa07cc8c2b156e6505c8fafa84c99178e078c2..95c1cc1051c27249dc9b0a096c0350a83e44e123 100644 (file)
@@ -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_exists:
         case ngx_http_script_file_exec:
-             goto false;
+             goto false_value;
 
         case ngx_http_script_file_not_plain:
         case ngx_http_script_file_not_dir:
         case ngx_http_script_file_not_exists:
         case ngx_http_script_file_not_exec:
-             goto true;
+             goto true_value;
         }
 
-        goto false;
+        goto false_value;
     }
 
     switch (code->op) {
     case ngx_http_script_file_plain:
         if (of.is_file) {
-             goto true;
+             goto true_value;
         }
-        goto false;
+        goto false_value;
 
     case ngx_http_script_file_not_plain:
         if (of.is_file) {
-            goto false;
+            goto false_value;
         }
-        goto true;
+        goto true_value;
 
     case ngx_http_script_file_dir:
         if (of.is_dir) {
-             goto true;
+             goto true_value;
         }
-        goto false;
+        goto false_value;
 
     case ngx_http_script_file_not_dir:
         if (of.is_dir) {
-            goto false;
+            goto false_value;
         }
-        goto true;
+        goto true_value;
 
     case ngx_http_script_file_exists:
         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:
         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:
         if (of.is_exec) {
-             goto true;
+             goto true_value;
         }
-        goto false;
+        goto false_value;
 
     case ngx_http_script_file_not_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,
                    "http script file op false");
@@ -1086,7 +1086,7 @@ false:
     *value = ngx_http_variable_null_value;
     return;
 
-true:
+true_value:
 
     *value = ngx_http_variable_true_value;
     return;
index 22b8b01447e8a65bab3a272d3cf7fd722d0a7071..e19fddaca4d12e8da819b3ee1f304aa322928348 100644 (file)
 
 #include <libkern/OSAtomic.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
- */
+/* "bool" conflicts with perl's CORE/handy.h */
 #undef bool
-#undef true
-#undef false
 
 
 #define NGX_HAVE_ATOMIC_OPS  1