]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
syntax-check: fix violations and re-enable sc_space_tab.
authorGary V. Vaughan <gary@gnu.org>
Tue, 25 Oct 2011 02:34:11 +0000 (09:34 +0700)
committerGary V. Vaughan <gary@gnu.org>
Thu, 17 Nov 2011 12:22:14 +0000 (19:22 +0700)
* 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>
21 files changed:
Makefile.am
build-aux/general.m4sh
build-aux/git-hooks/commit-msg
build-aux/ltmain.m4sh
cfg.mk
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

index e8f85c4ca23088ed46cc0584000d5764c8f5a087..07473ddeafe1170598daf073f0d877a28db55150 100644 (file)
@@ -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
index 34940f7a8994566686861ec20ecc4abf6c79c528..44eccecdb76802da51122d1fb567d3f944482c46 100644 (file)
@@ -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,^.*/,,"
index 620ee77faa7084d15e46e0809085a87fda7ef1ac..f6e80516bc173de5b86a0b7aea4116c56cc76524 100755 (executable)
@@ -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.'
index c4691ed14bdd8b36729f4938f3044ef37fe5a4d1..bfaefe38b28ca76744500fb673e707f747f37bb1 100644 (file)
@@ -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],          [],                     [],
diff --git a/cfg.mk b/cfg.mk
index 8cb32790e2bbbcb9a5199762eb7a425d99fa4e5a..6ae49548c90415060cde266d48581c5f189f2ba5 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -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$$
index b139d6c46f0b0c88d49c4e706dc2ac03308d81ca..4f7a4338c36ea9b4ef734c9e6b72378ff5a962f0 100644 (file)
@@ -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)
index 5a09d87244f6e4d625f06ab3ce5466ae5af42e06..8a45ee00f9ad5d45332971a55cf63c1bd99f8b7f 100644 (file)
@@ -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
index 749a54d682bac9d4ba5fd8702c583ce1196698b9..824f2011f2f4c40c226044128320ff3cdb672d76 100644 (file)
@@ -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,
index bc31f62c1fd80dc5b654a2fa1d40d4b1b7cf66d6..dd3fc6225b113dbc3222a5682321c65c78e1c114 100644 (file)
@@ -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
index 5c2e9e1905bfefc3e667754eddde646c2ad50434..189c2c36159842586d7dabe044bafec0b6f442b1 100644 (file)
@@ -229,7 +229,7 @@ slist_reverse (SList *slist)
       next             = slist->next;
       slist->next      = result;
       result           = slist;
-      slist            = next;
+      slist            = next;
     }
 
   return result;
index 81349d0f0b45a896e4398b11aa2ef4e07152c11c..e33746185edd73403aa2edb9342f46cfe61c5729 100644 (file)
@@ -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
index 5d9acd8e23bcfd20d353804aff13666ecbed54f4..301b0a350e7003830c7f48a638ca2e55d72e37de 100644 (file)
@@ -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
 
index 8c8be09e75f85b5c412b009af611e66d4f442263..495ae7cb0c28033308077274200392cc66231bc2 100644 (file)
@@ -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*)&nothing;
index c4569b31969f815ad6cf522580037da969133855..73e4db08fb1b5d48e7b7f39713e1ea601ea9b696 100644 (file)
@@ -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;
 }
index 030ece79a8a71e648340396df9ef246730153261..70ba94101937370a028edb110643503ab9f1f094 100644 (file)
@@ -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
        }
index 5ae9fbd990373637cdc5c6393c56313e45d48ab4..48cf5e9616c4c79244c68dde5fc172badf011a0d 100644 (file)
@@ -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 ();
index ad223dcec72f9a1798aa6819a6e377efd24eface..73caa78d14929fcb94caa72455396dbac8ee1408 100644 (file)
@@ -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*)&nothing;
index 3382dad3bc74aee5bb42b8e654088f6d4ce96623..5c6d675de14272c5b61484859fa3c533548c869f 100755 (executable)
 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
index dfa4c42c2ad94de0db8033b2753dd95aae3404b1..6072d772cbd42732da853191b154c1f5d42fc7f4 100644 (file)
@@ -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.
index 9568d498cf1df5ef0c05497802f4614a41547962..c9caee2d73b1fbeee7f4328282bc022a1b1e9e10 100644 (file)
@@ -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
index 1729778d41e3fe51c88570d664ac479956e417c5..74e1cfd9f18405728a6a292a310098e48efd5ab2 100644 (file)
@@ -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