Version: (using KDE KDE 3.3.92) Installed from: Compiled From Sources Compiler: gcc 3.4.3 OS: Solaris I get this compile error: if /bin/ksh ../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../libkdepim -I/opt/kde/include -I/opt/qt/include -I/gorbag/exta/cad/externals/SOLARIS/include -DQT_THREAD_SUPPORT -I/opt/kde/include -I/gorbag/exta/cad/externals/SOLARIS/include -I/opt/qt/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4 -D_FILE_OFFSET_BITS=64 -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2-I/opt/kde/include -I/gorbag/exta/cad/externals/SOLARIS/include -I/opt/qt/include -O2 -fomit-frame-pointer -DNeedVarargsPrototypes=1 -DNeedFunctionPrototypes=1 -pipe -fno-exceptions -mcpu=ultrasparc -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL-DQT_NO_COMPAT -DQT_NO_TRANSLATION -MT lunarphase.lo -MD -MP -MF ".deps/lunarphase.Tpo" -c -o lunarphase.lo lunarphase.cpp; \ then mv -f ".deps/lunarphase.Tpo" ".deps/lunarphase.Plo"; else rm -f ".deps/lunarphase.Tpo"; exit1; fi lunarphase.cpp:184:23: sys/cdefs.h: No such file or directory lunarphase.cpp:200:17: err.h: No such file or directory
Commenting out the includes of sys/cdefs.h and err.h allows it to compile
CVS commit by adridg: Check for headers before using them (compiles fine on Solaris without cdefs and err). BUG: 99680 M +1 -1 configure.in.in 1.43 M +6 -0 libkholidays/lunarphase.cpp 1.3 --- kdepim/configure.in.in #1.42:1.43 @@ -2,5 +2,5 @@ AC_HEADER_DIRENT AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h sys/sysctl.h sys/param.h sys/time.h sys/types.h unistd.h values.h sys/limits.h) +AC_CHECK_HEADERS(fcntl.h sys/sysctl.h sys/param.h sys/time.h sys/types.h unistd.h values.h sys/limits.h err.h sys/cdefs.h) AC_CHECK_SETENV --- kdepim/libkholidays/lunarphase.cpp #1.2:1.3 @@ -32,4 +32,6 @@ */ +#include "config.h" + #include <kglobal.h> #include <klocale.h> @@ -182,5 +184,7 @@ LunarPhase::Phase LunarPhase::phase( con */ +#if HAVE_SYS_CDEFS_H #include <sys/cdefs.h> +#endif /* @@ -198,5 +202,7 @@ LunarPhase::Phase LunarPhase::phase( con #include <ctype.h> +#if HAVE_ERR_H #include <err.h> +#endif #include <math.h> #include <string.h>
Commenting them out on my (Fedora Core 2 based Linux) system, it still compiles fine. Is it needed on a BSD system? Looks like old BSD code, so probably worth a check...
*** Bug 99620 has been marked as a duplicate of this bug. ***
Thanks for the reports, both of you. But could you please check that the other one hasn't posted the same bug already? You're going to find the same bugs.