some changes for solaris
This commit is contained in:
@@ -9,6 +9,9 @@
|
||||
@license LGPL, see file <a href="license.html">COPYING</a>
|
||||
|
||||
$Log$
|
||||
Revision 1.9 2005/01/07 00:34:38 marc
|
||||
some changes for solaris
|
||||
|
||||
Revision 1.8 2004/12/20 13:22:25 marc
|
||||
mrw string now throws exceptions, catch needed
|
||||
|
||||
@@ -103,8 +106,12 @@ namespace mrw {
|
||||
confusing the demangler. */
|
||||
const char* p(name);
|
||||
while (p && *p == '.') ++p;
|
||||
|
||||
# ifdef __solaris__
|
||||
char res[1024];
|
||||
if (cplus_demangle(p, res, 1024)) return name;
|
||||
# else
|
||||
Auto<char*>::Free res(cplus_demangle(p, DMGL_ANSI | DMGL_PARAMS));
|
||||
# endif
|
||||
if (res) {
|
||||
/* Now put back any stripped dots. */
|
||||
if (p==name) return static_cast<const char*>(res);
|
||||
@@ -248,7 +255,7 @@ mrw::StackTrace::BinFiles mrw::StackTrace::filename()
|
||||
{
|
||||
std::string s;
|
||||
s<<"/proc/"<<getpid();
|
||||
AutoFile fd(open(s.str(), O_RDONLY));
|
||||
AutoFile fd(open(s.c_str(), O_RDONLY));
|
||||
prpsinfo_t status;
|
||||
if (fd==-1 || ioctl(fd, PIOCPSINFO, &status)==-1) return res;
|
||||
s = status.pr_psargs;
|
||||
|
Reference in New Issue
Block a user