Skip to content

Commit

Permalink
Apprently new VS headers (or other Win .h) drop "#define NAN". (#8627)
Browse files Browse the repository at this point in the history
* Apprently new VS headers (or other Win .h) drop "#define NAN".

This PR defines it when it«s not found (Windows only)

* Since NAN is handled in gmt_notposix.h, move the new definition to that file.
  • Loading branch information
joa-quim authored Nov 20, 2024
1 parent 0cb6920 commit bfdd58d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gmt_notposix.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@

#ifndef NAN
# ifdef _MSC_VER
# include <ymath.h>
# define NAN _Nan._Double
static const double _NAN = (-(float)(((float)(1e+300 * 1e+300)) * 0.0F));
# define NAN _NAN
# else /* _MSC_VER */
static const double _NAN = (HUGE_VAL-HUGE_VAL);
# define NAN _NAN
Expand Down

0 comments on commit bfdd58d

Please sign in to comment.