summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-07-29 22:15:25 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-07-29 22:15:25 +0000
commitaa8b85def9003d4bba549b6080f6f4864f347f13 (patch)
tree32eef1e9aff22fadc701b237c177ddf28a0d3c2f /perl.h
parent82240bfc3cad564fef4386102cd6c0d6b66b8f58 (diff)
downloadperl-aa8b85def9003d4bba549b6080f6f4864f347f13.tar.gz
Beginnings of better Inf and NaN support.
At least toke.c and sv.c still need quite a bit of work. p4raw-id: //depot/perl@11489
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/perl.h b/perl.h
index 9041aa010d..8e975f1ba0 100644
--- a/perl.h
+++ b/perl.h
@@ -2493,6 +2493,55 @@ START_EXTERN_C
END_EXTERN_C
#endif
+#if !defined(NV_INF) && defined(USE_LONG_DOUBLE) && defined(LDBL_INFINITY)
+# define NV_INF LDBL_INFINITY
+#endif
+#if !defined(NV_INF) && defined(DBL_INFINITY)
+# define NV_INF (NV)DBL_INFINITY
+#endif
+#if !defined(NV_INF) && defined(INFINITY)
+# define NV_INF (NV)INFINITY
+#endif
+#if !defined(NV_INF) && defined(INF)
+# define NV_INF (NV)INF
+#endif
+#if !defined(NV_INF) && defined(USE_LONG_DOUBLE) && defined(HUGE_VALL)
+# define NV_INF (NV)HUGE_VALL
+#endif
+#if !defined(NV_INF) && defined(HUGE_VAL)
+# define NV_INF (NV)HUGE_VAL
+#endif
+
+#if !defined(NV_NAN) && defined(USE_LONG_DOUBLE)
+# if !defined(NV_NAN) && defined(LDBL_NAN)
+# define NV_NAN LDBL_NAN
+# endif
+# if !defined(NV_NAN) && defined(LDBL_QNAN)
+# define NV_NAN LDBL_QNAN
+# endif
+# if !defined(NV_NAN) && defined(LDBL_SNAN)
+# define NV_NAN LDBL_SNAN
+# endif
+#endif
+#if !defined(NV_NAN) && defined(DBL_NAN)
+# define NV_NAN (NV)DBL_NAN
+#endif
+#if !defined(NV_NAN) && defined(DBL_QNAN)
+# define NV_NAN (NV)DBL_QNAN
+#endif
+#if !defined(NV_NAN) && defined(DBL_SNAN)
+# define NV_NAN (NV)DBL_SNAN
+#endif
+#if !defined(NV_NAN) && defined(QNAN)
+# define NV_NAN (NV)QNAN
+#endif
+#if !defined(NV_NAN) && defined(SNAN)
+# define NV_NAN (NV)SNAN
+#endif
+#if !defined(NV_NAN) && defined(NAN)
+# define NV_NAN (NV)NAN
+#endif
+
#ifndef __cplusplus
# if defined(NeXT) || defined(__NeXT__) /* or whatever catches all NeXTs */
char *crypt (); /* Maybe more hosts will need the unprototyped version */
@@ -3773,6 +3822,7 @@ int flock(int fd, int op);
#define IS_NUMBER_NOT_INT 0x04 /* saw . or E notation */
#define IS_NUMBER_NEG 0x08 /* leading minus sign */
#define IS_NUMBER_INFINITY 0x10 /* this is big */
+#define IS_NUMBER_NAN 0x20 /* this is not */
#define GROK_NUMERIC_RADIX(sp, send) grok_numeric_radix(sp, send)