+ // Remove PYTHONPATH from the environment as it may point to an
+ // external python installation and cause reconfigure failures.
+ unsetEnv("PYTHONPATH");
+
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1900)
+ // Removing an argument from argv leads to an assertion on Windows
+ // when compiling with MSVC 2015 in debug mode (see bug #10440).
+ // To avoid this we make a copy of the array of pointers.
+ char ** newargv = (char **) malloc((argc + 1) * sizeof(char *));
+ if (newargv) {
+ memcpy(newargv, *argv, (argc + 1) * sizeof(char *));
+ *argv = newargv;
+ } else {
+ lyxerr << "LyX warning: Cannot make a copy of "
+ "command line arguments!"
+ << endl;
+ }
+#endif
+
+