- os::init(&argc, &argv);
- int const val = GUIRunTime::initApplication(argc, argv);
- if (val)
- return val;
+#ifdef HAVE_IOS
+ std::ios_base::sync_with_stdio(false);
+#endif
+ fs::path::default_name_check(fs::no_check);
+
+ // To avoid ordering of global object problems with some
+ // stdlibs we do the initialization here, but still as
+ // early as possible.
+ lyx::lyxerr.rdbuf(std::cerr.rdbuf());