KDE Bug Tracking System
Home
Report New Wish or Bug
Query Existing Reports
First
Last
Prev
Next
No search results available
Search page
Bug
138148
:
Compile error on Solaris 8 - kchart/kdchart/KDC...
P
roduct
:
kchart
Co
m
ponent
:
general
Status
:
RESOLVED
Resolution
:
FIXED
Target
:
---
Version
:
1.6
Pr
i
ority
:
NOR
Severity
:
normal
V
otes
:
0
Description
:
Opened:
2006-11-30 13:21
Last Changed:
2006-12-19 23:56:34
Version: koffice-1.6.1 (using KDE KDE 3.5.5) Installed from: Compiled From Sources Compiler: gcc 3.4.6 OS: Solaris I get this compile error on Solaris: KDChartAxesPainter.cpp: In static member function `static QString KDChartAxesPainter::applyLabelsFormat(double, int, int, double, int&, KDChartEnums::NumberNotation, const QString&, const QString&, const QString&, const QString&, int, const QChar&, bool)': KDChartAxesPainter.cpp:3728: error: `trunc' was not declared in this scope KDChartAxesPainter.cpp:3728: warning: unused variable 'trunc' trunc is a C99 function, but the C library on Solaris is not C99 :-(
Comment
#1
Jens Hatlak 2006-11-30 15:41:17
I'm also seeing this - same version, Solaris 8, gcc 4.0.3.
Comment
#2
Inge Wallin 2006-12-19 23:23:53
Only on version 1.6: trunk doesn't use trunc(). Who'da thunk? :-)
Comment
#3
Inge Wallin 2006-12-19 23:56:33
SVN commit 615038 by ingwa: Fix
bug 138148
: Compile error on Solaris 8 - kchart/kdchart/KDChartAxesPainter.cpp uses trunc, which is not available * kdchart/KDChartAxesPainter.cpp: trunc(): Define it. We could make a complicated workaround using #if's and stuff, but this is the simplest solution, i.e. to simply define our own trunc(). BUG: 138148 M +10 -0 ChangeLog M +16 -0 kdchart/KDChartAxesPainter.cpp --- branches/koffice/1.6/koffice/kchart/ChangeLog #615037:615038 @@ -1,3 +1,13 @@ +2006-12-19 Inge Wallin <
inge@lysator.liu.se
> + + Fix
bug 138148
: Compile error on Solaris 8 - + kchart/kdchart/KDChartAxesPainter.cpp uses trunc, which is not + available + + * kdchart/KDChartAxesPainter.cpp: trunc(): Define it, since some + OSes, like Solaris, doesn't have it. We could make a complicated + workaround, but this is the simplest solution. + 2006-11-07 Inge Wallin <
inge@lysator.liu.se
> Start on
bug 134194
: Impossible to change the data range. --- branches/koffice/1.6/koffice/kchart/kdchart/KDChartAxesPainter.cpp #615037:615038 @@ -3701,10 +3701,26 @@ return sVal; } +#if 0 + #if defined ( Q_WS_WIN) #define trunc(x) ((int)(x)) #endif +#else + +// Ugly hack because Solaris (among others?) doesn't have trunc(), +// since the libs are not C99. I could do a complex #if expression, +// but instead I will just define trunc() here. + +double trunc(double x) +{ + return x >= 0.0 ? floor(x) : -floor(-x); +} + +#endif + + QString KDChartAxesPainter::applyLabelsFormat( const double nVal_, int divPow10, int behindComma,
P
latform
:
Compiled Sources
O
S
:
Solaris
K
eywords
:
U
RL
:
People
Reporter
:
Steve Evans
Assigned To
:
Inge Wallin
Related actions
View Bug Activity
Format For Printing
XML
Clone This Bug
Note
You need to
log in
before you can comment on or make changes to this bug.
Attachments
Add an attachment
(proposed patch, testcase, etc.)
Depends on
:
B
locks
:
Show dependency tree
-
Show dependency graph
First
Last
Prev
Next
No search results available
Search page
Actions
Reports
Requests
Reports
Bugs reported today
Bugs reported in the last 3 days
Bug reports with patches
Weekly Bug statistics
The most hated bugs
The most severe bugs
The most frequently reported bugs
The most wanted features
Junior Jobs
Report ownership counts and charts
My Account
New Account
Log In