Swordfish90 / cool-retro-term

A good looking terminal emulator which mimics the old cathode display...
22.03k stars 839 forks source link

FTBFS w/ gcc@10 -- missing `iswspace` #692

Open bavier opened 2 years ago

bavier commented 2 years ago

I get the following error when building cool-retro-term using gcc version 10.3.0:

lib/TerminalCharacterDecoder.cpp: In member function ‘virtual void Konsole::HTMLDecoder::decodeLine(const Konsole::Character*, int, Konsole::LineProperty)’:
lib/TerminalCharacterDecoder.cpp:205:18: error: ‘iswspace’ is not a member of ‘std’; did you mean ‘isspace’?
  205 |         if (std::iswspace(ch))
      |                  ^~~~~~~~
      |                  isspace
make[1]: *** [Makefile:800: TerminalCharacterDecoder.o] Error 1

It builds fine without modification using gcc@9.4.0. With the following patch I'm able to build successfully using gcc 10.3.0:

--- a/qmltermwidget/lib/TerminalCharacterDecoder.cpp
+++ b/qmltermwidget/lib/TerminalCharacterDecoder.cpp
@@ -19,6 +19,8 @@                                                                                                                                                                                                                                                               
     02110-1301  USA.                                                                                                                                                                                                                                                           
 */                                                                                                                                                                                                                                                                             

+#include <cwctype>                                                                                                                                                                                                                                                             
+                                                                                                                                                                                                                                                                               
 // Own                                                                                                                                                                                                                                                                         
 #include "TerminalCharacterDecoder.h"