dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[DotGNU] more hpux issues


From: James Mc Parlane
Subject: [DotGNU] more hpux issues
Date: Wed, 15 May 2002 11:21:01 +1000

Joy!

- treecc builds with no problems.
- libgc builds with no problems.

Sadness!

- pnet refused to build because of issues with the finite() function. Two
files were affected and would not built. I managed to get pnet to build
after making some hacks, described below. I'm sure the hacks I made are much
better off being dealt with in configure . If someone can give me a quick
lesson in what I have to do then I would not mind attempting to fix this.
- pnetlib cored during make
        /fish/src/pnet/pnetlib/../pnet/ilalink/ilalink: exited with signal
11 (core dumped)

Problems Compiling pnet

* Configure does not find finite, and thus does not define HAS_FINITE and
the compile aborts due to an #error with support/test_float.c and
engine/cvm_arith.c
* Even though the man pages say that finite and isfinite are declared in
math.h, only isfinite appears to be visible from a grep of the include files
directory tree.
* I have included in this email the result from "man finite"..  the "-Aa and
-D_HPUX_SOURCE " looks rempotely possibly promising.


support/test_float.c:55: #error "Don't know how to determine if floating
point numbers are finite"

I beat this into submission by making the following quick and dirty #ifdef

-- snip --
int ILNativeFloatIsFinite(ILNativeFloat value)
{
#ifdef hpux
        return isfinite(value);
#else /* hpux */
#ifdef HAVE_FINITE
        return finite(value);
#else
#if defined(HAVE_ISNAN) && defined(HAVE_ISINF)
        return (!isnan(value) && isinf(value) == 0);
#else
        #error "Don't know how to determine if floating point numbers are
finite"
        return 1;
#endif
#endif
#endif /* hpux */
}
-- snip --


engine/cvm_arith.c:34: #error "Don't know how to determine if floating point
numbers are finite"

I beat this into submission by making the following quick and dirty #ifdef

-- snip --
/*
 * Check to see if a floating point number is finite.
 */
#ifdef hpux
        #define FLOAT_IS_FINITE(value)  (isfinite((value)))
#else /* hpux */
#ifdef HAVE_FINITE
        #define FLOAT_IS_FINITE(value)  (finite((value)))
#else
        #if defined(HAVE_ISNAN) && defined(HAVE_ISINF)
                #define FLOAT_IS_FINITE(value)  (!isnan((value)) && \
 
isinf((value)) == 0)
        #else
                #error "Don't know how to determine if floating point
numbers are finite"
        #endif
#endif
#endif /* hpux */
-- snip --

# man finite

---------------------------------------------------- snip
--------------------------------------------

isfinite(3M)                                                   isfinite(3M)

 NAME
      isfinite() - floating-point finiteness macro

 SYNOPSIS
      #include <math.h>

      int isfinite(floating-type x);

 DESCRIPTION
      The isfinite() macro determines whether its argument has a finite
      value (zero, denormalized, or normalized, and not infinite or NaN).
      The macro can be used with either double or float arguments.

      The ISO/ANSI C committee has approved the isfinite() macro for
      inclusion in the C9X draft standard.  The isfinite() macro implements
      the finite() function recommended by the IEEE-754 standard for
      floating-point arithmetic.

      To use the isfinite() macro, compile either with the default -Ae
      option or with the -Aa and -D_HPUX_SOURCE options.  Make sure your
      program includes <math.h>.  Link in the math library by specifying -lm
      on the compiler or linker command line.

 RETURN VALUE
      The isfinite() macro returns a nonzero value if and only if its
      argument has a finite value.

 ERRORS
      No errors are defined.

 EXAMPLE
      Make sure a value is finite before continuing operations on it:

           #include <math.h>
           /*...*/
              float x;
              /*...*/
              if (isfinite(x))
                 /*...*/

 SEE ALSO
      fpclassify(3M), isinf(3M), isnan(3M), isnormal(3M), signbit(3M),
      math(5).

 Hewlett-Packard Company            - 1 -  HP-UX Release 11.00: October 1997


> -----Original Message-----
> From: Rhys Weatherley [mailto:address@hidden
> Sent: Tuesday, May 14, 2002 8:17 PM
> To: address@hidden
> Subject: [DotGNU]libffi changes to pnet
> 
> 
> I've updated the CVS version of pnet so that it can
> build either with or without libffi.
> 
> By default, libffi is turned off on hpux, but turned
> on for everything else.  I'll disable other hosts as
> we come across ones that don't work.
> 
> It is also possible to manually turn off libffi with
> the "--without-libffi" option to "configure", but I
> wouldn't recommend it unless you really need it.
> 
> As stated previously, turning off libffi also turns
> off PInvoke support.  There's no way to do PInvoke
> in a portable manner without libffi.
> 
> I also fixed the hpux/libgc issue in the CVS version,
> so it should be possible to get further with the hpux
> build now.
> 
> Cheers,
> 
> Rhys.
> _______________________________________________
> Developers mailing list
> address@hidden
> http://subscribe.dotgnu.org/mailman/listinfo/developers
> 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]