POV-Ray : Newsgroups : povray.unix : POV-Ray 3.1 OpenBSD 2.6 Compile Errors : Re: POV-Ray 3.1 OpenBSD 2.6 Compile Errors Server Time
28 Jul 2024 16:16:55 EDT (-0400)
  Re: POV-Ray 3.1 OpenBSD 2.6 Compile Errors  
From: Mark Gordon
Date: 30 Apr 2000 20:42:32
Message: <390CD3CD.3CF7CF7E@mailbag.com>
It's a useful (but not necessary) math error handling function, and it's
not ANSI standard (I saw something saying it's a System V feature), so
maybe it's not surprising that it doesn't work under OpenBSD.  If it is
available, then the exception structure is defined, and if it's not
defined, it causes problems (like those you saw), and the matherr
facility shouldn't be used.  The solution would seem to be to check
whether exception is defined.  Try the following:

#ifdef UNDERFLOW
#ifdef exception
/* note: the above line is added */
int matherr(x)
struct exception *x;
{
  switch (x->type)
  {
    case DOMAIN:
    case OVERFLOW:

      x->retval = 1.0e17;

      break;

    case SING:
    case UNDERFLOW:

      x->retval = 0.0;

      break;
  }

  return (1);
}
#endif
/* note: the above line is added */
#endif

I suspect that it will work after those changes are made (barring other
problems, that is).  Let me know how it goes.

-Mark Gordon


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.