Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-05-19 05:25:20 +0400
committerChristopher Faylor <me@cgf.cx>2005-05-19 05:25:20 +0400
commitac437c3e0c36f710d66c619635693adfd12c6c00 (patch)
treea8352b720d4049c58f6cd65f17c1fb9954f41df4 /winsup
parent24515d6563060fda3ad1d0cfa7bbb6936521895b (diff)
* 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.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog9
-rw-r--r--winsup/cygwin/external.cc3
-rw-r--r--winsup/cygwin/fhandler_fifo.cc2
-rw-r--r--winsup/cygwin/fhandler_proc.cc2
-rw-r--r--winsup/cygwin/pinfo.h3
5 files changed, 15 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index a074d52cc..937cd0b44 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,14 @@
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.
* tlsoffsets.h: Regenerate.
* cygthread.cc (cygthread::name): Use new thread-local buffer.
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc
index 04604b365..2bcbc7047 100644
--- a/winsup/cygwin/external.cc
+++ b/winsup/cygwin/external.cc
@@ -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)
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index 42b185102..4ff94bb4e 100644
--- a/winsup/cygwin/fhandler_fifo.cc
+++ b/winsup/cygwin/fhandler_fifo.cc
@@ -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++)
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc
index 2086939ee..9d395185c 100644
--- a/winsup/cygwin/fhandler_proc.cc
+++ b/winsup/cygwin/fhandler_proc.cc
@@ -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)
diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h
index 33954fc4c..5f39f592a 100644
--- a/winsup/cygwin/pinfo.h
+++ b/winsup/cygwin/pinfo.h
@@ -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;