From: Charles Wilson Date: Sat, 3 Jan 2009 06:56:54 +0000 (-0500) Subject: [cygwin|mingw] Fix compile warnings when -std=c89. X-Git-Tag: v2.2.7b~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e13769215fd36bf40104fbf73b0c77fb3bd6dd8;p=thirdparty%2Flibtool.git [cygwin|mingw] Fix compile warnings when -std=c89. * libltdl/config/ltmain.m4sh (func_emit_wrapper_part1): move contents to... (func_emit_wrapper_part2): move contents to... (func_emit_wrapper): here. (func_emit_cwrapperexe_src) [file scope]: Remove variables script_text_part1 and script_text_part2. (func_emit_cwrapperexe_src) [lt_dump_script]: New function. (func_emit_cwrapperexe_src) [main]: Call it. --- diff --git a/ChangeLog b/ChangeLog index b70290756..8d83a7bb3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2009-01-21 Charles Wilson + + [cygwin|mingw] Fix compile warnings when -std=c89. + * libltdl/config/ltmain.m4sh (func_emit_wrapper_part1): + move contents to... + (func_emit_wrapper_part2): move contents to... + (func_emit_wrapper): here. + (func_emit_cwrapperexe_src) [file scope]: Remove + variables script_text_part1 and script_text_part2. + (func_emit_cwrapperexe_src) [lt_dump_script]: New function. + (func_emit_cwrapperexe_src) [main]: Call it. + 2009-01-21 Charles Wilson Minor cygwin cleanup diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index 760f64779..3f1a30ca8 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -2308,15 +2308,23 @@ func_extract_archives () } - -# func_emit_wrapper_part1 [arg=no] +# func_emit_wrapper [arg=no] # -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () +# 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 variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () { - func_emit_wrapper_part1_arg1=${1-no} + func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL @@ -2397,24 +2405,10 @@ _LTECHO_EOF' file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done -" -} -# end: func_emit_wrapper_part1 - -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=${1-no} - - $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then @@ -2531,30 +2525,6 @@ func_emit_wrapper_part2 () fi\ " } -# end: func_emit_wrapper_part2 - - -# func_emit_wrapper [arg=no] -# -# 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 variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 ${1-no} - func_emit_wrapper_part2 ${1-no} -} # func_to_host_path arg @@ -2875,22 +2845,8 @@ int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); - -static const char *script_text_part1 = -EOF - - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - cat <