pkgsrc-Users archive

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

Re: New pkg geography/viking

  > It would be nice to have a comment in the patch file explaining why
  > you changed NAN to 0, and whether you sent the fix upstream, their bug
  > tracking id, etc.  But not  necessary.
  Forgot to mention: This is work in progress. The problem is simple, but
  the solution is not. Most likely this is a bug in NetBSD:
  There are (for that C-file) global variables initialized statically
  with the symbol "NAN". "NAN" sugests that this symbol is somthing
  static, a literal like "0.0" or "0xff". But in NetBSD NAN is a
  preprocessor macro that finaly resolves to the variable "__nanf" inside
  libc. So in NetBSD it is not possible to statically initialize a
  variable with NAN. Too me this looks more like a problem of NetBSD, not
  of the application. I am still not sure how to solve this.

The real question is what C99 says about the use of NAN and if it's
required to be a constant - that will determine if viking or NetBSD is
wrong :-)

Section 7.12 part 5 says that NAN is a macro expanding to a constant of
type float that is a quiet NaN.  So the original code is legit and
NetBSD is buggy, I think.

Attachment: pgpSK_uEMkIzH.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index