From 8672a337b39f2c0d4100b02a2ac046b28a395511 Mon Sep 17 00:00:00 2001 From: akir Date: Thu, 21 Oct 2004 10:57:38 +0000 Subject: fix missing 'new(nothrow)' on mipspro --- src/Ewmh.cc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Ewmh.cc b/src/Ewmh.cc index ce0afb5..11be04c 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Ewmh.cc,v 1.52 2004/10/16 22:20:05 akir Exp $ +// $Id: Ewmh.cc,v 1.53 2004/10/21 10:57:38 akir Exp $ #include "Ewmh.hh" @@ -35,8 +35,17 @@ #include #include #include + using namespace std; +// mipspro has no new(nothrow) +#if defined sgi && ! defined GCC +#define FB_new_nothrow new +#else +#define FB_new_nothrow new(std::nothrow) +#endif + + Ewmh::Ewmh() { createAtoms(); } @@ -264,7 +273,7 @@ void Ewmh::updateClientList(BScreen &screen) { num += (*icon_it)->numClients(); } - Window *wl = new (nothrow) Window[num]; + Window *wl = FB_new_nothrow Window[num]; if (wl == 0) { _FB_USES_NLS; cerr<<_FBTEXT(Ewmh, OutOfMemoryClientList, "Fatal: Out of memory, can't allocate for EWMH client list", "")<