public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [setup - the official Cygwin setup program] branch master, updated. release_2.910-3-g217aada7
@ 2021-12-19 12:40 Jon TURNEY
  0 siblings, 0 replies; only message in thread
From: Jon TURNEY @ 2021-12-19 12:40 UTC (permalink / raw)
  To: cygwin-apps-cvs





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);
 }
 



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-19 12:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-19 12:40 [setup - the official Cygwin setup program] branch master, updated. release_2.910-3-g217aada7 Jon TURNEY

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).