dnl which flags does the compiler support?
if test "x$GCC" = "xyes"; then
- for flag in -fno-strict-aliasing -Wall -std=c99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W; do
+ for flag in -fno-strict-aliasing -Wall -std=gnu99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W; do
oCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $flag"
cachename=rd_cv_gcc_flag_`echo $flag|sed 's/[[^A-Za-z]]/_/g'`
export PATH=/opt/SunStudioExpress/bin
-Since there does not seem to be a viable msgfmt tool on OpenSolaris (short
-of installing it yourself). You have to call configure with the
+=head2 Solaris 8/9
- --disable-libintl
+Getting NLS to work on old solaris is an open issue ... use
+
+ --disable-nls
option.
AC_MSG_CHECKING([if IEEE math works $1])
AC_CACHE_VAL([rd_cv_ieee_$2],
[AC_RUN_IFELSE([AC_LANG_SOURCE([[$3
-
-#if HAVE_MATH_H
-# include <math.h>
-#endif
-
-#if HAVE_FLOAT_H
-# include <float.h>
-#endif
-
-#if HAVE_IEEEFP_H
-# include <ieeefp.h>
-#endif
-
-#if HAVE_FP_CLASS_H
-# include <fp_class.h>
-#endif
-
-/* Solaris */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
-# define HAVE_ISINF 1
-# define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
-#endif
-
-/* solaris 10 it defines isnan such that only forte can compile it ... bad bad */
-#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS) && defined(FP_SNAN) && defined(FP_QNAN))
-# undef isnan
-# define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
-#endif
-
-/* Digital UNIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H) && defined(FP_NEG_INF) && defined( FP_POS_INF) )
-# define HAVE_ISINF 1
-# define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
-#endif
-
-/* AIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
-# define HAVE_ISINF 1
-# define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
-#endif
-
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
-# define HAVE_ISINF 1
-# define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
-#endif
-
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
-# define HAVE_ISINF 1
-# define isinf(a) (fpclassify(a) == FP_INFINITE)
-#endif
-
-#if HAVE_MATH_H
-#include <math.h>
-#endif
-
+#include "src/rrd_config_bottom.h"
#include <stdio.h>
int main(void){
double rrdnan,rrdinf,rrdc,rrdzero;
# define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
#endif
+/* solaris 8/9 has rint but not round */
+#if (! defined(HAVE_ROUND) && defined(HAVE_RINT))
+# define round rint
+#endif
+
/* solaris 10 it defines isnan such that only forte can compile it ... bad bad */
#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
# undef isnan
const char *);
#endif
static const char* _getopt_initialize(int argc,
- char** argv,
+ char* const* argv,
const char* optstring)
{
/* Start processing options with ARGV-element 1 (since ARGV-element 0
long-named options. */
int _getopt_internal(int argc,
- char** argv,
+ char* const* argv,
const char *optstring,
const struct option *longopts,
int* longind,
}
}
-int getopt(
- int argc,
- char** argv,
- const char* optstring)
-{
- return _getopt_internal(argc, argv, optstring,
- (const struct option *) 0, (int *) 0, 0);
-}
-
#endif /* Not ELIDE_CODE. */
\f
#ifdef TEST
#endif
int getopt_long(int argc,
- char** argv,
+ char* const* argv,
const char* options,
const struct option* long_options,
int* opt_index)
instead. */
int getopt_long_only(int argc,
- char** argv,
+ char* const* argv,
const char* options,
const struct option* long_options,
int* opt_index)