libtool-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Ensure cwrapper compiles without warnings under -std=c99.


From: Ralf Wildenhues
Subject: Re: [PATCH] Ensure cwrapper compiles without warnings under -std=c99.
Date: Tue, 6 May 2008 20:10:04 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Hi Charles,

In addition to Eric's review, here's some extremely picky nits:

* Charles Wilson wrote on Tue, May 06, 2008 at 02:23:05AM CEST:
> 2008-05-05  Charles Wilson  <...>
> 
>       Ensure cwrapper compiles without warnings under -std=c99.
>       * libltdl/config/ltmain.m4sh (func_emit_wrapper_part1):
>       new function.
>       (func_emit_wrapper_part2): new function.
>       (func_emit_wrapper): delegate to new functions.
>       (func_emit_cwrapperexe_src) [__CYGWIN__ && __STRICT_ANSI__]:
>       ensure realpath is declared.
>       (func_emit_cwrapperexe_src): declare two different strings
>       to each hold part of the wrapper script content. Initialize
>       using new func_emit_wrapper_partX functions.
>       (func_emit_cwrapperexe_src) [main]: when emitting wrapper
>       script content, use both strings.
>       Reported by Yaakov Selkowitz.

> --- a/libltdl/config/ltmain.m4sh
> +++ b/libltdl/config/ltmain.m4sh
> @@ -2249,9 +2249,9 @@ func_extract_archives ()
>  
>  
>  
> -# func_emit_wrapper arg
> +# func_emit_wrapper_part1 arg
>  #
> -# emit a libtool wrapper script on stdout
> +# emit the first part of 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
>  # wrapper executable.  Must ONLY be called from within
> @@ -2263,11 +2263,11 @@ func_extract_archives ()
>  # will assume that the directory in which it is stored is
>  # the '.lib' directory.  This is a cygwin/mingw-specific

Isn't that .libs/_libs aka $objdir here?  This is not new here, but
further below.

>  # behavior.
> -func_emit_wrapper ()
> +func_emit_wrapper_part1 ()
>  {
> -     func_emit_wrapper_arg1=no
> +     func_emit_wrapper_part1_arg1=no
>       if test -n "$1" ; then
> -       func_emit_wrapper_arg1=$1
> +       func_emit_wrapper_part1_arg1=$1
>       fi
>  
>       $ECHO "\
> @@ -2352,10 +2352,36 @@ else
>      file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
>      file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
>    done
> +"
> +}
> +# end: func_emit_wrapper_part1
> +
> +# func_emit_wrapper_part2 arg
> +#
> +# emit the second part of a libtool wrapper script on stdout

Capitalization, period at end of the sentence.

> +# don't directly open a file because we may want to
> +# 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.
> +#
> +# arg is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR

Please refer to arguments in all caps: ARG (as is done elsewhere).

> +# variable will take.  If 'yes', then the emitted script
> +# will assume that the directory in which it is stored is
> +# the '.lib' directory.  This is a cygwin/mingw-specific

See above (.libs).

> +# behavior.
> +func_emit_wrapper_part2 ()
> +{
> +     func_emit_wrapper_part2_arg1=no
> +     if test -n "$1" ; then
> +       func_emit_wrapper_part2_arg1=$1
> +     fi
> +
> +     $ECHO "\
>  
>    # Usually 'no', except on cygwin/mingw when embedded into
>    # the cwrapper.
> -  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
> +  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
>    if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
>      # special case for '.'
>      if test \"\$thisdir\" = \".\"; then
> @@ -2472,7 +2498,36 @@ else
>  fi\
>  "
>  }
> -# end: func_emit_wrapper
> +# end: func_emit_wrapper_part2
> +
> +
> +# func_emit_wrapper arg
> +#
> +# 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
> +# wrapper executable.  Must ONLY be called from within
> +# func_mode_link because it depends on a number of variable
> +# set therein.
> +#
> +# arg is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR

See above (all caps).

> +# variable will take.  If 'yes', then the emitted script
> +# will assume that the directory in which it is stored is
> +# the '.lib' directory.  This is a cygwin/mingw-specific

See above (.libs).  I wonder whether this needs to be repeated.

> +# behavior.
> +func_emit_wrapper ()
> +{
> +     func_emit_wrapper_arg1=no
> +     if test -n "$1" ; then
> +       func_emit_wrapper_arg1=$1
> +     fi
> +
> +     # split this up so that func_emit_cwrapperexe_src
> +     # can call each part independently.
> +     func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
> +     func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
> +}
> +




reply via email to

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