[setup - the official Cygwin setup program] branch master, updated. release_2.910-3-g217aada7

Jon TURNEY via Cygwin-apps-cvs <[email protected]>
Newsgroups gmane.os.cygwin.cvs.apps
Message-ID <[email protected]>



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);
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.