diff options
author | Chris Kuethe <chris.kuethe@gmail.com> | 2005-07-20 16:48:30 +0000 |
---|---|---|
committer | Chris Kuethe <chris.kuethe@gmail.com> | 2005-07-20 16:48:30 +0000 |
commit | c367d791d936617e43c93e3379900d3fc65c4d89 (patch) | |
tree | 977bf522b4e5651dafd4005468cbc4763147065c /gpsd.h | |
parent | 8cf81bb9b864c51b8bcb7e10a18e762ec4e81773 (diff) | |
download | gpsd-c367d791d936617e43c93e3379900d3fc65c4d89.tar.gz |
This defines NAN for us where needed.
There is talk of Bad Stuff happening when NAN is just a global
ifndef/define/endif, so we wrap it in tests for OSes where we know we
don't have NAN.
Diffstat (limited to 'gpsd.h')
-rw-r--r-- | gpsd.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -296,4 +296,12 @@ extern float roundf(float x); #define roundf(x) ((float)rintf(x)) #endif /* !HAVE_ROUND */ +/* OpenBSD and FreeBSD don't seem to have NAN, NetBSD does, others? */ +/* XXX test for this in configure? */ +#if defined(__OpenBSD__) || defined(__FreeBSD__) +#ifndef NAN +#define NAN (0.0/0.0) +#endif /* !NAN */ +#endif /* list of Operating Systems */ + #endif /* _gpsd_h_ */ |