# HG changeset patch # User Bruno Haible # Date 1133530807 0 # Node ID 8fc725193330fee78a21cbde5e014b50d5c0d1b9 # Parent d4112cb80f32ccb0838820b1d6614a92f8ff3aed Fix portability bug w.r.t. Microsoft's csc compiler. diff --git a/lib/ChangeLog b/lib/ChangeLog --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2005-07-09 Bruno Haible + + * csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix. + * csharpcomp.c (compile_csharp_using_sscli): Likewise. + Reported by Mark Junker . + 2005-11-29 Paul Eggert * stdint_.h (intmax_t) [defined intmax_t]: Do not declare. diff --git a/lib/csharpcomp.c b/lib/csharpcomp.c --- a/lib/csharpcomp.c +++ b/lib/csharpcomp.c @@ -404,9 +404,10 @@ } for (i = 0; i < libraries_count; i++) { - char *option = (char *) xallocsa (11 + strlen (libraries[i]) + 1); + char *option = (char *) xallocsa (11 + strlen (libraries[i]) + 4 + 1); memcpy (option, "-reference:", 11); - strcpy (option + 11, libraries[i]); + memcpy (option + 11, libraries[i], strlen (libraries[i])); + strcpy (option + 11 + strlen (libraries[i]), ".dll"); *argp++ = option; } if (optimize) diff --git a/lib/csharpcomp.sh.in b/lib/csharpcomp.sh.in --- a/lib/csharpcomp.sh.in +++ b/lib/csharpcomp.sh.in @@ -97,7 +97,7 @@ -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_csc="$options_csc -reference:"`echo "$2" | sed -e "$sed_quote_subst"` + options_csc="$options_csc -reference:"`echo "$2" | sed -e "$sed_quote_subst"`".dll" shift ;; -O)