diff options
author | emaste <emaste@FreeBSD.org> | 2009-10-22 20:57:17 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2009-10-22 20:57:17 +0000 |
commit | 9865537354df85edf977958f1c04e00b0d5f6589 (patch) | |
tree | 1df8389fcd301dee2063b4ad839b2721374df505 /sys/tools | |
parent | 51a785c86492fc9cfcf8faddc1243f0c5bec63c6 (diff) | |
download | FreeBSD-src-9865537354df85edf977958f1c04e00b0d5f6589.zip FreeBSD-src-9865537354df85edf977958f1c04e00b0d5f6589.tar.gz |
Rename default to default_function, for compatibility with GNU awk.
(For cross-compiling out-of-tree kernel modules, for example.)
Diffstat (limited to 'sys/tools')
-rw-r--r-- | sys/tools/makeobjops.awk | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/tools/makeobjops.awk b/sys/tools/makeobjops.awk index 61994f3..0406b85 100644 --- a/sys/tools/makeobjops.awk +++ b/sys/tools/makeobjops.awk @@ -240,7 +240,7 @@ function handle_method (static, doc) lineno++ } - default = ""; + default_function = ""; if (!match(line, /\};?/)) { warnsrc("Premature end of file"); error = 1; @@ -248,9 +248,9 @@ function handle_method (static, doc) } extra = substr(line, RSTART + RLENGTH); if (extra ~ /[ ]*DEFAULT[ ]*[a-zA-Z_][a-zA-Z_0-9]*[ ]*;/) { - default = extra; - sub(/.*DEFAULT[ ]*/, "", default); - sub(/[; ]+.*$/, "", default); + default_function = extra; + sub(/.*DEFAULT[ ]*/, "", default_function); + sub(/[; ]+.*$/, "", default_function); } else if (extra && opt_d) { # Warn about garbage at end of line. @@ -294,8 +294,8 @@ function handle_method (static, doc) firstvar = varnames[1]; - if (default == "") - default = "kobj_error_method"; + if (default_function == "") + default_function = "kobj_error_method"; # the method description printh("/** @brief Unique descriptor for the " umname "() method */"); @@ -308,7 +308,7 @@ function handle_method (static, doc) # Print out the method desc printc("struct kobj_method " mname "_method_default = {"); - printc("\t&" mname "_desc, (kobjop_t) " default); + printc("\t&" mname "_desc, (kobjop_t) " default_function); printc("};\n"); printc("struct kobjop_desc " mname "_desc = {"); |