diff options
author | Gary V. Vaughan <gary@gnu.org> | 2011-10-25 09:34:11 +0700 |
---|---|---|
committer | Gary V. Vaughan <gary@gnu.org> | 2011-11-17 19:22:14 +0700 |
commit | e628dd85c18f06d0e0c85a9459410341e8502701 (patch) | |
tree | 030448488d5f545c9d3e9eda6fb83eb6de1c12e8 | |
parent | 42c96694c18cec1eefdf622a94fbef3fa3499ea1 (diff) | |
download | libtool-e628dd85c18f06d0e0c85a9459410341e8502701.tar.gz |
syntax-check: fix violations and re-enable sc_space_tab.
* cfg.mk (local-checks-to-fix): Remove sc_space_tab from list of
disabled checks.
(exclude_file_name_regexp--sc_space_tab): Don't flag space-tab
sequences in diff files as an error.
* Makefile.am, build-aux/general.m4sh, build-aux/git-hooks/commit-msg,
build-aux/ltmain.m4sh, libltdl/loaders/dyld.c,
libltdl/loaders/shl_load.c, libltdl/ltdl.h, libltdl/ltdl.mk,
libltdl/slist.c, libtoolize.m4sh, m4/ltoptions.m4, tests/demo/dlmain.c,
tests/depdemo/main.c, tests/libtoolize.at, tests/lt_dladvise.at,
tests/pdemo/longer_file_name_dlmain.c, tests/sh.test, tests/static.at,
tests/stresstest.at, tests/template.at: Fix space-tab sequences by
reversing them in regexps, and deleting leading spaces in indentation.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | build-aux/general.m4sh | 2 | ||||
-rwxr-xr-x | build-aux/git-hooks/commit-msg | 2 | ||||
-rw-r--r-- | build-aux/ltmain.m4sh | 2 | ||||
-rw-r--r-- | cfg.mk | 2 | ||||
-rw-r--r-- | libltdl/loaders/dyld.c | 4 | ||||
-rw-r--r-- | libltdl/loaders/shl_load.c | 8 | ||||
-rw-r--r-- | libltdl/ltdl.h | 2 | ||||
-rw-r--r-- | libltdl/ltdl.mk | 2 | ||||
-rw-r--r-- | libltdl/slist.c | 2 | ||||
-rw-r--r-- | libtoolize.m4sh | 2 | ||||
-rw-r--r-- | m4/ltoptions.m4 | 2 | ||||
-rw-r--r-- | tests/demo/dlmain.c | 6 | ||||
-rw-r--r-- | tests/depdemo/main.c | 2 | ||||
-rw-r--r-- | tests/libtoolize.at | 2 | ||||
-rw-r--r-- | tests/lt_dladvise.at | 2 | ||||
-rw-r--r-- | tests/pdemo/longer_file_name_dlmain.c | 6 | ||||
-rwxr-xr-x | tests/sh.test | 20 | ||||
-rw-r--r-- | tests/static.at | 4 | ||||
-rw-r--r-- | tests/stresstest.at | 4 | ||||
-rw-r--r-- | tests/template.at | 12 |
21 files changed, 45 insertions, 45 deletions
diff --git a/Makefile.am b/Makefile.am index e8f85c4c..07473dde 100644 --- a/Makefile.am +++ b/Makefile.am @@ -580,7 +580,7 @@ $(readme): FORCE $(SHELL) $(edit_readme_alpha) '$@'; \ fi -git_commit_count = git log --pretty=oneline |wc -l |$(SED) 's,[ ],,g' +git_commit_count = git log --pretty=oneline |wc -l |$(SED) 's,[ ],,g' dist-hook: $(changelog) $(dotversion) $(readme) ## Arrange so that .tarball-version appears only in the distribution diff --git a/build-aux/general.m4sh b/build-aux/general.m4sh index 34940f7a..44eccecd 100644 --- a/build-aux/general.m4sh +++ b/build-aux/general.m4sh @@ -68,7 +68,7 @@ exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' -IFS=" $lt_nl" +IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg index 620ee77f..f6e80516 100755 --- a/build-aux/git-hooks/commit-msg +++ b/build-aux/git-hooks/commit-msg @@ -79,7 +79,7 @@ fn_check_msg () # Flag duplicated Copyright-paperwork-exempt lines. count=`grep "$CPR_re" "$log_file" 2>/dev/null \ - |wc |sed -e 's,^[ ]*,,;s,[ ].*$,,'` + |wc |sed -e 's,^[ ]*,,;s,[ ].*$,,'` test 2 -gt "$count" || { $ECHO 'More than one Copyright-paperwork-exempt line.' diff --git a/build-aux/ltmain.m4sh b/build-aux/ltmain.m4sh index c4691ed1..bfaefe38 100644 --- a/build-aux/ltmain.m4sh +++ b/build-aux/ltmain.m4sh @@ -349,7 +349,7 @@ dnl SHORT LONG DEFAULT INIT dnl ---------------------------------------------------------------------- M4SH_GETOPTS( [n], [--dry-run|--dryrun], [], [], - [], [--config], [], [ + [], [--config], [], [ func_config], [;], [--dlopen|-dlopen], [], [], [], [--preserve-dup-deps], [], [], @@ -42,7 +42,6 @@ local-checks-to-fix = \ sc_prohibit_always_true_header_tests \ sc_require_config_h \ sc_require_config_h_first \ - sc_space_tab \ sc_trailing_blank \ sc_useless_cpp_parens @@ -68,3 +67,4 @@ exclude_file_name_regexp--sc_prohibit_strcmp = \ ^(doc/libtool.texi|tests/.*demo/.*\.c)$$ exclude_file_name_regexp--sc_prohibit_test_minus_ao = \ ^m4/libtool.m4$$ +exclude_file_name_regexp--sc_space_tab = \.diff$$ diff --git a/libltdl/loaders/dyld.c b/libltdl/loaders/dyld.c index b139d6c4..4f7a4338 100644 --- a/libltdl/loaders/dyld.c +++ b/libltdl/loaders/dyld.c @@ -240,8 +240,8 @@ vm_open (lt_user_data loader_data, const char *filename, { case NSObjectFileImageSuccess: module = NSLinkModule (ofi, filename, NSLINKMODULE_OPTION_RETURN_ON_ERROR - | NSLINKMODULE_OPTION_PRIVATE - | NSLINKMODULE_OPTION_BINDNOW); + | NSLINKMODULE_OPTION_PRIVATE + | NSLINKMODULE_OPTION_BINDNOW); NSDestroyObjectFileImage (ofi); if (module) diff --git a/libltdl/loaders/shl_load.c b/libltdl/loaders/shl_load.c index 5a09d872..8a45ee00 100644 --- a/libltdl/loaders/shl_load.c +++ b/libltdl/loaders/shl_load.c @@ -103,11 +103,11 @@ get_vtable (lt_user_data loader_data) * * Optionally: * BIND_FIRST - Place the library at the head of the symbol search - * order. + * order. * BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all - * unsatisfied symbols as fatal. This flag allows - * binding of unsatisfied code symbols to be deferred - * until use. + * unsatisfied symbols as fatal. This flag allows + * binding of unsatisfied code symbols to be deferred + * until use. * [Perl: For certain libraries, like DCE, deferred * binding often causes run time problems. Adding * BIND_NONFATAL to BIND_IMMEDIATE still allows diff --git a/libltdl/ltdl.h b/libltdl/ltdl.h index 749a54d6..824f2011 100644 --- a/libltdl/ltdl.h +++ b/libltdl/ltdl.h @@ -57,7 +57,7 @@ LT_SCOPE int lt_dlexit (void); LT_SCOPE int lt_dladdsearchdir (const char *search_dir); LT_SCOPE int lt_dlinsertsearchdir (const char *before, const char *search_dir); -LT_SCOPE int lt_dlsetsearchpath (const char *search_path); +LT_SCOPE int lt_dlsetsearchpath (const char *search_path); LT_SCOPE const char *lt_dlgetsearchpath (void); LT_SCOPE int lt_dlforeachfile ( const char *search_path, diff --git a/libltdl/ltdl.mk b/libltdl/ltdl.mk index bc31f62c..dd3fc622 100644 --- a/libltdl/ltdl.mk +++ b/libltdl/ltdl.mk @@ -97,7 +97,7 @@ EXTRA_LTLIBRARIES += libltdl/dlopen.la \ libltdl_dlopen_la_SOURCES = libltdl/loaders/dlopen.c libltdl_dlopen_la_LDFLAGS = -module -avoid-version -libltdl_dlopen_la_LIBADD = $(LIBADD_DLOPEN) +libltdl_dlopen_la_LIBADD = $(LIBADD_DLOPEN) libltdl_dld_link_la_SOURCES = libltdl/loaders/dld_link.c libltdl_dld_link_la_LDFLAGS = -module -avoid-version diff --git a/libltdl/slist.c b/libltdl/slist.c index 5c2e9e19..189c2c36 100644 --- a/libltdl/slist.c +++ b/libltdl/slist.c @@ -229,7 +229,7 @@ slist_reverse (SList *slist) next = slist->next; slist->next = result; result = slist; - slist = next; + slist = next; } return result; diff --git a/libtoolize.m4sh b/libtoolize.m4sh index 81349d0f..e3374618 100644 --- a/libtoolize.m4sh +++ b/libtoolize.m4sh @@ -86,7 +86,7 @@ M4SH_VERBATIM([[ --debug|--no-warn|--quiet|--verbose) envopts="${envopts+$envopts }$opt" ;; --*) env_warning="${env_warning+$env_warning -}unrecognized environment option \`$opt'" ;; +}unrecognized environment option \`$opt'" ;; *) func_fatal_help "garbled LIBTOOLIZE_OPTIONS near \`$opt'" ;; esac done diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4 index 5d9acd8e..301b0a35 100644 --- a/m4/ltoptions.m4 +++ b/m4/ltoptions.m4 @@ -81,7 +81,7 @@ m4_if([$1],[LT_INIT],[ _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) + [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS diff --git a/tests/demo/dlmain.c b/tests/demo/dlmain.c index 8c8be09e..495ae7cb 100644 --- a/tests/demo/dlmain.c +++ b/tests/demo/dlmain.c @@ -54,13 +54,13 @@ main () const char *name = s->name; printf ("found symbol: %s\n", name); if (!strcmp ("hello", name)) - phello = (int(*)())s->address; + phello = (int(*)())s->address; else if (!strcmp ("foo", name)) - pfoo = (int(*)())s->address; + pfoo = (int(*)())s->address; else if (!strcmp ("nothing", name)) #ifndef _WIN32 /* In an ideal world we could do this... */ - pnothing = (int*)s->address; + pnothing = (int*)s->address; #else /* !_WIN32 */ /* In an ideal world a shared lib would be able to export data */ pnothing = (int*)¬hing; diff --git a/tests/depdemo/main.c b/tests/depdemo/main.c index c4569b31..73e4db08 100644 --- a/tests/depdemo/main.c +++ b/tests/depdemo/main.c @@ -42,7 +42,7 @@ main (int argc, char **argv) if (var_l1 + var_l2 + var_l4 != 20) { printf("var_l1(%d) + var_l2(%d) + var_l4(%d) != 20\n",var_l1,var_l2,var_l4); - return 1; + return 1; } return 0; } diff --git a/tests/libtoolize.at b/tests/libtoolize.at index 030ece79..70ba9410 100644 --- a/tests/libtoolize.at +++ b/tests/libtoolize.at @@ -713,7 +713,7 @@ func_serial () my_filename="$1" my_macro_regex="$2" my_sed_serial=' - /^# serial [1-9][0-9.]*[ ]*'"$my_macro_regex"'[ ]*$/ { + /^# serial [1-9][0-9.]*[ ]*'"$my_macro_regex"'[ ]*$/ { s,^# serial \([1-9][0-9.]*\).*$,\1, q } diff --git a/tests/lt_dladvise.at b/tests/lt_dladvise.at index 5ae9fbd9..48cf5e96 100644 --- a/tests/lt_dladvise.at +++ b/tests/lt_dladvise.at @@ -174,7 +174,7 @@ hint_global (void) /* Don't attempt to load moddepend unless modglobal was successfully loaded and the symglobal hint was taken, and the system allows to - have undefined symbols. */ + have undefined symbols. */ if (info && info->is_symglobal && HAVE_UNDEFINED_SYMBOLS) { hint_ext (); diff --git a/tests/pdemo/longer_file_name_dlmain.c b/tests/pdemo/longer_file_name_dlmain.c index ad223dce..73caa78d 100644 --- a/tests/pdemo/longer_file_name_dlmain.c +++ b/tests/pdemo/longer_file_name_dlmain.c @@ -54,13 +54,13 @@ main (int argc, char **argv) const char *name = s->name; printf ("found symbol: %s\n", name); if (!strcmp ("hello", name)) - phello = (int(*)())s->address; + phello = (int(*)())s->address; else if (!strcmp ("foo", name)) - pfoo = (int(*)())s->address; + pfoo = (int(*)())s->address; else if (!strcmp ("nothing", name)) #ifndef _WIN32 /* In an ideal world we could do this... */ - pnothing = (int*)s->address; + pnothing = (int*)s->address; #else /* !_WIN32 */ /* In an ideal world a shared lib would be able to export data */ pnothing = (int*)¬hing; diff --git a/tests/sh.test b/tests/sh.test index 3382dad3..5c6d675d 100755 --- a/tests/sh.test +++ b/tests/sh.test @@ -31,37 +31,37 @@ status=$EXIT_SUCCESS # Check for bad binary operators. -if $EGREP -n -e 'if[ ]+["'\'']?\$[^ ]+[ ]+(=|-[lg][te]|-eq|-ne)' $scripts; then +if $EGREP -n -e 'if[ ]+["'\'']?\$[^ ]+[ ]+(=|-[lg][te]|-eq|-ne)' $scripts; then echo "use \`if test \$something =' instead of \`if \$something ='" status=$EXIT_FAILURE fi # Check for bad unary operators. -if $EGREP -n -e 'if[ ]+-' $scripts; then +if $EGREP -n -e 'if[ ]+-' $scripts; then echo "use \`if test -X' instead of \`if -X'" status=$EXIT_FAILURE fi # Check for using `[' instead of `test'. -if $EGREP -n -e 'if[ ]+\[' $scripts; then +if $EGREP -n -e 'if[ ]+\[' $scripts; then echo "use \`if test' instead of \`if ['" status=$EXIT_FAILURE fi # Check for using test X... instead of test "X... -if $EGREP -n -e 'test[ ]+(![ ])?(-.[ ]+)?X' $scripts; then +if $EGREP -n -e 'test[ ]+(![ ])?(-.[ ]+)?X' $scripts; then echo "use \`test \"X...\"' instead of \`test X'" status=$EXIT_FAILURE fi # Check for using test $... instead of test "$... -if $EGREP -n -e 'test[ ]+(![ ])?(-.[ ]+)?X?\$' $scripts; then +if $EGREP -n -e 'test[ ]+(![ ])?(-.[ ]+)?X?\$' $scripts; then echo "use \`test \"\$...\"' instead of \`test \$'" status=$EXIT_FAILURE fi # Never use test -e. -if $EGREP -n -e 'test[ ]+(![ ])?-e' $scripts; then +if $EGREP -n -e 'test[ ]+(![ ])?-e' $scripts; then echo "use \`test -f' instead of \`test -e'" status=$EXIT_FAILURE fi @@ -80,7 +80,7 @@ if $EGREP -n -e '"[^`"]*`[^"`]*"[^"`]*".*`[^`"]*"' $scripts | \ fi # Check for using set -- instead of set dummy -if $EGREP -n -e 'set[ ]+--[ ]+' $scripts; then +if $EGREP -n -e 'set[ ]+--[ ]+' $scripts; then echo "use \`set dummy ...' instead of \`set -- ...'" status=$EXIT_FAILURE fi @@ -89,7 +89,7 @@ fi for s in $scripts do if $SED -n ' - /set[ ][ ]*dummy/{ + /set[ ][ ]*dummy/{ /set.*dummy.*;.*shift/d N /\n.*shift/D @@ -107,7 +107,7 @@ do if $SED -n ' /^func_.*(/{ N - /^func_[^ ]* ()\n{$/d + /^func_[^ ]* ()\n{$/d p }' "$s" 2>&1 | $EGREP .; then echo "Function definitions should look like this in $s: @@ -124,7 +124,7 @@ done for s in "$abs_macro_dir/libtool.m4" do if $SED -n '/case \$cc_basename in/,/esac/ { - /^[ ]*[a-zA-Z][a-zA-Z0-9+]*[^*][ ]*)/p + /^[ ]*[a-zA-Z][a-zA-Z0-9+]*[^*][ ]*)/p }' $s 2>&1 | $EGREP .; then echo "\$cc_basename matches should include a trailing \`*' in $s." status=$EXIT_FAILURE diff --git a/tests/static.at b/tests/static.at index dfa4c42c..6072d772 100644 --- a/tests/static.at +++ b/tests/static.at @@ -301,8 +301,8 @@ for withdep in no yes; do [0], [ignore], [ignore]) dnl # This usually fails. So don't do it. dnl AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m123b$EXEEXT m.$OBJEXT \ - dnl -L$libdir1 -Bstatic -la1 a2/liba2.la -L$libdir3 -la3], - dnl [0], [ignore], [ignore]) + dnl -L$libdir1 -Bstatic -la1 a2/liba2.la -L$libdir3 -la3], + dnl [0], [ignore], [ignore]) fi ### install the programs. diff --git a/tests/stresstest.at b/tests/stresstest.at index 9568d498..c9caee2d 100644 --- a/tests/stresstest.at +++ b/tests/stresstest.at @@ -273,12 +273,12 @@ do esac LT_AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"main$EXEEXT "$rel"main$mst.lo "$rel"sub2/liba.la], - [0],[ignore],[ignore]) + [0],[ignore],[ignore]) LT_AT_EXEC_CHECK([./main],[0]) for l10 in '' '-export-symbols dlselfsyms' do LT_AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"sub3/dlself$EXEEXT "$rel"sub3/dlself$mst.lo "$rel"sub2/liba.la sub/b.lo -dlopen self $l10], - [0],[ignore],[ignore]) + [0],[ignore],[ignore]) LT_AT_EXEC_CHECK([./sub3/dlself],[0]) done done diff --git a/tests/template.at b/tests/template.at index 1729778d..74e1cfd9 100644 --- a/tests/template.at +++ b/tests/template.at @@ -218,12 +218,12 @@ case $compiler_c_o in yes) main_o=sub/main.$OBJEXT AT_CHECK([$CXX $CPPFLAGS $CXXFLAGS -c -o $main_o ../src/sub/main.cpp], - [0], [ignore], [ignore]) + [0], [ignore], [ignore]) ;; *) main_o=main.$OBJEXT AT_CHECK([$CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp], - [0], [ignore], [ignore]) + [0], [ignore], [ignore]) ;; esac @@ -270,17 +270,17 @@ LT_AT_EXEC_CHECK([./sub/main]) if $noskip; then AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo], - [0], [ignore], [ignore]) + [0], [ignore], [ignore]) AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la], - [0], [ignore], [ignore]) + [0], [ignore], [ignore]) LT_AT_EXEC_CHECK([./sub/main]) fi # both installed if $noskip; then AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar], - [0], [ignore], [ignore]) + [0], [ignore], [ignore]) AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la], - [0], [ignore], [ignore]) + [0], [ignore], [ignore]) LT_AT_EXEC_CHECK([./sub/main]) fi |