From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id 3D8C33858C60; Sun, 19 Dec 2021 12:40:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D8C33858C60 To: cygwin-apps-cvs@sourceware.org Subject: [setup - the official Cygwin setup program] branch master, updated. release_2.910-3-g217aada7 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 069cfbb46fec0e5f54c0d009e3e3dc0870187dab X-Git-Newrev: 217aada741347db9b3d9cbd7ca5752e0541e67c5 Message-Id: <20211219124053.3D8C33858C60@sourceware.org> Date: Sun, 19 Dec 2021 12:40:53 +0000 (GMT) From: Jon TURNEY X-BeenThere: cygwin-apps-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin-apps git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2021 12:40:53 -0000 Diff: --- LogFile.cc | 3 --- LogSingleton.cc | 25 ------------------------- LogSingleton.h | 1 - String++.cc | 4 ++++ postinstall.cc | 10 +++++----- 5 files changed, 9 insertions(+), 34 deletions(-) diff --git a/LogFile.cc b/LogFile.cc index 6b9e9712..0bcf6073 100644 --- a/LogFile.cc +++ b/LogFile.cc @@ -237,9 +237,6 @@ LogFile::endEntry() strftime (b, 1000, "%Y/%m/%d %H:%M:%S ", tm); currEnt->msg = b; } - /* What follows is a hack to get around an (apparent) bug in libg++-3 with - * non-0 memory on alloc - */ currEnt->msg += buf; /* reset for next use */ diff --git a/LogSingleton.cc b/LogSingleton.cc index e08717f1..b123351b 100644 --- a/LogSingleton.cc +++ b/LogSingleton.cc @@ -51,31 +51,6 @@ LogSingleton::SetInstance(LogSingleton &newInstance) theInstance = &newInstance; } -#if 0 -// Logging class. Default logging level is PLAIN. -class LogSingleton : public std::ostream -{ -public: - // Singleton support - /* Some platforms don't call destructors. So this call exists - * which guarantees to flush any log data... - * but doesn't call generic C++ destructors - */ - virtual void exit (int const exit_code) __attribute__ ((noreturn)); - // get a specific verbosity stream. - virtual ostream &operator() (enum log_level level); - - friend ostream& endLog(ostream& outs); - -protected: - LogSingleton (LogSingleton const &); // no copy constructor - LogSingleton &operator = (LogSingleton const&); // no assignment operator - void endEntry(); // the current in-progress entry is complete. -private: - static LogSingleton *theInstance; -}; -#endif - // Log adapators for printf-style output void LogBabblePrintf(const char *fmt, ...) diff --git a/LogSingleton.h b/LogSingleton.h index 2fd1e367..ffed69de 100644 --- a/LogSingleton.h +++ b/LogSingleton.h @@ -54,7 +54,6 @@ private: /* End of a Log comment */ extern std::ostream& endLog(std::ostream& outs); -//extern ostream& endLog(ostream& outs); #define Log(X) (LogSingleton::GetInstance ()(X)) diff --git a/String++.cc b/String++.cc index 0984c166..de2b48f9 100644 --- a/String++.cc +++ b/String++.cc @@ -146,5 +146,9 @@ vformat(const std::wstring &fmt, va_list ap) va_end(apc); + // discard terminating null written by vsnwprintf from std::string + if (str[n] == 0) + str.resize(n); + return str; } diff --git a/postinstall.cc b/postinstall.cc index 9e063a2d..e990f520 100644 --- a/postinstall.cc +++ b/postinstall.cc @@ -249,17 +249,17 @@ do_postinstall_reflector (void *p) // Tell the postinstall results page the results string PostInstallResults.SetResultsString(s); + /* Revert primary group to admins group. This allows to create all the + state files written by setup as admin group owned. */ + if (root_scope == IDC_ROOT_SYSTEM) + nt_sec.setAdminGroup (); + // Tell the progress page that we're done running scripts Progress.PostMessageNow (WM_APP_POSTINSTALL_THREAD_COMPLETE, 0, s.empty() ? IDD_DESKTOP : IDD_POSTINSTALL); } TOPLEVEL_CATCH((HWND) context[1], "postinstall"); - /* Revert primary group to admins group. This allows to create all the - state files written by setup as admin group owned. */ - if (root_scope == IDC_ROOT_SYSTEM) - nt_sec.setAdminGroup (); - ExitThread(0); }