[master] b490955a0 Move the RFC8941/SF numerical boundaries to vdef so vnum can see them

Poul-Henning Kamp phk at FreeBSD.org
Wed Jun 2 11:46:05 UTC 2021


commit b490955a0f3e94fe0a7ed651fddeff4b7d1333ad
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Jun 2 10:16:51 2021 +0000

    Move the RFC8941/SF numerical boundaries to vdef so vnum can see them

diff --git a/include/vdef.h b/include/vdef.h
index d99c02570..fb6ce4f7a 100644
--- a/include/vdef.h
+++ b/include/vdef.h
@@ -112,6 +112,18 @@
 #  define v_dont_optimize
 #endif
 
+/*********************************************************************
+ * Fundamental numerical limits
+  * These limits track RFC8941
+ * We use hex notation because 999999999999.999 is not perfectly
+ * representable in ieee64 doubles.
+ */
+
+#define VRT_INTEGER_MAX 999999999999999
+#define VRT_INTEGER_MIN -999999999999999
+#define VRT_DECIMAL_MAX 0x1.d1a94a1fffff8p+39
+#define VRT_DECIMAL_MIN -0x1.d1a94a1fffff8p+39
+
 /*********************************************************************
  * Pointer alignment magic
  */
diff --git a/include/vrt.h b/include/vrt.h
index 31198fc95..9d2c87e98 100644
--- a/include/vrt.h
+++ b/include/vrt.h
@@ -301,16 +301,6 @@ typedef vtim_real				VCL_TIME;
 typedef struct vcl *				VCL_VCL;
 typedef void					VCL_VOID;
 
-/*
- * These limits track RFC8941
- * We use hex notation because 999999999999.999 is not perfectly
- * representable in ieee64 doubles.
- */
-#define VRT_INTEGER_MAX 999999999999999
-#define VRT_INTEGER_MIN -999999999999999
-#define VRT_DECIMAL_MAX 0x1.d1a94a1fffff8p+39
-#define VRT_DECIMAL_MIN -0x1.d1a94a1fffff8p+39
-
 /***********************************************************************
  * This is the composite "context" argument for compiled VCL, VRT and
  * VMOD functions.


More information about the varnish-commit mailing list