Bug 114817 - Compile error on Solaris 8 - parser.cpp uses isblank, which is not available
Summary: Compile error on Solaris 8 - parser.cpp uses isblank, which is not available
Status: RESOLVED FIXED
Alias: None
Product: kalzium
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: Kalzium Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-21 15:36 UTC by Steve Evans
Modified: 2005-10-22 01:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Evans 2005-10-21 15:36:10 UTC
Version:            (using KDE KDE 3.4.92)
Installed from:    Compiled From Sources
Compiler:          gcc 3.4.3 
OS:                Solaris

if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I./../../libkdeedu/kdeeduplot -I./../../libkdeedu/kdeeduui -I/opt/kde/include -I/opt/qt/include   -I/gorbag/exta/cad/externals/SOLARIS/gnome2/include/glib-2.0 -I/gorbag/exta/cad/externals/SOLARIS/include  -DQT_THREAD_SUPPORT -I/opt/kde/include -I/gorbag/exta/cad/externals/SOLARIS/gnome2/include/glib-2.0 -I/gorbag/exta/cad/externals/SOLARIS/include -I/opt/qt/include  -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4  -Wno-long-long -Wundef -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -I/opt/kde/include -I/gorbag/exta/cad/externals/SOLARIS/gnome2/include/glib-2.0 -I/gorbag/exta/cad/externals/SOLARIS/include -I/opt/qt/include -O2 -fomit-frame-pointer -DNeedVarargsPrototypes=1 -DNeedFunctionPrototypes=1 -pipe -fno-exceptions -mcpu=ultrasparc -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -D_ISOC99_SOURCE -MT parser.o -MD -MP -MF ".deps/parser.Tpo" -c -o parser.o parser.cpp; \
then mv -f ".deps/parser.Tpo" ".deps/parser.Po"; else rm -f ".deps/parser.Tpo"; exit 1; fi
parser.cpp: In member function `int Parser::skipWhitespace()':
parser.cpp:168: error: `isblank' undeclared (first use this function)
parser.cpp:168: error: (Each undeclared identifier is reported only once for each function it appears in.)

I cannot find a definition of isblank in any of the system header files.
Comment 1 Thiago Macieira 2005-10-22 01:31:53 UTC
SVN commit 472788 by thiago:

Fix code compilation on Solaris 8. isblank is not available outside the GNU
C library:
       isblank()
              checks  for  a blank character; that is, a space or a tab.  This
              function is a GNU extension.

Instead, let's rely on QChar, which is always fully Unicode.

To the Kalzium developers: m_str is a QString, so why is m_nextChar an int,
instead of a QChar?

BUG:114817        


 M  +1 -1      parser.cpp  


--- branches/KDE/3.5/kdeedu/kalzium/src/parser.cpp #472787:472788
@@ -165,7 +165,7 @@
 int
 Parser::skipWhitespace()
 {
-    while (isblank(m_nextChar))
+    while (QChar(m_nextChar).isSpace())
 	getNextChar();
 
     return m_nextChar;