This is the mail archive of the
gsl-discuss@sourceware.cygnus.com
mailing list for the GSL project.
Re: Undefined identifiers for alphaev6-dec-osf4.0e
- To: Brian Gough <bjg at network-theory dot co dot uk>
- Subject: Re: Undefined identifiers for alphaev6-dec-osf4.0e
- From: Tim Mooney <mooney at dogbert dot cc dot ndsu dot nodak dot edu>
- Date: Thu, 24 Feb 2000 08:04:41 -0600 (CST)
- cc: gsl-discuss at sourceware dot cygnus dot com
In regard to: Re: Undefined identifiers for alphaev6-dec-osf4.0e, Brian...:
>Sounds good. We'll wait for the patch.
>
This seems to do it. It's against yesterday's CVS.
Index: acconfig.h
===================================================================
RCS file: /cvs/gsl/gsl/acconfig.h,v
retrieving revision 1.14
diff -u -r1.14 acconfig.h
--- acconfig.h 2000/02/19 13:54:34 1.14
+++ acconfig.h 2000/02/24 05:18:13
@@ -32,5 +32,8 @@
#undef HAVE_IRIX_IEEE_INTERFACE
#undef HAVE_AIX_IEEE_INTERFACE
+/* Define this if your version of Tru64 Unix has IEEE_TRAP_ENABLE_DNO */
+#undef HAVE_TRU64_IEEE_TRAP_ENABLE_DNO
+
/* Define this if printf can handle %Lf for long double */
#undef HAVE_PRINTF_LONGDOUBLE
Index: configure.in
===================================================================
RCS file: /cvs/gsl/gsl/configure.in,v
retrieving revision 1.86
diff -u -r1.86 configure.in
--- configure.in 2000/02/23 19:21:25 1.86
+++ configure.in 2000/02/24 05:18:13
@@ -152,6 +152,21 @@
*-*-osf*)
AC_DEFINE(HAVE_TRU64_IEEE_INTERFACE)
AC_MSG_RESULT([osf/tru64])
+ dnl
+ dnl Some versions of the OS formerly known as Digital Unix
+ dnl don't have the mask for IEEE_TRAP_ENABLE_DNO. We could
+ dnl AC_EGREP_HEADER, but this works. Note that no special
+ dnl compiler flags (possibly determined below) are required,
+ dnl so we can do this right here.
+ AC_MSG_CHECKING([for Tru64's IEEE_TRAP_ENABLE_DNO mask])
+ AC_TRY_COMPILE(
+[#include <float.h>
+#include <machine/fpu.h>
+], [ long foo = IEEE_TRAP_ENABLE_DNO; ],
+ [AC_DEFINE(HAVE_TRU64_IEEE_TRAP_ENABLE_DNO)
+ AC_MSG_RESULT([yes])
+ ],AC_MSG_RESULT([no])
+ ) dnl here ends the AC_TRY_COMPILE
;;
*-*-aix*)
AC_DEFINE(HAVE_AIX_IEEE_INTERFACE)
@@ -243,7 +258,6 @@
esac
# Now restore our (possibly augmented) CFLAGS.
CFLAGS="$save_cflags"
-
dnl AC_ARG_ENABLE(exceptions,[exceptions],AC_PROG_CXX)
Index: ieee-utils/fp-tru64.c
===================================================================
RCS file: /cvs/gsl/gsl/ieee-utils/fp-tru64.c,v
retrieving revision 1.3
diff -u -r1.3 fp-tru64.c
--- fp-tru64.c 2000/02/17 02:33:43 1.3
+++ fp-tru64.c 2000/02/24 05:18:13
@@ -86,6 +86,8 @@
* IEEE_TRAP_ENABLE_UNF -> Underflow
* IEEE_TRAP_ENABLE_INE -> Inexact (requires special option to C compiler)
* IEEE_TRAP_ENABLE_DNO -> denormal operand
+ * Note: IEEE_TRAP_ENABLE_DNO is not supported on OSF 3.x or Digital Unix
+ * 4.0 - 4.0d(?).
* IEEE_TRAP_ENABLE_MASK -> mask of all the trap enables
* IEEE_MAP_DMZ -> map denormal inputs to zero
* IEEE_MAP_UMZ -> map underflow results to zero
@@ -97,8 +99,13 @@
if (exception_mask & GSL_IEEE_MASK_INVALID)
mode &= ~ IEEE_TRAP_ENABLE_INV ;
- if (exception_mask & GSL_IEEE_MASK_DENORMALIZED)
+ if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) {
+#ifdef HAVE_TRU64_IEEE_TRAP_ENABLE_DNO
mode &= ~ IEEE_TRAP_ENABLE_DNO ;
+#else
+ GSL_ERROR ("Sorry, this version of Digital Unix does not support denormalized operands", GSL_EUNSUP) ;
+#endif
+ }
if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO)
mode &= ~ IEEE_TRAP_ENABLE_DZE ;
>Tim Mooney writes:
> >
> > Unless someone else is anxious to tackle this, I'll add a test to detect
> > this problem and submit a patch. I'll be gone for more than a week starting
> > this coming weekend, so if I don't get it done before Saturday (not likely,
> > at this point) it may be 2 or 3 weeks before I get to it.
>
--
Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J1, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164