diff options
author | Bruno Haible <bruno@clisp.org> | 2006-06-22 11:28:45 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:13:26 +0200 |
commit | 43fed6dd88958f3956e286f4fc6e5f24af746bf7 (patch) | |
tree | 5559d34f45e7d01680c3b82fe170677f1c9112c5 | |
parent | 744d757f4a49984579344441fd9e1a41f5b21095 (diff) | |
download | external_gettext-43fed6dd88958f3956e286f4fc6e5f24af746bf7.zip external_gettext-43fed6dd88958f3956e286f4fc6e5f24af746bf7.tar.gz external_gettext-43fed6dd88958f3956e286f4fc6e5f24af746bf7.tar.bz2 |
Avoid warnings from mcs-1.1.13.
-rw-r--r-- | gettext-tools/lib/ChangeLog | 7 | ||||
-rw-r--r-- | gettext-tools/lib/csharpcomp.c | 32 | ||||
-rw-r--r-- | gettext-tools/lib/csharpcomp.sh.in | 8 |
3 files changed, 34 insertions, 13 deletions
diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index fccac10..e85ad8a 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -1,3 +1,10 @@ +2006-06-21 Bruno Haible <bruno@clisp.org> + + Avoid warnings from recent versions of mcs. + * csharpcomp.sh.in (options_mcs): Don't use options -o, -L, -r any + more. Use options documented since mcs-1.0 instead. + * csharpcomp.c (compile_csharp_using_mono): Likewise. + 2006-06-17 Bruno Haible <bruno@clisp.org> * iconvstring.c (UNSAFE_ICONV): New macro. diff --git a/gettext-tools/lib/csharpcomp.c b/gettext-tools/lib/csharpcomp.c index 47a5829..71f8ae8 100644 --- a/gettext-tools/lib/csharpcomp.c +++ b/gettext-tools/lib/csharpcomp.c @@ -1,5 +1,5 @@ /* Compile a C# program. - Copyright (C) 2003-2005 Free Software Foundation, Inc. + Copyright (C) 2003-2006 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software; you can redistribute it and/or modify @@ -214,25 +214,34 @@ compile_csharp_using_mono (const char * const *sources, unsigned int i; argc = - 1 + (output_is_library ? 1 : 0) + 2 + 2 * libdirs_count - + 2 * libraries_count + (debug ? 1 : 0) + sources_count; + 1 + (output_is_library ? 1 : 0) + 1 + libdirs_count + libraries_count + + (debug ? 1 : 0) + sources_count; argv = (char **) xallocsa ((argc + 1) * sizeof (char *)); argp = argv; *argp++ = "mcs"; if (output_is_library) *argp++ = "-target:library"; - *argp++ = "-o"; - *argp++ = (char *) output_file; + { + char *option = (char *) xallocsa (5 + strlen (output_file) + 1); + memcpy (option, "-out:", 5); + strcpy (option + 5, output_file); + *argp++ = option; + } for (i = 0; i < libdirs_count; i++) { - *argp++ = "-L"; - *argp++ = (char *) libdirs[i]; + char *option = (char *) xallocsa (5 + strlen (libdirs[i]) + 1); + memcpy (option, "-lib:", 5); + strcpy (option + 5, libdirs[i]); + *argp++ = option; } for (i = 0; i < libraries_count; i++) { - *argp++ = "-r"; - *argp++ = (char *) libraries[i]; + char *option = (char *) xallocsa (11 + strlen (libraries[i]) + 4 + 1); + memcpy (option, "-reference:", 11); + memcpy (option + 11, libraries[i], strlen (libraries[i])); + strcpy (option + 11 + strlen (libraries[i]), ".dll"); + *argp++ = option; } if (debug) *argp++ = "-g"; @@ -297,6 +306,11 @@ compile_csharp_using_mono (const char * const *sources, /* Remove zombie process from process list, and retrieve exit status. */ exitstatus = wait_subprocess (child, "mcs", false, false, true, true); + for (i = 1 + (output_is_library ? 1 : 0); + i < 1 + (output_is_library ? 1 : 0) + + 1 + libdirs_count + libraries_count; + i++) + freesa (argv[i]); for (i = 0; i < sources_count; i++) if (argv[argc - sources_count + i] != sources[i]) freesa (argv[argc - sources_count + i]); diff --git a/gettext-tools/lib/csharpcomp.sh.in b/gettext-tools/lib/csharpcomp.sh.in index 0a79d90..e4b1a4e 100644 --- a/gettext-tools/lib/csharpcomp.sh.in +++ b/gettext-tools/lib/csharpcomp.sh.in @@ -1,7 +1,7 @@ #!/bin/sh # Compile a C# program. -# Copyright (C) 2003-2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2006 Free Software Foundation, Inc. # Written by Bruno Haible <bruno@clisp.org>, 2003. # # This program is free software; you can redistribute it and/or modify @@ -84,19 +84,19 @@ while test $# != 0; do ;; esac options_cscc="$options_cscc -o "`echo "$2" | sed -e "$sed_quote_subst"` - options_mcs="$options_mcs -o "`echo "$2" | sed -e "$sed_quote_subst"` + options_mcs="$options_mcs -out:"`echo "$2" | sed -e "$sed_quote_subst"` options_csc="$options_csc -out:"`echo "$2" | sed -e "$sed_quote_subst"` shift ;; -L) options_cscc="$options_cscc -L "`echo "$2" | sed -e "$sed_quote_subst"` - options_mcs="$options_mcs -L "`echo "$2" | sed -e "$sed_quote_subst"` + options_mcs="$options_mcs -lib:"`echo "$2" | sed -e "$sed_quote_subst"` options_csc="$options_csc -lib:"`echo "$2" | sed -e "$sed_quote_subst"` shift ;; -l) options_cscc="$options_cscc -l "`echo "$2" | sed -e "$sed_quote_subst"` - options_mcs="$options_mcs -r "`echo "$2" | sed -e "$sed_quote_subst"` + options_mcs="$options_mcs -reference:"`echo "$2" | sed -e "$sed_quote_subst"` options_csc="$options_csc -reference:"`echo "$2" | sed -e "$sed_quote_subst"`".dll" shift ;; |