This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

patch for gsl-0.7 under AIX 4.3.3



To compile gsl-0.7 for AIX 4.3.3 (rs6000), I followed the comments of
others in messages on this list from last year
(http://sources.redhat.com/ml/gsl-discuss/2000/msg00529.html).
I was able to compile gsl-0.7 using gcc-2.95-2, after making the changes
detailed in the patch below.  I noticed that these changes hadn't made it
into CVS so I thought I would submit a patch.

Please let me know if you require additional information.

Regards, Alex


*** fp-aix.c	Mon May  7 16:40:30 2001
--- fp-aix_0.7.c	Mon May  7 16:33:33 2001
***************
*** 74,83 ****

    /* Turn on all the exceptions apart from 'inexact' */

!   mode = TRP_INVALID | TRP_DIV_BY_ZERO | TRP_OVERFLOW | TRP_UNDERFLOW ;

    if (exception_mask & GSL_IEEE_MASK_INVALID)
!     mode &= ~ TRP_INVALID ;

    if (exception_mask & GSL_IEEE_MASK_DENORMALIZED)
      GSL_ERROR ("AIX does not support the denormalized operand exception. "
--- 74,83 ----

    /* Turn on all the exceptions apart from 'inexact' */

!   mode = TRAP_INVALID | TRAP_DIV_BY_ZERO | TRAP_OVERFLOW | TRAP_UNDERFLOW ;

    if (exception_mask & GSL_IEEE_MASK_INVALID)
!     mode &= ~ TRAP_INVALID ;

    if (exception_mask & GSL_IEEE_MASK_DENORMALIZED)
      GSL_ERROR ("AIX does not support the denormalized operand exception. "
***************
*** 85,105 ****
  	       GSL_EUNSUP) ;

    if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO)
!     mode &= ~ TRP_DIV_BY_ZERO ;

    if (exception_mask & GSL_IEEE_MASK_OVERFLOW)
!     mode &= ~ TRP_OVERFLOW ;

    if (exception_mask & GSL_IEEE_MASK_UNDERFLOW)
!     mode &=  ~ TRP_UNDERFLOW ;

    if (exception_mask & GSL_IEEE_TRAP_INEXACT)
      {
!       mode |= TRP_INEXACT ;
      }
    else
      {
!       mode &= ~ TRP_INEXACT ;
      }

    /* AIX appears to require two steps -- first enable floating point traps
--- 85,105 ----
  	       GSL_EUNSUP) ;

    if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO)
!     mode &= ~ TRAP_DIV_BY_ZERO ;

    if (exception_mask & GSL_IEEE_MASK_OVERFLOW)
!     mode &= ~ TRAP_OVERFLOW ;

    if (exception_mask & GSL_IEEE_MASK_UNDERFLOW)
!     mode &=  ~ TRAP_UNDERFLOW ;

    if (exception_mask & GSL_IEEE_TRAP_INEXACT)
      {
!       mode |= TRAP_INEXACT ;
      }
    else
      {
!       mode &= ~ TRAP_INEXACT ;
      }

    /* AIX appears to require two steps -- first enable floating point traps


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]