]> sourceware.org Git - newlib-cygwin.git/commitdiff
* external.cc: Move pids declaration to file scope and use less enthusiastic
authorChristopher Faylor <me@cgf.cx>
Thu, 19 May 2005 01:25:20 +0000 (01:25 +0000)
committerChristopher Faylor <me@cgf.cx>
Thu, 19 May 2005 01:25:20 +0000 (01:25 +0000)
constructor.
* pinfo.h (winpids::winpids): Remove default setting.
* fhandler_fifo.cc (fhandler_fifo::open_not_mine): Accommodate removal of
default setting.
* fhandler_proc.cc (fhandler_proc::readdir): Ditto.

winsup/cygwin/ChangeLog
winsup/cygwin/external.cc
winsup/cygwin/fhandler_fifo.cc
winsup/cygwin/fhandler_proc.cc
winsup/cygwin/pinfo.h

index a074d52cc3e91c13673e6f12f061a40e78ea5f80..937cd0b441ae35d1f8742380bc765d973c39e719 100644 (file)
@@ -1,3 +1,12 @@
+2005-05-18  Christopher Faylor  <cgf@timesys.com>
+
+       * external.cc: Move pids declaration to file scope and use less
+       enthusiastic constructor.
+       * pinfo.h (winpids::winpids): Remove default setting.
+       * fhandler_fifo.cc (fhandler_fifo::open_not_mine): Accommodate removal
+       of default setting.
+       * fhandler_proc.cc (fhandler_proc::readdir): Ditto.
+
 2005-05-18  Christopher Faylor  <cgf@timesys.com>
 
        * cygtls.h (_local_storage::unknown_thread_name): New buffer.
index 04604b36525df8ffc3cea69141a06aad8e54035b..2bcbc7047c50020c70a298f6bed056f6a81f5a24 100644 (file)
@@ -32,6 +32,8 @@ details. */
 void *hook_cygwin (const char *, const void *);
 child_info *get_cygwin_startup_info ();
 
+static winpids pids;
+
 static external_pinfo *
 fillout_pinfo (pid_t pid, int winpid)
 {
@@ -41,7 +43,6 @@ fillout_pinfo (pid_t pid, int winpid)
   if ((nextpid = !!(pid & CW_NEXTPID)))
     pid ^= CW_NEXTPID;
 
-  static winpids pids (0);
 
   static unsigned int i;
   if (!pids.npids || !nextpid)
index 42b185102b2fdcbf1b2fa1ab9261b4bc10660e4f..4ff94bb4e52264b53eaea2e6488387874ee4d7a4 100644 (file)
@@ -89,7 +89,7 @@ fhandler_fifo::close_one_end ()
 int
 fhandler_fifo::open_not_mine (int flags)
 {
-  winpids pids;
+  winpids pids ((DWORD) 0);
   int res = 0;
 
   for (unsigned i = 0; i < pids.npids; i++)
index 2086939ee8edcab31bfd29fb86753f5b5a7aee00..9d395185c902d0a3f650fa59258cf42dffa72bd3 100644 (file)
@@ -200,7 +200,7 @@ fhandler_proc::readdir (DIR * dir)
 {
   if (dir->__d_position >= PROC_LINK_COUNT)
     {
-      winpids pids;
+      winpids pids ((DWORD) 0);
       int found = 0;
       for (unsigned i = 0; i < pids.npids; i++)
        if (found++ == dir->__d_position - PROC_LINK_COUNT)
index 33954fc4c1211214a6ce75e07f355ed1b4304bf4..5f39f592a6cfea3dacb1e4e6fa01ed68d479b535 100644 (file)
@@ -221,9 +221,10 @@ public:
   DWORD npids;
   inline void reset () { npids = 0; release (); }
   void set (bool winpid);
+  winpids (): enum_processes (&winpids::enum_init) {}
   winpids (int): pinfo_access (0), enum_processes (&winpids::enum_init)
     { reset (); }
-  winpids (DWORD acc = 0): pidlist (NULL), npidlist (0), pinfolist (NULL),
+  winpids (DWORD acc): pidlist (NULL), npidlist (0), pinfolist (NULL),
                           enum_processes (&winpids::enum_init), npids (0)
   {
     pinfo_access = acc;
This page took 0.037316 seconds and 5 git commands to generate.