kconfig: rename E_OR & friends to avoid name clash
[safe/jmp/linux-2.6] / scripts / kconfig / symbol.c
index 8f06c47..add068c 100644 (file)
@@ -199,7 +199,7 @@ static void sym_calc_visibility(struct symbol *sym)
        tri = no;
        for_all_prompts(sym, prop) {
                prop->visible.tri = expr_calc_value(prop->visible.expr);
-               tri = E_OR(tri, prop->visible.tri);
+               tri = EXPR_OR(tri, prop->visible.tri);
        }
        if (tri == mod && (sym->type != S_TRISTATE || modules_val == no))
                tri = yes;
@@ -303,7 +303,7 @@ void sym_calc_value(struct symbol *sym)
                if (sym_is_choice_value(sym) && sym->visible == yes) {
                        prop = sym_get_choice_prop(sym);
                        newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no;
-               } else if (E_OR(sym->visible, sym->rev_dep.tri) != no) {
+               } else if (EXPR_OR(sym->visible, sym->rev_dep.tri) != no) {
                        sym->flags |= SYMBOL_WRITE;
                        if (sym_has_value(sym))
                                newval.tri = sym->def[S_DEF_USER].tri;
@@ -312,7 +312,7 @@ void sym_calc_value(struct symbol *sym)
                                if (prop)
                                        newval.tri = expr_calc_value(prop->expr);
                        }
-                       newval.tri = E_OR(E_AND(newval.tri, sym->visible), sym->rev_dep.tri);
+                       newval.tri = EXPR_OR(EXPR_AND(newval.tri, sym->visible), sym->rev_dep.tri);
                } else if (!sym_is_choice(sym)) {
                        prop = sym_get_default_prop(sym);
                        if (prop) {
@@ -786,13 +786,15 @@ static struct symbol *sym_check_expr_deps(struct expr *e)
        return NULL;
 }
 
+/* return NULL when dependencies are OK */
 struct symbol *sym_check_deps(struct symbol *sym)
 {
        struct symbol *sym2;
        struct property *prop;
 
        if (sym->flags & SYMBOL_CHECK) {
-               printf("Warning! Found recursive dependency: %s", sym->name);
+               fprintf(stderr, "%s:%d:error: found recursive dependency: %s",
+                       sym->prop->file->name, sym->prop->lineno, sym->name);
                return sym;
        }
        if (sym->flags & SYMBOL_CHECKED)
@@ -816,13 +818,8 @@ struct symbol *sym_check_deps(struct symbol *sym)
                        goto out;
        }
 out:
-       if (sym2) {
-               printf(" %s", sym->name);
-               if (sym2 == sym) {
-                       printf("\n");
-                       sym2 = NULL;
-               }
-       }
+       if (sym2)
+               fprintf(stderr, " -> %s%s", sym->name, sym2 == sym? "\n": "");
        sym->flags &= ~SYMBOL_CHECK;
        return sym2;
 }