Version: 0.1.0-rc1 (using KDE KDE 3.5.0) Installed from: Compiled From Sources Compiler: gcc version 3.3.6 OS: SunOS (sun4u) release 5.8 dcrawprocess.cpp attempts to include getopt.h. On Solaris, getopt is defined in stdlib.h according to the man page. #ifdef USE_SOLARIS #include <stdlib.h> #else #include <getopt.h> #endif
According to the man pages available through Google, it's unistd.h for Linux, NetBSD, OpenBSD, FreeBSD, HP-UX but it's stdlib.h for BSD 4.3 & Solaris. (Can't find for IRIX an AIX) getopt.h is only needed for getopt_long.
SVN commit 488831 by thiago: * Remove getopt.h from the includes: it's only needed for getopt_long, which isn't used here. * Add stdlib.h because Solaris has getopt there instead of unistd.h (which sounds like the correct place to be, since getopt isn't part of ISO C). * Move sys/types.h to the top, just to be on the safe side. BUG:118407 M +2 -2 dcrawprocess.cpp --- trunk/extragear/libs/kipi-plugins/rawconverter/dcrawprocess.cpp #488830:488831 @@ -25,12 +25,12 @@ extern "C" { +#include <sys/types.h> #include <stdio.h> #include <unistd.h> -#include <sys/types.h> +#include <stdlib.h> #include <sys/wait.h> #include <signal.h> -#include <getopt.h> #include <jpeglib.h> #include <tiffio.h> }