--- ncurses-5.2/c++/cursesw.cc +++ ncurses-5.2/c++/cursesw.cc @@ -45,7 +45,7 @@ int NCursesWindow::scanw(const char* fmt, ...) { -#if defined(__GNUG__) +#if (__GNUG__ <= 2) va_list args; va_start(args, fmt); char buf[BUFSIZ]; @@ -65,7 +65,7 @@ int NCursesWindow::scanw(int y, int x, const char* fmt, ...) { -#if defined(__GNUG__) +#if (__GNUG__ <= 2) va_list args; va_start(args, fmt); char buf[BUFSIZ]; --- ncurses-5.2/c++/cursesw.h +++ ncurses-5.2/c++/cursesw.h @@ -7,7 +7,7 @@ #include #include #include -#ifdef __MWERKS__ +#if defined(__MWERKS__) || __GNUG__ >=3 /* This is a bogus check, stringstream is actually ANSI C++ standard, * but old compilers like GCC don't have it, and new compilers like Metrowerks * don't have strstream