public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org>
To: cygwin-apps-cvs@sourceware.org
Subject: [setup - the official Cygwin setup program] branch master, updated. release_2.910-3-g217aada7
Date: Sun, 19 Dec 2021 12:40:53 +0000 (GMT)	[thread overview]
Message-ID: <20211219124053.3D8C33858C60@sourceware.org> (raw)





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



                 reply	other threads:[~2021-12-19 12:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211219124053.3D8C33858C60@sourceware.org \
    --to=jturney@sourceware.org \
    --cc=cygwin-apps-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).