libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unused variable in chase_symlinks


From: Eric Blake
Subject: Re: unused variable in chase_symlinks
Date: Mon, 23 Jul 2007 06:24:03 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5) Gecko/20070716 Thunderbird/2.0.0.5 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 7/22/2007 9:06 PM:
> According to Charles Wilson on 7/22/2007 8:57 PM:
>> Well, be very careful in func_emit_cwrapperexe_src(). I worked hard to
>> ensure the emitted C code obeys GNU Coding Standards, and I'd hate to
>> see that destroyed because Emacs' rules on formatting differ for "shell"
>> code.
> 
> All I would be doing is killing trailing spaces, and turning space-tab
> into tab-space (inside sed regexes) or plain tab (if leading indentation),
> which should not affect GNU Coding Standard compliance.  But yes, I'll be
> careful, and post what I do.

Here's what I'm committing.  I verified that diff -b shows no change, and
I am also attaching the results filtered through cat -A to make the change
obvious.

2007-07-23  Eric Blake  <address@hidden>

        * libltdl/config/ltmain.m4sh: Whitespace cleanup.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGpJ3i84KuGfSFAYARAidHAKDHaQTlSSZi+HG/JBCf8IJYuB+OYgCfXIld
g3DVzavnnZSaqE+DtFcrOUs=
=UHan
-----END PGP SIGNATURE-----
Index: libltdl/config/ltmain.m4sh
===================================================================
RCS file: /sources/libtool/libtool/libltdl/config/ltmain.m4sh,v
retrieving revision 1.87
diff -u -p -r1.87 ltmain.m4sh
--- libltdl/config/ltmain.m4sh  23 Jul 2007 12:10:31 -0000      1.87
+++ libltdl/config/ltmain.m4sh  23 Jul 2007 12:13:59 -0000
@@ -466,11 +466,11 @@ Otherwise, only FILE itself is deleted u
     shift
 
     case $opt in
-      --config)                func_config                                     
;;
+      --config)                func_config                                     
;;
 
       --debug)         preserve_args="$preserve_args $opt"
-                       func_echo "enabling shell trace mode"
-                       opt_debug='set -x'
+                       func_echo "enabling shell trace mode"
+                       opt_debug='set -x'
                        $opt_debug
                        ;;
 
@@ -484,7 +484,7 @@ Otherwise, only FILE itself is deleted u
       --finish)                mode="finish"                                   
;;
 
       --mode)          test "$#" -eq 0 && func_missing_arg "$opt" && break
-                       case $1 in
+                       case $1 in
                          # Valid mode arguments:
                          clean)        ;;
                          compile)      ;;
@@ -502,19 +502,19 @@ Otherwise, only FILE itself is deleted u
                             ;;
                        esac
 
-                       mode="$1"
+                       mode="$1"
                        shift
                        ;;
 
       --preserve-dup-deps)
-                       opt_duplicate_deps=:                            ;;
+                       opt_duplicate_deps=:                            ;;
 
       --quiet|--silent)        preserve_args="$preserve_args $opt"
-                       opt_silent=:
+                       opt_silent=:
                        ;;
 
       --verbose| -v)   preserve_args="$preserve_args $opt"
-                       opt_silent=false
+                       opt_silent=false
                        ;;
 
       --tag)           test "$#" -eq 0 && func_missing_arg "$opt" && break
@@ -537,7 +537,7 @@ Otherwise, only FILE itself is deleted u
       -*)              func_fatal_help "unrecognized option \`$opt'"   ;;
 
       *)               nonopt="$opt"
-                       break
+                       break
                        ;;
     esac
   done
@@ -1040,7 +1040,7 @@ static const void *lt_preloaded_setup() 
 "
        } # !$opt_dry_run
 
-       pic_flag_for_symtable=
+       pic_flag_for_symtable=
        case "$compile_command " in
        *" -static "*) ;;
        *)
@@ -1415,7 +1415,7 @@ func_mode_compile ()
 
     func_quote_for_eval "$libobj"
     test "X$libobj" != "X$func_quote_for_eval_result" \
-      && $ECHO "X$libobj" | $GREP '[@:>@~#^*{};<>?"'"'"'       &()|`$@<:@]' \
+      && $ECHO "X$libobj" | $GREP '[@:>@~#^*{};<>?"'"'"'        &()|`$@<:@]' \
       && func_warning "libobj name \`$libobj' may not contain shell special 
characters."
     func_dirname_and_basename "$obj" "/" ""
     objname="$func_basename_result"
@@ -1861,7 +1861,7 @@ func_mode_install ()
       case $arg in
       -d) isdir=yes ;;
       -f)
-       case " $install_prog " in
+       case " $install_prog " in
        *[\\\ /]cp\ *) ;;
        *) prev=$arg ;;
        esac
@@ -2261,7 +2261,7 @@ test "$mode" = install && func_mode_inst
 #
 # emit a libtool wrapper script on stdout
 # don't directly open a file because we may want to
-# incorporate the script contents within a cygwin/mingw 
+# incorporate the script contents within a cygwin/mingw
 # wrapper executable.  Must ONLY be called from within
 # func_mode_link because it depends on a number of variable
 # set therein.
@@ -2277,7 +2277,7 @@ func_emit_wrapper ()
        if test -n "$1" ; then
          func_emit_wrapper_arg1=$1
        fi
-         
+
        $ECHO "\
 #! $SHELL
 
@@ -2361,7 +2361,7 @@ else
     file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
   done
 
-  # Usually 'no', except on cygwin/mingw when embedded into 
+  # Usually 'no', except on cygwin/mingw when embedded into
   # the cwrapper.
   WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
   if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
@@ -2606,12 +2606,12 @@ int check_executable (const char *path);
 char *strendzap (char *str, const char *pat);
 void lt_fatal (const char *message, ...);
 
-static const char *script_text = 
+static const char *script_text =
 EOF
 
            func_emit_wrapper yes |
                $SED -e 's/\([\\"]\)/\\\1/g' \
-                    -e 's/^/  "/' -e 's/$/\\n"/' 
+                    -e 's/^/  "/' -e 's/$/\\n"/'
            echo ";"
 
            cat <<EOF
@@ -2629,7 +2629,7 @@ main (int argc, char *argv[])
 
   const char *dumpscript_opt = "--lt-dump-script";
   int i;
- 
+
   program_name = (char *) xstrdup (base_name (argv[0]));
   LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
   LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
@@ -2663,7 +2663,7 @@ EOF
                  ;;
                * ) lt_newargv0=$SHELL ;;
              esac
-           fi 
+           fi
 
                cat <<EOF
   newargz[0] = (char *) xstrdup ("$lt_newargv0");
@@ -2737,7 +2737,7 @@ EOF
   fclose (shwrapper);
 
   make_executable (newargz[1]);
-  
+
   for (i = 1; i < argc; i++)
     newargz[i + 1] = xstrdup (argv[i]);
   newargz[argc + 1] = NULL;
@@ -2757,7 +2757,7 @@ EOF
   if (rval == -1)
     {
       /* failed to start process */
-      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target 
\"$lt_newargv0\": errno = %d\n", errno)); 
+      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target 
\"$lt_newargv0\": errno = %d\n", errno));
       return 127;
     }
   return rval;
@@ -2996,7 +2996,7 @@ chase_symlinks (const char *pathspec)
   if (!has_symlinks)
     {
       return xstrdup (pathspec);
-    } 
+    }
 
   tmp_pathspec = realpath (pathspec, buf);
   if (tmp_pathspec == 0)
@@ -3251,7 +3251,7 @@ func_mode_link ()
                   ;;
              esac
              ;;
-         esac
+         esac
          prev=
          continue
          ;;
@@ -3389,7 +3389,7 @@ func_mode_link ()
          continue
          ;;
        shrext)
-         shrext_cmds="$arg"
+         shrext_cmds="$arg"
          prev=
          continue
          ;;
@@ -3761,7 +3761,7 @@ func_mode_link ()
        continue
        ;;
 
-      # -msg_* for osf cc 
+      # -msg_* for osf cc
       -msg_*)
        func_quote_for_eval "$arg"
        arg="$func_quote_for_eval_result"
@@ -5490,8 +5490,8 @@ func_mode_link ()
            ;;
          *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
            # Compiler inserts libc in the correct place for threads to work
-           ;;
-         *)
+           ;;
+         *)
            # Add libc to deplibs on all other systems if necessary.
            if test "$build_libtool_need_lc" = "yes"; then
              deplibs="$deplibs -lc"
@@ -5749,7 +5749,7 @@ EOF
              tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
            done
          fi
-         if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[     ]//g' |
+         if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[      ]//g' |
             $GREP . >/dev/null; then
            $ECHO
            if test "X$deplibs_check_method" = "Xnone"; then
Index: libltdl/config/ltmain.m4sh$
===================================================================$
RCS file: /sources/libtool/libtool/libltdl/config/ltmain.m4sh,v$
retrieving revision 1.87$
diff -u -p -r1.87 ltmain.m4sh$
--- libltdl/config/ltmain.m4sh^I23 Jul 2007 12:10:31 -0000^I1.87$
+++ libltdl/config/ltmain.m4sh^I23 Jul 2007 12:13:59 -0000$
@@ -466,11 +466,11 @@ Otherwise, only FILE itself is deleted u$
     shift$
 $
     case $opt in$
-      --config)^I^Ifunc_config ^I^I^I^I^I;;$
+      --config)^I^Ifunc_config^I^I^I^I^I;;$
 $
       --debug)^I^Ipreserve_args="$preserve_args $opt"$
-^I    ^I^Ifunc_echo "enabling shell trace mode"$
-^I    ^I^Iopt_debug='set -x'$
+^I^I^Ifunc_echo "enabling shell trace mode"$
+^I^I^Iopt_debug='set -x'$
 ^I^I^I$opt_debug$
 ^I^I^I;;$
 $
@@ -484,7 +484,7 @@ Otherwise, only FILE itself is deleted u$
       --finish)^I^Imode="finish"^I^I^I^I^I;;$
 $
       --mode)^I^Itest "$#" -eq 0 && func_missing_arg "$opt" && break$
-^I    ^I^Icase $1 in$
+^I^I^Icase $1 in$
 ^I^I^I  # Valid mode arguments:$
 ^I^I^I  clean)^I;;$
 ^I^I^I  compile)^I;;$
@@ -502,19 +502,19 @@ Otherwise, only FILE itself is deleted u$
 ^I^I^I     ;;$
 ^I^I        esac$
 $
-^I    ^I^Imode="$1"$
+^I^I^Imode="$1"$
 ^I^I^Ishift$
 ^I^I^I;;$
 $
       --preserve-dup-deps)$
-      ^I^I^Iopt_duplicate_deps=:^I^I^I^I;;$
+^I^I^Iopt_duplicate_deps=:^I^I^I^I;;$
 $
       --quiet|--silent)^Ipreserve_args="$preserve_args $opt"$
-^I    ^I^Iopt_silent=:$
+^I^I^Iopt_silent=:$
 ^I^I^I;;$
 $
       --verbose| -v)^Ipreserve_args="$preserve_args $opt"$
-^I    ^I^Iopt_silent=false$
+^I^I^Iopt_silent=false$
 ^I^I^I;;$
 $
       --tag)^I^Itest "$#" -eq 0 && func_missing_arg "$opt" && break$
@@ -537,7 +537,7 @@ Otherwise, only FILE itself is deleted u$
       -*)^I^Ifunc_fatal_help "unrecognized option \`$opt'"^I;;$
 $
       *)^I^Inonopt="$opt"$
-      ^I^I^Ibreak$
+^I^I^Ibreak$
 ^I^I^I;;$
     esac$
   done$
@@ -1040,7 +1040,7 @@ static const void *lt_preloaded_setup() $
 "$
 ^I} # !$opt_dry_run$
 $
-  ^Ipic_flag_for_symtable=$
+^Ipic_flag_for_symtable=$
 ^Icase "$compile_command " in$
 ^I*" -static "*) ;;$
 ^I*)$
@@ -1415,7 +1415,7 @@ func_mode_compile ()$
 $
     func_quote_for_eval "$libobj"$
     test "X$libobj" != "X$func_quote_for_eval_result" \$
-      && $ECHO "X$libobj" | $GREP '[@:>@~#^*{};<>?"'"'"' ^I&()|`$@<:@]' \$
+      && $ECHO "X$libobj" | $GREP '[@:>@~#^*{};<>?"'"'"'^I &()|`$@<:@]' \$
       && func_warning "libobj name \`$libobj' may not contain shell special 
characters."$
     func_dirname_and_basename "$obj" "/" ""$
     objname="$func_basename_result"$
@@ -1861,7 +1861,7 @@ func_mode_install ()$
       case $arg in$
       -d) isdir=yes ;;$
       -f)$
-      ^Icase " $install_prog " in$
+^Icase " $install_prog " in$
 ^I*[\\\ /]cp\ *) ;;$
 ^I*) prev=$arg ;;$
 ^Iesac$
@@ -2261,7 +2261,7 @@ test "$mode" = install && func_mode_inst$
 #$
 # emit a libtool wrapper script on stdout$
 # don't directly open a file because we may want to$
-# incorporate the script contents within a cygwin/mingw $
+# incorporate the script contents within a cygwin/mingw$
 # wrapper executable.  Must ONLY be called from within$
 # func_mode_link because it depends on a number of variable$
 # set therein.$
@@ -2277,7 +2277,7 @@ func_emit_wrapper ()$
 ^Iif test -n "$1" ; then$
 ^I  func_emit_wrapper_arg1=$1$
 ^Ifi$
-^I  $
+$
 ^I$ECHO "\$
 #! $SHELL$
 $
@@ -2361,7 +2361,7 @@ else$
     file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`$
   done$
 $
-  # Usually 'no', except on cygwin/mingw when embedded into $
+  # Usually 'no', except on cygwin/mingw when embedded into$
   # the cwrapper.$
   WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1$
   if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then$
@@ -2606,12 +2606,12 @@ int check_executable (const char *path);$
 char *strendzap (char *str, const char *pat);$
 void lt_fatal (const char *message, ...);$
 $
-static const char *script_text = $
+static const char *script_text =$
 EOF$
 $
 ^I    func_emit_wrapper yes |$
 ^I        $SED -e 's/\([\\"]\)/\\\1/g' \$
-^I             -e 's/^/  "/' -e 's/$/\\n"/' $
+^I             -e 's/^/  "/' -e 's/$/\\n"/'$
 ^I    echo ";"$
 $
 ^I    cat <<EOF$
@@ -2629,7 +2629,7 @@ main (int argc, char *argv[])$
 $
   const char *dumpscript_opt = "--lt-dump-script";$
   int i;$
- $
+$
   program_name = (char *) xstrdup (base_name (argv[0]));$
   LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));$
   LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));$
@@ -2663,7 +2663,7 @@ EOF$
 ^I^I  ;;$
 ^I^I* ) lt_newargv0=$SHELL ;;$
 ^I      esac$
-^I    fi $
+^I    fi$
 $
 ^I^Icat <<EOF$
   newargz[0] = (char *) xstrdup ("$lt_newargv0");$
@@ -2737,7 +2737,7 @@ EOF$
   fclose (shwrapper);$
 $
   make_executable (newargz[1]);$
-  $
+$
   for (i = 1; i < argc; i++)$
     newargz[i + 1] = xstrdup (argv[i]);$
   newargz[argc + 1] = NULL;$
@@ -2757,7 +2757,7 @@ EOF$
   if (rval == -1)$
     {$
       /* failed to start process */$
-      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target 
\"$lt_newargv0\": errno = %d\n", errno)); $
+      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target 
\"$lt_newargv0\": errno = %d\n", errno));$
       return 127;$
     }$
   return rval;$
@@ -2996,7 +2996,7 @@ chase_symlinks (const char *pathspec)$
   if (!has_symlinks)$
     {$
       return xstrdup (pathspec);$
-    } $
+    }$
 $
   tmp_pathspec = realpath (pathspec, buf);$
   if (tmp_pathspec == 0)$
@@ -3251,7 +3251,7 @@ func_mode_link ()$
 ^I^I   ;;$
 ^I      esac$
 ^I      ;;$
-   ^I  esac$
+^I  esac$
 ^I  prev=$
 ^I  continue$
 ^I  ;;$
@@ -3389,7 +3389,7 @@ func_mode_link ()$
 ^I  continue$
 ^I  ;;$
 ^Ishrext)$
-  ^I  shrext_cmds="$arg"$
+^I  shrext_cmds="$arg"$
 ^I  prev=$
 ^I  continue$
 ^I  ;;$
@@ -3761,7 +3761,7 @@ func_mode_link ()$
 ^Icontinue$
 ^I;;$
 $
-      # -msg_* for osf cc $
+      # -msg_* for osf cc$
       -msg_*)$
 ^Ifunc_quote_for_eval "$arg"$
 ^Iarg="$func_quote_for_eval_result"$
@@ -5490,8 +5490,8 @@ func_mode_link ()$
 ^I    ;;$
 ^I  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)$
 ^I    # Compiler inserts libc in the correct place for threads to work$
- ^I    ;;$
- ^I  *)$
+^I    ;;$
+^I  *)$
 ^I    # Add libc to deplibs on all other systems if necessary.$
 ^I    if test "$build_libtool_need_lc" = "yes"; then$
 ^I      deplibs="$deplibs -lc"$
@@ -5749,7 +5749,7 @@ EOF$
 ^I      tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`$
 ^I    done$
 ^I  fi$
-^I  if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ^I]//g' |$
+^I  if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[^I ]//g' |$
 ^I     $GREP . >/dev/null; then$
 ^I    $ECHO$
 ^I    if test "X$deplibs_check_method" = "Xnone"; then$

reply via email to

[Prev in Thread] Current Thread [Next in Thread]