POV-Ray : Newsgroups : povray.unix : POV-Ray 3.1 OpenBSD 2.6 Compile Errors Server Time
31 Oct 2024 16:14:11 EDT (-0400)
  POV-Ray 3.1 OpenBSD 2.6 Compile Errors (Message 1 to 2 of 2)  
From: George P  Staplin
Subject: POV-Ray 3.1 OpenBSD 2.6 Compile Errors
Date: 29 Apr 2000 20:07:32
Message: <390B7694.4ADE0145@XMission.com>
These are the errors:

gcc -O6 -finline-functions -ffast-math -c -ansi -m386 -DCPU=686
-DCOMPILER_VER=\".`uname`.gcc\"
-DPOV_LIB_DIR=\"/usr/local/lib/povray31\" -I. -I.. -I../libpng -I../zlib
unix.c
unix.c: In function `matherr':
unix.c:99: dereferencing pointer to incomplete type
unix.c:104: dereferencing pointer to incomplete type
unix.c:111: dereferencing pointer to incomplete type
unix.c:106: warning: unreachable code at beginning of switch statement
gmake[1]: *** [unix.o] Error 1
gmake[1]: Leaving directory `/home/imagine/povray31/source/unix'
gmake: [newxwin] Error 2 (ignored)
$

Please help me compile this.


Post a reply to this message

From: Mark Gordon
Subject: Re: POV-Ray 3.1 OpenBSD 2.6 Compile Errors
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.