diff options
author | Pierre Muller <muller@sourceware.org> | 2012-11-08 09:04:27 +0000 |
---|---|---|
committer | Pierre Muller <muller@sourceware.org> | 2012-11-08 09:04:27 +0000 |
commit | 84f1359519f1c7ff240d9fb2f84dfd7315ba4576 (patch) | |
tree | 07df4f95cdc95c182ffa75f641cad5d4a084a52e /gdb/contrib | |
parent | d69e6a338dcef599eee89853646fb4fd1b988bfe (diff) | |
download | gdb-84f1359519f1c7ff240d9fb2f84dfd7315ba4576.zip gdb-84f1359519f1c7ff240d9fb2f84dfd7315ba4576.tar.gz gdb-84f1359519f1c7ff240d9fb2f84dfd7315ba4576.tar.bz2 |
* contrib/ari/gdb_ari.sh (LANG, LC_ALL): Use 'C' instead of 'c'
as default language.
(AWK): Use = instead of == for sh test to avoid warning.
(Linux rule): Correct [:digit] into [[:digit:]].
(__func__ rule): Adapt to "gdb_assert.h" move to common subdirectory.
(vasprintf rule): Adapt to common subdirectory moves.
(xasprintf rule): Idem.
(xvasprintf rule): Idem.
(var_boolean rule): Accept occurence in == or != test.
* contrib/ari/gdb_find.sh: Also prune gdbtk directory.
Diffstat (limited to 'gdb/contrib')
-rw-r--r-- | gdb/contrib/ari/gdb_ari.sh | 23 | ||||
-rw-r--r-- | gdb/contrib/ari/gdb_find.sh | 1 |
2 files changed, 13 insertions, 11 deletions
diff --git a/gdb/contrib/ari/gdb_ari.sh b/gdb/contrib/ari/gdb_ari.sh index 21ad58e..b8ee06f 100644 --- a/gdb/contrib/ari/gdb_ari.sh +++ b/gdb/contrib/ari/gdb_ari.sh @@ -22,8 +22,8 @@ # Make certain that the script is not running in an internationalized # environment. -LANG=c ; export LANG -LC_ALL=c ; export LC_ALL +LANG=C ; export LANG +LC_ALL=C ; export LC_ALL # Permanent checks take the form: @@ -130,7 +130,7 @@ do errors="${errors} error[ari_${e}] = 1;" done -if [ "$AWK" == "" ] ; then +if [ "$AWK" = "" ] ; then AWK=awk fi @@ -268,7 +268,7 @@ Do not use `Linux'\'', instead use `Linux kernel'\'' or `GNU/Linux system'\'';\ && !/(^|[^_[:alnum:]])Linux\[sic\]([^_[:alnum:]]|$)/ \ && !/(^|[^_[:alnum:]])GNU\/Linux([^_[:alnum:]]|$)/ \ && !/(^|[^_[:alnum:]])Linux kernel([^_[:alnum:]]|$)/ \ -&& !/(^|[^_[:alnum:]])Linux [:digit:]\.[:digit:]+)/ { +&& !/(^|[^_[:alnum:]])Linux [[:digit:]]\.[[:digit:]]+)/ { fail("GNU/Linux") } @@ -479,7 +479,7 @@ Do not use PARAMS(), ISO C 90 implies prototypes" BEGIN { doc["__func__"] = "\ Do not use __func__, ISO C 90 does not support this macro" category["__func__"] = ari_regression - fix("__func__", "gdb/gdb_assert.h", 1) + fix("__func__", "common/gdb_assert.h", 1) } /(^|[^_[:alnum:]])__func__([^_[:alnum:]]|$)/ { fail("__func__") @@ -1120,7 +1120,7 @@ Do not use asprintf(), instead use xstrprintf()" BEGIN { doc["vasprintf"] = "\ Do not use vasprintf(), instead use xstrvprintf" - fix("vasprintf", "gdb/utils.c", 1) + fix("vasprintf", "common/common-utils.c", 1) category["vasprintf"] = ari_regression } /(^|[^_[:alnum:]])vasprintf[[:space:]]*\(/ { @@ -1129,8 +1129,8 @@ Do not use vasprintf(), instead use xstrvprintf" BEGIN { doc["xasprintf"] = "\ Do not use xasprintf(), instead use xstrprintf" - fix("xasprintf", "gdb/defs.h", 1) - fix("xasprintf", "gdb/utils.c", 1) + fix("xasprintf", "common/common-utils.h", 1) + fix("xasprintf", "common/common-utils.c", 1) category["xasprintf"] = ari_regression } /(^|[^_[:alnum:]])xasprintf[[:space:]]*\(/ { @@ -1139,8 +1139,8 @@ Do not use xasprintf(), instead use xstrprintf" BEGIN { doc["xvasprintf"] = "\ Do not use xvasprintf(), instead use xstrvprintf" - fix("xvasprintf", "gdb/defs.h", 1) - fix("xvasprintf", "gdb/utils.c", 1) + fix("xvasprintf", "common/common-utils.h", 1) + fix("xvasprintf", "common/common-utils.c", 1) category["xvasprintf"] = ari_regression } /(^|[^_[:alnum:]])xvasprintf[[:space:]]*\(/ { @@ -1244,7 +1244,8 @@ Replace var_boolean with add_setshow_boolean_cmd" fix("var_boolean", "cli/cli-decode.c", 2) } /(^|[^_[:alnum:]])var_boolean([^_[:alnum:]]|$)/ { - if ($0 !~ /(^|[^_[:alnum:]])case *var_boolean:/) { + if (($0 !~ /(^|[^_[:alnum:]])case *var_boolean:/) \ + && ($0 !~ /(^|[^_[:alnum:]])[=!]= *var_boolean/)) { fail("var_boolean") } } diff --git a/gdb/contrib/ari/gdb_find.sh b/gdb/contrib/ari/gdb_find.sh index 9e4b67f..4bd67d2 100644 --- a/gdb/contrib/ari/gdb_find.sh +++ b/gdb/contrib/ari/gdb_find.sh @@ -32,6 +32,7 @@ LC_ALL=C ; export LC_ALL find "$@" \ -name testsuite -prune -o \ -name gdbserver -prune -o \ + -name gdbtk -prune -o \ -name gnulib -prune -o \ -name osf-share -prune -o \ -name '*-stub.c' -prune -o \ |