This fixes bug #25086 (Xamarin.Android). Details described there.
To fix the issue, we use #if XAMARIN_ANDROID to avoid that old cygwin-only
code path. (We are not sure if simply removing the old code still works,
so we don't remove that for now.)
return system (cmdLine);
}
+#if XAMARIN_ANDROID
// on Windows, we have to pipe the output of a
// `cmd` interpolation to dos2unix, because the shell does not
// strip the CRLFs generated by the native pkg-config distributed
}
// and if there is no dos2unix, just run cmd /c.
if (use_dos2unix == false) {
+#endif
Console.WriteLine (cmdLine);
ProcessStartInfo dos2unix = new ProcessStartInfo ();
dos2unix.UseShellExecute = false;
p.WaitForExit ();
return p.ExitCode;
}
+#if XAMARIN_ANDROID
}
+#endif
StringBuilder b = new StringBuilder ();
int count = 0;
for (int i = 0; i < cmdLine.Length; i++) {
if (cmdLine [i] == '`') {
+#if XAMARIN_ANDROID
if (count % 2 != 0) {
b.Append ("|dos2unix");
}
+#endif
count++;
}
b.Append (cmdLine [i]);