[kaffe] CVS kaffe (dalibor): Fixed compiler warning on hppa-hpux
Kaffe CVS
cvs-commits at kaffe.org
Thu Sep 25 06:19:02 PDT 2003
PatchSet 4064
Date: 2003/09/25 13:16:33
Author: dalibor
Branch: HEAD
Tag: (none)
Log:
Fixed compiler warning on hppa-hpux
The configure checks didn't look if isinf, isnan and finite were defined
as macros, so the replacement definitions caused a warning
Members:
ChangeLog:1.1659->1.1660
THIRDPARTY:1.2->1.3
configure:1.259->1.260
configure.in:1.225->1.226
config/config.h.in:1.80->1.81
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1659 kaffe/ChangeLog:1.1660
--- kaffe/ChangeLog:1.1659 Thu Sep 25 10:06:13 2003
+++ kaffe/ChangeLog Thu Sep 25 13:16:33 2003
@@ -1,5 +1,17 @@
2003-09-25 Dalibor Topic <robilad at kaffe.org>
+ * configure.in:
+ Merged in ininf, isnan and finite checking code from
+ Sablotron 1.0, licensed under MPL 1.1 and GPL.
+
+ * THIRDPARTY:
+ Updated to reflect the inclusion of Sablotron's code.
+
+ * config/config.h.in, configure:
+ Regenerated.
+
+2003-09-25 Dalibor Topic <robilad at kaffe.org>
+
Fix for jit and intrp engine compilation breakage.
* kaffe/kaffevm/jni.c:
Index: kaffe/THIRDPARTY
diff -u kaffe/THIRDPARTY:1.2 kaffe/THIRDPARTY:1.3
--- kaffe/THIRDPARTY:1.2 Mon Sep 22 20:57:51 2003
+++ kaffe/THIRDPARTY Thu Sep 25 13:16:33 2003
@@ -67,4 +67,9 @@
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-At the time of writing, Kaffe uses getaddrinfo 1.6.1.
\ No newline at end of file
+At the time of writing, Kaffe uses getaddrinfo 1.6.1.
+
+* Configure.in tests for isinf, isnan, finite
+
+Taken from Sablotron 1.0, which is dually licensed licensed under MPL 1.1
+and GPL. It is available from http://www.gingerall.cz/charlie/ga/xml/p_sab.xml
Index: kaffe/configure
diff -u kaffe/configure:1.259 kaffe/configure:1.260
--- kaffe/configure:1.259 Tue Sep 23 21:44:01 2003
+++ kaffe/configure Thu Sep 25 13:16:33 2003
@@ -39456,10 +39456,7 @@
-
-
-
-for ac_func in rint floor ceil finite isinf isnan strtod mergesort
+for ac_func in rint floor ceil strtod mergesort
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -39629,6 +39626,415 @@
fi
done
+
+
+
+
+echo "$as_me:$LINENO: checking for isnan" >&5
+echo $ECHO_N "checking for isnan... $ECHO_C" >&6
+if test "${ac_cv_func_isnan+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char isnan (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char isnan ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_isnan) || defined (__stub___isnan)
+choke me
+#else
+char (*f) () = isnan;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != isnan;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_isnan=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_isnan=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_isnan" >&5
+echo "${ECHO_T}$ac_cv_func_isnan" >&6
+if test $ac_cv_func_isnan = yes; then
+ has_isnan=1;
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNAN 1
+_ACEOF
+
+else
+ has_isnan=0
+fi
+
+echo "$as_me:$LINENO: checking for isinf" >&5
+echo $ECHO_N "checking for isinf... $ECHO_C" >&6
+if test "${ac_cv_func_isinf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char isinf (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char isinf ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_isinf) || defined (__stub___isinf)
+choke me
+#else
+char (*f) () = isinf;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != isinf;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_isinf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_isinf=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
+echo "${ECHO_T}$ac_cv_func_isinf" >&6
+if test $ac_cv_func_isinf = yes; then
+ has_isinf=1;
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINF 1
+_ACEOF
+
+else
+ has_isinf=0
+fi
+
+echo "$as_me:$LINENO: checking for finite" >&5
+echo $ECHO_N "checking for finite... $ECHO_C" >&6
+if test "${ac_cv_func_finite+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char finite (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char finite ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_finite) || defined (__stub___finite)
+choke me
+#else
+char (*f) () = finite;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != finite;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_finite=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_finite=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_finite" >&5
+echo "${ECHO_T}$ac_cv_func_finite" >&6
+if test $ac_cv_func_finite = yes; then
+ has_finite=1;
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITE 1
+_ACEOF
+
+else
+ has_finite=0
+fi
+
+
+if test $has_isnan = 0; then
+ echo "$as_me:$LINENO: checking for macro isnan" >&5
+echo $ECHO_N "checking for macro isnan... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+{ int foo; foo = isnan(0); }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_isnan=1
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_isnan=0
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ if test $has_isnan = 1; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNAN 1
+_ACEOF
+
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+fi
+
+if test $has_isinf = 0; then
+ echo "$as_me:$LINENO: checking for macro isinf" >&5
+echo $ECHO_N "checking for macro isinf... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+{ int foo; foo = isinf(0); }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_isinf=1
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_isinf=0
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ if test $has_isinf = 1; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINF 1
+_ACEOF
+
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+fi
+
+if test $has_finite = 0; then
+ echo "$as_me:$LINENO: checking for macro finite" >&5
+echo $ECHO_N "checking for macro finite... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+{ int foo; foo = finite(0); }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_finite=1
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_finite=0
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ if test $has_finite = 1; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITE 1
+_ACEOF
+
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+fi
LIBS="$KSAVE_LIBS"
Index: kaffe/configure.in
diff -u kaffe/configure.in:1.225 kaffe/configure.in:1.226
--- kaffe/configure.in:1.225 Tue Sep 23 21:44:06 2003
+++ kaffe/configure.in Thu Sep 25 13:16:37 2003
@@ -1013,8 +1013,59 @@
KSAVE_LIBS="$LIBS"
LIBS="$M_LIBS $LIBS"
AC_CHECK_FUNCS([remainder remainderf fmod fmodf drem])
-AC_CHECK_FUNCS([rint floor ceil finite isinf isnan strtod mergesort])
+AC_CHECK_FUNCS([rint floor ceil strtod mergesort])
AC_CHECK_FUNCS([strdup strstr strtod strtol strtoul])
+
+dnl isinf, isnan, finite checking code taken from Sablotron 1.0,
+dnl dually licensed licensed under MPL 1.1 and GPL
+dnl available from http://www.gingerall.cz/charlie/ga/xml/p_sab.xml
+
+dnl check for isnan etc...in the std. way and try link if not found
+dnl this is due HPUX, where isnan & Co. are defined as macros
+
+AC_CHECK_FUNC( isnan, [has_isnan=1; AC_DEFINE(HAVE_ISNAN, 1, isnan)], has_isnan=0)
+AC_CHECK_FUNC( isinf, [has_isinf=1; AC_DEFINE(HAVE_ISINF, 1, isinf)], has_isinf=0)
+AC_CHECK_FUNC( finite,[has_finite=1;AC_DEFINE(HAVE_FINITE, 1, finite)], has_finite=0)
+
+dnl check for macro isnan in math
+if test $has_isnan = 0; then
+ AC_MSG_CHECKING(for macro isnan)
+ AC_TRY_LINK( [#include <math.h>], { int foo; foo = isnan(0); },
+ has_isnan=1, has_isnan=0 )
+ if test $has_isnan = 1; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_ISNAN, 1, isnan)
+ else
+ AC_MSG_RESULT(no)
+ fi
+fi
+
+dnl check for macro isinf in math
+if test $has_isinf = 0; then
+ AC_MSG_CHECKING(for macro isinf)
+ AC_TRY_LINK( [#include <math.h>], { int foo; foo = isinf(0); },
+ has_isinf=1, has_isinf=0 )
+ if test $has_isinf = 1; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_ISINF, 1, isinf)
+ else
+ AC_MSG_RESULT(no)
+ fi
+fi
+
+dnl check for macro finite in math
+if test $has_finite = 0; then
+ AC_MSG_CHECKING(for macro finite)
+ AC_TRY_LINK( [#include <math.h>], { int foo; foo = finite(0); },
+ has_finite=1, has_finite=0 )
+ if test $has_finite = 1; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_FINITE, 1, finite)
+ else
+ AC_MSG_RESULT(no)
+ fi
+fi
+
LIBS="$KSAVE_LIBS"
dnl Test whether strtod("-0.0") is broken
Index: kaffe/config/config.h.in
diff -u kaffe/config/config.h.in:1.80 kaffe/config/config.h.in:1.81
--- kaffe/config/config.h.in:1.80 Tue Sep 23 21:44:08 2003
+++ kaffe/config/config.h.in Thu Sep 25 13:16:38 2003
@@ -79,7 +79,7 @@
/* Define to 1 if you have the <features.h> header file. */
#undef HAVE_FEATURES_H
-/* Define to 1 if you have the `finite' function. */
+/* finite */
#undef HAVE_FINITE
/* Define to 1 if you have the `floor' function. */
@@ -181,10 +181,10 @@
/* Define to 1 if you have the `ioctl' function. */
#undef HAVE_IOCTL
-/* Define to 1 if you have the `isinf' function. */
+/* isinf */
#undef HAVE_ISINF
-/* Define to 1 if you have the `isnan' function. */
+/* isnan */
#undef HAVE_ISNAN
/* Define to 1 if you have the <jpeglib.h> header file. */
More information about the kaffe
mailing list