From 64b936097f7e6bdb28390060a6cd0d6f6780b1ef Mon Sep 17 00:00:00 2001 From: "K. Noel Belcourt" Date: Tue, 18 Sep 2007 22:46:26 +0000 Subject: [PATCH] Remove unnecessary overhead in execunix.c related to the timeout implementation. Also removed unused variables as diagnosed by the Sgi (mipspro) compiler. Fixed const-correctness error in operations.hpp that Sgi complained about. There's no strerror_r function on Irix 6.5 so I replaced it with a strerror call. With these changes, I can now build process jam log and start running Sgi tests. [SVN r39378] --- src/error_code.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/error_code.cpp b/src/error_code.cpp index 9dd0970..37b2dfa 100644 --- a/src/error_code.cpp +++ b/src/error_code.cpp @@ -257,7 +257,14 @@ namespace { // strerror_r returns 0 on success, otherwise ERANGE if buffer too small, // invalid_argument if ev not a valid error number - if ( (result = strerror_r( ev, bp, sz )) == 0 ) + # if defined (__sgi) + const char * c_str = strerror( ev ); + result = 0; + return std::string( c_str ? c_str : "invalid_argument" ); + # else + result = strerror_r( ev, bp, sz ); + # endif + if (result == 0 ) break; else {