From: Bruno Haible Date: Fri, 2 Dec 2005 13:40:07 +0000 (+0000) Subject: Fix portability bug w.r.t. Microsoft's csc compiler. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=261bf5590d59449ed2858fcc560feb25f9d204a7;p=pspp Fix portability bug w.r.t. Microsoft's csc compiler. --- diff --git a/lib/ChangeLog b/lib/ChangeLog index 2602de844b..1a05242fc0 100644 --- 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 index 7ce6bcba77..2344a99622 100644 --- a/lib/csharpcomp.c +++ b/lib/csharpcomp.c @@ -404,9 +404,10 @@ compile_csharp_using_sscli (const char * const *sources, } 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 index f6a99ad337..da0d1ba2de 100644 --- a/lib/csharpcomp.sh.in +++ b/lib/csharpcomp.sh.in @@ -97,7 +97,7 @@ while test $# != 0; do -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)