From 1c4d2a97a582432d99cdf9f36d9c043c6acdd63a Mon Sep 17 00:00:00 2001 From: henry Date: Wed, 21 May 2008 16:58:38 +0100 Subject: [PATCH] Remove the #include on darwin OS --- src/OSspecific/Unix/printStack.C | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/OSspecific/Unix/printStack.C b/src/OSspecific/Unix/printStack.C index a5bf67cf61..f7433063de 100644 --- a/src/OSspecific/Unix/printStack.C +++ b/src/OSspecific/Unix/printStack.C @@ -32,7 +32,9 @@ License #include "readHexLabel.H" #include +#ifndef darwin #include +#endif #include // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -65,7 +67,7 @@ string pOpen(const string &cmd, label line=0) { string str(buffer); return str.substr(0, str.size()-1); - } + } } pclose(cmdPipe); } @@ -93,9 +95,9 @@ void printSourceFileAndLine void *addr; sscanf(myAddress.c_str(), "%p",&addr); - + Dl_info info; - + dladdr(addr, &info); unsigned long offset = ulong(info.dli_fbase); @@ -216,7 +218,7 @@ void error::printStack(Ostream& os) { string::size_type lPos = msg.find('['); string::size_type rPos = msg.find(']'); - + if (lPos != string::npos && rPos != string::npos && lPos