aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2013-03-29 16:19:11 +0000
committerChristopher Faylor <me@cgf.cx>2013-03-29 16:19:11 +0000
commitbb93b7ab95e10ffdf17eeb6e0e055956b92603c3 (patch)
tree99a13c393bc31360198116a975dc05a7898b16bf
parent6fcb2238583e71dc3a4fb88eec43de85c5c074eb (diff)
downloadnewlib-bb93b7ab95e10ffdf17eeb6e0e055956b92603c3.zip
newlib-bb93b7ab95e10ffdf17eeb6e0e055956b92603c3.tar.gz
newlib-bb93b7ab95e10ffdf17eeb6e0e055956b92603c3.tar.bz2
* pinfo.h (pinfo::status_exit): Rename from former static function in pinfo.cc.
(pinfo::operator == (char *)): Remove unused operator. * pinfo.cc (pinfo::status_exit): Move this function info pinfo class. Use progname from the pinfo rather than myself. Be defensive when inspecting procinfo.
-rw-r--r--winsup/cygwin/ChangeLog9
-rw-r--r--winsup/cygwin/pinfo.cc16
-rw-r--r--winsup/cygwin/pinfo.h3
-rw-r--r--winsup/cygwin/release/1.7.183
4 files changed, 25 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 589b1a1..15c1b67 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,14 @@
2013-03-29 Christopher Faylor <me.cygwin2013@cgf.cx>
+ * pinfo.h (pinfo::status_exit): Rename from former static function in
+ pinfo.cc.
+ (pinfo::operator == (char *)): Remove unused operator.
+ * pinfo.cc (pinfo::status_exit): Move this function info pinfo class.
+ Use progname from the pinfo rather than myself. Be defensive when
+ inspecting procinfo.
+
+2013-03-29 Christopher Faylor <me.cygwin2013@cgf.cx>
+
* sigproc.cc (wait_sig): Avoid uninitialized use of nb when retrying.
Consolidate two error messages into one.
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 5800590..79eb25e 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -110,17 +110,23 @@ pinfo_init (char **envp, int envc)
debug_printf ("pid %d, pgid %d", myself->pid, myself->pgid);
}
-static DWORD
-status_exit (DWORD x)
+DWORD
+pinfo::status_exit (DWORD x)
{
switch (x)
{
case STATUS_DLL_NOT_FOUND:
{
char posix_prog[NT_MAX_PATH];
- UNICODE_STRING uc;
- RtlInitUnicodeString(&uc, myself->progname);
- path_conv pc (&uc, PC_NOWARN);
+ path_conv pc;
+ if (!procinfo)
+ pc.check ("/dev/null");
+ else
+ {
+ UNICODE_STRING uc;
+ RtlInitUnicodeString(&uc, procinfo->progname);
+ pc.check (&uc, PC_NOWARN);
+ }
mount_table->conv_to_posix_path (pc.get_win32 (), posix_prog, 1);
small_printf ("%s: error while loading shared libraries: %s: cannot open shared object file: No such file or directory\n",
posix_prog, find_first_notloaded_dll (pc));
diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h
index f3f85c1..2f97dcb 100644
--- a/winsup/cygwin/pinfo.h
+++ b/winsup/cygwin/pinfo.h
@@ -179,7 +179,6 @@ public:
int operator == (_pinfo *x) const {return x == procinfo;}
int operator == (void *x) const {return procinfo == x;}
int operator == (int x) const {return (int) procinfo == (int) x;}
- int operator == (char *x) const {return (char *) procinfo == x;}
_pinfo *operator * () const {return procinfo;}
operator _pinfo * () const {return procinfo;}
void preserve () { destroy = false; }
@@ -206,6 +205,8 @@ public:
void set_acl ();
friend class _pinfo;
friend class winpids;
+private:
+ DWORD status_exit (DWORD);
};
#define ISSTATE(p, f) (!!((p)->process_state & f))
diff --git a/winsup/cygwin/release/1.7.18 b/winsup/cygwin/release/1.7.18
index 148d441..780b9b6 100644
--- a/winsup/cygwin/release/1.7.18
+++ b/winsup/cygwin/release/1.7.18
@@ -60,3 +60,6 @@ Bug fixes:
- Fix some bugs in CTRL-S/CTRL-Q handling in ptys.
See: http://cygwin.com/ml/cygwin/2012-10/msg00089.html
+
+- Fix "error while loading shared libraries:" message to properly
+ display the shared library name in more cases.