2024-10-07 Bruno Haible <bruno@clisp.org>
+ csharpexec: Improve Cygwin support.
+ * lib/csharpexec.c: Include cygpath.h.
+ (execute_csharp_using_sscli): Convert the first 'clix' argument to
+ native Windows syntax.
+ * modules/csharpexec (Depends-on): Add cygpath.
+
csharpexec-script: Improve Cygwin support.
* build-aux/csharpexec.sh.in: Convert the first 'clix' argument to
native Windows syntax.
#include <stdio.h>
#include <stdlib.h>
+#include <error.h>
+#include "cygpath.h"
#include "execute.h"
#include "sh-quote.h"
#include "xmalloca.h"
-#include <error.h>
#include "gettext.h"
/* Handling of MONO_PATH is just like Java CLASSPATH. */
if (clix_present)
{
+ /* Here, we assume that 'clix' is a native Windows program, therefore
+ we need to use cygpath_w. */
+ char *assembly_path_converted = cygpath_w (assembly_path);
char *old_clixpath;
const char **argv =
(const char **) xmalloca ((2 + nargs + 1) * sizeof (const char *));
old_clixpath = set_clixpath (libdirs, libdirs_count, false, verbose);
argv[0] = "clix";
- argv[1] = assembly_path;
+ argv[1] = assembly_path_converted;
for (i = 0; i <= nargs; i++)
argv[2 + i] = args[i];
reset_clixpath (old_clixpath);
freea (argv);
+ free (assembly_path_converted);
return err;
}