svn commit: r535759 - in head/www/varnish4: . files
Mark Felder
feld at FreeBSD.org
Mon May 18 17:32:24 UTC 2020
Author: feld
Date: Mon May 18 17:32:23 2020
New Revision: 535759
URL: https://svnweb.freebsd.org/changeset/ports/535759
Log:
www/varnish4: Update to 4.1.11
Changelog: https://varnish-cache.org/releases/rel4.1.11.html
Also backport change required for compiling with LLVM 10.
PR: 245075
Added:
head/www/varnish4/files/patch-lib_libvmod__std_vmod__std__conversions.c (contents, props changed)
Modified:
head/www/varnish4/Makefile
head/www/varnish4/distinfo
Modified: head/www/varnish4/Makefile
==============================================================================
--- head/www/varnish4/Makefile Mon May 18 17:30:25 2020 (r535758)
+++ head/www/varnish4/Makefile Mon May 18 17:32:23 2020 (r535759)
@@ -1,9 +1,9 @@
# $FreeBSD$
PORTNAME= varnish
-PORTVERSION= 4.1.10
+PORTVERSION= 4.1.11
DISTVERSIONPREFIX= varnish-
-PORTREVISION= 1
+PORTREVISION= 0
CATEGORIES= www
PKGNAMESUFFIX= 4
Modified: head/www/varnish4/distinfo
==============================================================================
--- head/www/varnish4/distinfo Mon May 18 17:30:25 2020 (r535758)
+++ head/www/varnish4/distinfo Mon May 18 17:32:23 2020 (r535759)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1536767576
-SHA256 (varnishcache-varnish-cache-varnish-4.1.10_GH0.tar.gz) = 44e0fa32112ffc1f8331f66c48b761e75bc1e4b10a9a0d4b58f63c202ce5c3f8
-SIZE (varnishcache-varnish-cache-varnish-4.1.10_GH0.tar.gz) = 953083
+TIMESTAMP = 1589821255
+SHA256 (varnishcache-varnish-cache-varnish-4.1.11_GH0.tar.gz) = eb2ad84cc1fb8d2a0e80cb4d9c43b1b79cd56b839440258de9f3d10854564cab
+SIZE (varnishcache-varnish-cache-varnish-4.1.11_GH0.tar.gz) = 956466
Added: head/www/varnish4/files/patch-lib_libvmod__std_vmod__std__conversions.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/varnish4/files/patch-lib_libvmod__std_vmod__std__conversions.c Mon May 18 17:32:23 2020 (r535759)
@@ -0,0 +1,42 @@
+--- lib/libvmod_std/vmod_std_conversions.c.orig 2019-02-11 14:06:27 UTC
++++ lib/libvmod_std/vmod_std_conversions.c
+@@ -45,6 +45,21 @@
+ #include "vtim.h"
+ #include "vcc_if.h"
+
++/*
++ * technically, as our VCL_INT is int64_t, its limits are INT64_MIN/INT64_MAX.
++ *
++ * Yet, for conversions, we use VNUMpfx with a double intermediate, so above
++ * 2^53 we see rounding errors. In order to catch a potential floor rounding
++ * error, we make our limit 2^53-1
++ *
++ * Ref: https://stackoverflow.com/a/1848762
++ */
++#define VCL_INT_MAX ((INT64_C(1)<<53)-1)
++#define VCL_INT_MIN (-VCL_INT_MAX)
++
++#define VCL_BYTES_MAX VCL_INT_MAX
++#define VCL_BYTES_MIN 0
++
+ VCL_DURATION __match_proto__(td_std_duration)
+ vmod_duration(VRT_CTX, VCL_STRING p, VCL_DURATION d)
+ {
+@@ -195,7 +210,7 @@ vmod_real2integer(VRT_CTX, VCL_REAL r, VCL_INT i)
+ if (!isfinite(r))
+ return (i);
+ r = round(r);
+- if (r > LONG_MAX || r < LONG_MIN)
++ if (r > VCL_INT_MAX || r < VCL_INT_MIN)
+ return(i);
+ return ((long)r);
+ }
+@@ -219,7 +234,7 @@ vmod_time2integer(VRT_CTX, VCL_TIME t, VCL_INT i)
+ if (!isfinite(t))
+ return (i);
+ t = round(t);
+- if (t > LONG_MAX || t < LONG_MIN)
++ if (t > VCL_INT_MAX || t < VCL_INT_MIN)
+ return(i);
+ return ((long)t);
+ }
More information about the svn-ports-head
mailing list