summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--REFLECTION183
-rw-r--r--php-pecl-varnish.spec16
-rw-r--r--varnish-upstream.patch368
3 files changed, 104 insertions, 463 deletions
diff --git a/REFLECTION b/REFLECTION
index c6c9f56..32bb819 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #153 varnish version 1.2.1 ] {
+Extension [ <persistent> extension #130 varnish version 1.2.2 ] {
- Dependencies {
Dependency [ hash (Required) ]
@@ -129,7 +129,7 @@ Extension [ <persistent> extension #153 varnish version 1.2.1 ] {
Class [ <internal:varnish> class VarnishLog ] {
- - Constants [82] {
+ - Constants [90] {
Constant [ integer TAG_Debug ] { 1 }
Constant [ integer TAG_Error ] { 2 }
Constant [ integer TAG_CLI ] { 3 }
@@ -139,79 +139,87 @@ Extension [ <persistent> extension #153 varnish version 1.2.1 ] {
Constant [ integer TAG_BackendReuse ] { 7 }
Constant [ integer TAG_BackendClose ] { 8 }
Constant [ integer TAG_HttpGarbage ] { 9 }
- Constant [ integer TAG_Backend ] { 10 }
- Constant [ integer TAG_Length ] { 11 }
- Constant [ integer TAG_FetchError ] { 12 }
- Constant [ integer TAG_ReqMethod ] { 13 }
- Constant [ integer TAG_ReqURL ] { 14 }
- Constant [ integer TAG_ReqProtocol ] { 15 }
- Constant [ integer TAG_ReqStatus ] { 16 }
- Constant [ integer TAG_ReqReason ] { 17 }
- Constant [ integer TAG_ReqHeader ] { 18 }
- Constant [ integer TAG_ReqUnset ] { 19 }
- Constant [ integer TAG_ReqLost ] { 20 }
- Constant [ integer TAG_RespMethod ] { 21 }
- Constant [ integer TAG_RespURL ] { 22 }
- Constant [ integer TAG_RespProtocol ] { 23 }
- Constant [ integer TAG_RespStatus ] { 24 }
- Constant [ integer TAG_RespReason ] { 25 }
- Constant [ integer TAG_RespHeader ] { 26 }
- Constant [ integer TAG_RespUnset ] { 27 }
- Constant [ integer TAG_RespLost ] { 28 }
- Constant [ integer TAG_BereqMethod ] { 29 }
- Constant [ integer TAG_BereqURL ] { 30 }
- Constant [ integer TAG_BereqProtocol ] { 31 }
- Constant [ integer TAG_BereqStatus ] { 32 }
- Constant [ integer TAG_BereqReason ] { 33 }
- Constant [ integer TAG_BereqHeader ] { 34 }
- Constant [ integer TAG_BereqUnset ] { 35 }
- Constant [ integer TAG_BereqLost ] { 36 }
- Constant [ integer TAG_BerespMethod ] { 37 }
- Constant [ integer TAG_BerespURL ] { 38 }
- Constant [ integer TAG_BerespProtocol ] { 39 }
- Constant [ integer TAG_BerespStatus ] { 40 }
- Constant [ integer TAG_BerespReason ] { 41 }
- Constant [ integer TAG_BerespHeader ] { 42 }
- Constant [ integer TAG_BerespUnset ] { 43 }
- Constant [ integer TAG_BerespLost ] { 44 }
- Constant [ integer TAG_ObjMethod ] { 45 }
- Constant [ integer TAG_ObjURL ] { 46 }
- Constant [ integer TAG_ObjProtocol ] { 47 }
- Constant [ integer TAG_ObjStatus ] { 48 }
- Constant [ integer TAG_ObjReason ] { 49 }
- Constant [ integer TAG_ObjHeader ] { 50 }
- Constant [ integer TAG_ObjUnset ] { 51 }
- Constant [ integer TAG_ObjLost ] { 52 }
- Constant [ integer TAG_BogoHeader ] { 53 }
- Constant [ integer TAG_LostHeader ] { 54 }
- Constant [ integer TAG_TTL ] { 55 }
- Constant [ integer TAG_Fetch_Body ] { 56 }
- Constant [ integer TAG_VCL_acl ] { 57 }
- Constant [ integer TAG_VCL_call ] { 58 }
- Constant [ integer TAG_VCL_trace ] { 59 }
- Constant [ integer TAG_VCL_return ] { 60 }
- Constant [ integer TAG_ReqStart ] { 61 }
- Constant [ integer TAG_Hit ] { 62 }
- Constant [ integer TAG_HitPass ] { 63 }
- Constant [ integer TAG_ExpBan ] { 64 }
- Constant [ integer TAG_ExpKill ] { 65 }
- Constant [ integer TAG_WorkThread ] { 66 }
- Constant [ integer TAG_ESI_xmlerror ] { 67 }
- Constant [ integer TAG_Hash ] { 68 }
- Constant [ integer TAG_Backend_health ] { 69 }
- Constant [ integer TAG_VCL_Log ] { 70 }
- Constant [ integer TAG_VCL_Error ] { 71 }
- Constant [ integer TAG_Gzip ] { 72 }
- Constant [ integer TAG_Link ] { 73 }
- Constant [ integer TAG_Begin ] { 74 }
- Constant [ integer TAG_End ] { 75 }
- Constant [ integer TAG_VSL ] { 76 }
- Constant [ integer TAG_Storage ] { 77 }
- Constant [ integer TAG_Timestamp ] { 78 }
- Constant [ integer TAG_ReqAcct ] { 79 }
- Constant [ integer TAG_ESI_BodyBytes ] { 80 }
- Constant [ integer TAG_PipeAcct ] { 81 }
- Constant [ integer TAG_BereqAcct ] { 82 }
+ Constant [ integer TAG_Proxy ] { 10 }
+ Constant [ integer TAG_ProxyGarbage ] { 11 }
+ Constant [ integer TAG_Backend ] { 12 }
+ Constant [ integer TAG_Length ] { 13 }
+ Constant [ integer TAG_FetchError ] { 14 }
+ Constant [ integer TAG_ReqMethod ] { 15 }
+ Constant [ integer TAG_ReqURL ] { 16 }
+ Constant [ integer TAG_ReqProtocol ] { 17 }
+ Constant [ integer TAG_ReqStatus ] { 18 }
+ Constant [ integer TAG_ReqReason ] { 19 }
+ Constant [ integer TAG_ReqHeader ] { 20 }
+ Constant [ integer TAG_ReqUnset ] { 21 }
+ Constant [ integer TAG_ReqLost ] { 22 }
+ Constant [ integer TAG_RespMethod ] { 23 }
+ Constant [ integer TAG_RespURL ] { 24 }
+ Constant [ integer TAG_RespProtocol ] { 25 }
+ Constant [ integer TAG_RespStatus ] { 26 }
+ Constant [ integer TAG_RespReason ] { 27 }
+ Constant [ integer TAG_RespHeader ] { 28 }
+ Constant [ integer TAG_RespUnset ] { 29 }
+ Constant [ integer TAG_RespLost ] { 30 }
+ Constant [ integer TAG_BereqMethod ] { 31 }
+ Constant [ integer TAG_BereqURL ] { 32 }
+ Constant [ integer TAG_BereqProtocol ] { 33 }
+ Constant [ integer TAG_BereqStatus ] { 34 }
+ Constant [ integer TAG_BereqReason ] { 35 }
+ Constant [ integer TAG_BereqHeader ] { 36 }
+ Constant [ integer TAG_BereqUnset ] { 37 }
+ Constant [ integer TAG_BereqLost ] { 38 }
+ Constant [ integer TAG_BerespMethod ] { 39 }
+ Constant [ integer TAG_BerespURL ] { 40 }
+ Constant [ integer TAG_BerespProtocol ] { 41 }
+ Constant [ integer TAG_BerespStatus ] { 42 }
+ Constant [ integer TAG_BerespReason ] { 43 }
+ Constant [ integer TAG_BerespHeader ] { 44 }
+ Constant [ integer TAG_BerespUnset ] { 45 }
+ Constant [ integer TAG_BerespLost ] { 46 }
+ Constant [ integer TAG_ObjMethod ] { 47 }
+ Constant [ integer TAG_ObjURL ] { 48 }
+ Constant [ integer TAG_ObjProtocol ] { 49 }
+ Constant [ integer TAG_ObjStatus ] { 50 }
+ Constant [ integer TAG_ObjReason ] { 51 }
+ Constant [ integer TAG_ObjHeader ] { 52 }
+ Constant [ integer TAG_ObjUnset ] { 53 }
+ Constant [ integer TAG_ObjLost ] { 54 }
+ Constant [ integer TAG_BogoHeader ] { 55 }
+ Constant [ integer TAG_LostHeader ] { 56 }
+ Constant [ integer TAG_TTL ] { 57 }
+ Constant [ integer TAG_Fetch_Body ] { 58 }
+ Constant [ integer TAG_VCL_acl ] { 59 }
+ Constant [ integer TAG_VCL_call ] { 60 }
+ Constant [ integer TAG_VCL_trace ] { 61 }
+ Constant [ integer TAG_VCL_return ] { 62 }
+ Constant [ integer TAG_ReqStart ] { 63 }
+ Constant [ integer TAG_Hit ] { 64 }
+ Constant [ integer TAG_HitPass ] { 65 }
+ Constant [ integer TAG_ExpBan ] { 66 }
+ Constant [ integer TAG_ExpKill ] { 67 }
+ Constant [ integer TAG_WorkThread ] { 68 }
+ Constant [ integer TAG_ESI_xmlerror ] { 69 }
+ Constant [ integer TAG_Hash ] { 70 }
+ Constant [ integer TAG_Backend_health ] { 71 }
+ Constant [ integer TAG_VCL_Log ] { 72 }
+ Constant [ integer TAG_VCL_Error ] { 73 }
+ Constant [ integer TAG_Gzip ] { 74 }
+ Constant [ integer TAG_Link ] { 75 }
+ Constant [ integer TAG_Begin ] { 76 }
+ Constant [ integer TAG_End ] { 77 }
+ Constant [ integer TAG_VSL ] { 78 }
+ Constant [ integer TAG_Storage ] { 79 }
+ Constant [ integer TAG_Timestamp ] { 80 }
+ Constant [ integer TAG_ReqAcct ] { 81 }
+ Constant [ integer TAG_PipeAcct ] { 82 }
+ Constant [ integer TAG_BereqAcct ] { 83 }
+ Constant [ integer TAG_VfpAcct ] { 84 }
+ Constant [ integer TAG_Witness ] { 85 }
+ Constant [ integer TAG_BackendStart ] { 86 }
+ Constant [ integer TAG_H2RxHdr ] { 87 }
+ Constant [ integer TAG_H2RxBody ] { 88 }
+ Constant [ integer TAG_H2TxHdr ] { 89 }
+ Constant [ integer TAG_H2TxBody ] { 90 }
}
- Static properties [0] {
@@ -229,7 +237,7 @@ Extension [ <persistent> extension #153 varnish version 1.2.1 ] {
}
}
- Class [ <internal:varnish> class VarnishException extends Exception ] {
+ Class [ <internal:varnish> class VarnishException extends Exception implements Throwable ] {
- Constants [0] {
}
@@ -247,8 +255,8 @@ Extension [ <persistent> extension #153 varnish version 1.2.1 ] {
Property [ <default> protected $line ]
}
- - Methods [9] {
- Method [ <internal:Core, inherits Exception, ctor> <visibility error> method __construct ] {
+ - Methods [10] {
+ Method [ <internal:Core, inherits Exception, ctor> public method __construct ] {
- Parameters [3] {
Parameter #0 [ <optional> $message ]
@@ -257,28 +265,31 @@ Extension [ <persistent> extension #153 varnish version 1.2.1 ] {
}
}
- Method [ <internal:Core, inherits Exception> final public method getMessage ] {
+ Method [ <internal:Core, inherits Exception> public method __wakeup ] {
}
- Method [ <internal:Core, inherits Exception> final public method getCode ] {
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] {
}
- Method [ <internal:Core, inherits Exception> final public method getFile ] {
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] {
}
- Method [ <internal:Core, inherits Exception> final public method getLine ] {
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] {
}
- Method [ <internal:Core, inherits Exception> final public method getTrace ] {
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] {
}
- Method [ <internal:Core, inherits Exception> final public method getPrevious ] {
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] {
}
- Method [ <internal:Core, inherits Exception> final public method getTraceAsString ] {
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] {
}
- Method [ <internal:Core, inherits Exception> public method __toString ] {
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] {
+ }
+
+ Method [ <internal:Core, inherits Exception, prototype Throwable> public method __toString ] {
}
}
}
diff --git a/php-pecl-varnish.spec b/php-pecl-varnish.spec
index 51c93fb..6309a17 100644
--- a/php-pecl-varnish.spec
+++ b/php-pecl-varnish.spec
@@ -27,19 +27,13 @@
Summary: Varnish Cache bindings
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 1.2.1
-Release: 9%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Version: 1.2.2
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: BSD
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
-# Upstream patches
-# http://svn.php.net/viewvc?view=revision&revision=340569
-# http://svn.php.net/viewvc?view=revision&revision=340570
-# http://svn.php.net/viewvc?view=revision&revision=340571
-Patch0: %{pecl_name}-upstream.patch
-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: %{?scl_prefix}php-devel > 5.3
BuildRequires: %{?scl_prefix}php-pear
@@ -58,8 +52,10 @@ Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+%if "%{?scl_prefix}" != "%{?sub_prefix}"
Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
+%endif
%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1}
# Other third party repo stuff
@@ -111,7 +107,6 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
-%patch0 -p3 -b .upstream
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_VARNISH_VERSION/{s/.* "//;s/".*$//;p}' php_varnish.h)
@@ -297,6 +292,9 @@ rm -rf %{buildroot}
%changelog
+* Tue Oct 25 2016 Remi Collet <remi@fedoraproject.org> - 1.2.2-1
+- Update to 1.2.2
+
* Thu Oct 20 2016 Remi Collet <remi@fedoraproject.org> - 1.2.1-9
- add patch for varnish 4.1 (F24) and 5.0 (F25)
diff --git a/varnish-upstream.patch b/varnish-upstream.patch
deleted file mode 100644
index 7330ae3..0000000
--- a/varnish-upstream.patch
+++ /dev/null
@@ -1,368 +0,0 @@
---- pecl/varnish/trunk/config.m4 2016/10/20 10:50:51 340568
-+++ pecl/varnish/trunk/config.m4 2016/10/20 14:14:46 340569
-@@ -22,7 +22,11 @@
-
- PHP_EVAL_INCLINE($VARNISH_INCLUDE)
- PHP_EVAL_LIBLINE($VARNISH_LIBRARY, VARNISH_SHARED_LIBADD)
-- if $PKG_CONFIG varnishapi --atleast-version=4 ; then
-+ if $PKG_CONFIG varnishapi --atleast-version=5 ; then
-+ AC_DEFINE(HAVE_VARNISHAPILIB,5,[ ])
-+ AC_TYPE_UINTPTR_T
-+ AC_TYPE_UINT64_T
-+ elif $PKG_CONFIG varnishapi --atleast-version=4 ; then
- AC_DEFINE(HAVE_VARNISHAPILIB,4,[ ])
- AC_TYPE_UINTPTR_T
- AC_TYPE_UINT64_T
---- pecl/varnish/trunk/varnish_lib.h 2016/10/20 10:50:51 340568
-+++ pecl/varnish/trunk/varnish_lib.h 2016/10/20 14:14:46 340569
-@@ -36,6 +36,9 @@
- #endif
-
- #ifndef PHP_WIN32
-+#if HAVE_VARNISHAPILIB >= 5
-+#include <vapi/vsm.h>
-+#endif
- #if HAVE_VARNISHAPILIB >= 4
- #include <vcli.h>
- #include <vapi/vsl.h>
---- pecl/varnish/trunk/varnish.c 2016/10/20 14:14:46 340569
-+++ pecl/varnish/trunk/varnish.c 2016/10/20 14:19:33 340570
-@@ -279,8 +279,11 @@
- {
- php_info_print_table_start();
- php_info_print_table_header(2, "varnish support", "enabled");
-- php_info_print_table_row(2, "Version", PHP_VARNISH_VERSION);
-+ php_info_print_table_row(2, "Extension version", PHP_VARNISH_VERSION);
- php_info_print_table_row(2, "Revision", "$Id: varnish.c 335937 2015-02-13 20:17:30Z ab $");
-+#ifdef VMOD_ABI_Version
-+ php_info_print_table_row(2, "Varnish version", VMOD_ABI_Version);
-+#endif
- php_info_print_table_end();
-
- /*
---- pecl/varnish/trunk/varnish_lib.h 2016/10/20 14:14:46 340569
-+++ pecl/varnish/trunk/varnish_lib.h 2016/10/20 14:19:33 340570
-@@ -41,6 +41,7 @@
- #endif
- #if HAVE_VARNISHAPILIB >= 4
- #include <vcli.h>
-+#include <vmod_abi.h>
- #include <vapi/vsl.h>
- #include <vapi/vsc.h>
- #else
-Index: config.m4
-===================================================================
---- pecl/varnish/trunk/config.m4 (révision 340569)
-+++ pecl/varnish/trunk/config.m4 (copie de travail)
-@@ -23,16 +23,16 @@
- PHP_EVAL_INCLINE($VARNISH_INCLUDE)
- PHP_EVAL_LIBLINE($VARNISH_LIBRARY, VARNISH_SHARED_LIBADD)
- if $PKG_CONFIG varnishapi --atleast-version=5 ; then
-- AC_DEFINE(HAVE_VARNISHAPILIB,5,[ ])
-- AC_TYPE_UINTPTR_T
-- AC_TYPE_UINT64_T
-+ AC_DEFINE(HAVE_VARNISHAPILIB,50,[ ])
-+ elif $PKG_CONFIG varnishapi --atleast-version=4.1 ; then
-+ AC_DEFINE(HAVE_VARNISHAPILIB,41,[ ])
- elif $PKG_CONFIG varnishapi --atleast-version=4 ; then
-- AC_DEFINE(HAVE_VARNISHAPILIB,4,[ ])
-- AC_TYPE_UINTPTR_T
-- AC_TYPE_UINT64_T
-+ AC_DEFINE(HAVE_VARNISHAPILIB,40,[ ])
- else
-- AC_DEFINE(HAVE_VARNISHAPILIB,3,[ ])
-+ AC_DEFINE(HAVE_VARNISHAPILIB,30,[ ])
- fi
-+ AC_TYPE_UINTPTR_T
-+ AC_TYPE_UINT64_T
- else
- AC_MSG_RESULT(version too old)
- AC_MSG_ERROR(Please reinstall varnish version >= 3.0)
-@@ -46,11 +46,11 @@
- for j in $SEARCH_FOR ; do
- if test -r $i/include/varnish/$j; then
- VARNISH_INCDIR=$i/include/varnish
-- VARNISH_LIBDIR=$i/lib
-+ VARNISH_LIBDIR=$i/$PHP_LIBDIR
- break
- elif test -r $i/include/$j; then
- VARNISH_INCDIR=$i/include
-- VARNISH_LIBDIR=$i/lib
-+ VARNISH_LIBDIR=$i/$PHP_LIBDIR
- break
- fi
- done
-@@ -75,19 +75,22 @@
-
- if test -f $VARNISH_INCDIR/varnishapi.h; then
- dnl this is 3.x or earlier
-- AC_DEFINE(HAVE_VARNISHAPILIB,1,[ ])
-+ AC_DEFINE(HAVE_VARNISHAPILIB,30,[ ])
- AC_CHECK_HEADER([$VARNISH_INCDIR/varnishapi.h], [], AC_MSG_ERROR('varnishapi.h' header not found))
- AC_CHECK_HEADER([$VARNISH_INCDIR/vsl.h], [], AC_MSG_ERROR('vsl.h' header not found))
-+ elif test -f $VARNISH_INCDIR/vapi/vsm.h; then
-+ dnl this is approx at least 4.1.x, for later will probably have to check for some specific stuff
-+ AC_DEFINE(HAVE_VARNISHAPILIB,41,[ ])
- else
- dnl this is approx at least 4.x, for later will probably have to check for some specific stuff
-- AC_DEFINE(HAVE_VARNISHAPILIB,4,[ ])
-+ AC_DEFINE(HAVE_VARNISHAPILIB,40,[ ])
- dnl there's an issue with two lines below, it might be because STLM macro isn't defined,
- dnl so the compiler decides them to be unusable
- dnl AC_CHECK_HEADER([$VARNISH_INCDIR/tbl/vsl_tags.h], [], AC_MSG_ERROR('tbl/vsl_tags.h' header not found))
- dnl AC_CHECK_HEADER([$VARNISH_INCDIR/vapi/vsl.h], [], AC_MSG_ERROR('vapi/vsl.h' header not found))
-- AC_TYPE_UINTPTR_T
-- AC_TYPE_UINT64_T
- fi
-+ AC_TYPE_UINTPTR_T
-+ AC_TYPE_UINT64_T
- ],[
- AC_MSG_ERROR([wrong varnishapi lib version or lib not found])
- ],[
-Index: log.c
-===================================================================
---- pecl/varnish/trunk/log.c (révision 340568)
-+++ pecl/varnish/trunk/log.c (copie de travail)
-@@ -140,7 +140,7 @@
- * Varnish admin constructor */
- PHP_METHOD(VarnishLog, __construct)
- {
--#if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB >= 4
-+#if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB >= 40
- php_varnish_throw_win_unimpl_exception("VarnishLog functionality isn't available for Varnish >= 4" TSRMLS_CC);
- return;
- #elif !defined(PHP_WIN32)
-@@ -212,7 +212,7 @@
- }
- /* }}} */
-
--#if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB < 4
-+#if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB < 40
- /* {{{ proto array VarnishLog::getLine(void)
- * Get the next log entry */
- PHP_METHOD(VarnishLog, getLine)
-Index: php_varnish.h
-===================================================================
---- pecl/varnish/trunk/php_varnish.h (révision 340568)
-+++ pecl/varnish/trunk/php_varnish.h (copie de travail)
-@@ -82,12 +82,12 @@
- PHP_METHOD(VarnishAdmin, disconnect);
-
- PHP_METHOD(VarnishStat, __construct);
--#if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB < 4
-+#if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB < 40
- PHP_METHOD(VarnishStat, getSnapshot);
- #endif
-
- PHP_METHOD(VarnishLog, __construct);
--#if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB < 4
-+#if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB < 40
- PHP_METHOD(VarnishLog, getLine);
- PHP_METHOD(VarnishLog, getTagName);
- #endif
-Index: stat.c
-===================================================================
---- pecl/varnish/trunk/stat.c (révision 340568)
-+++ pecl/varnish/trunk/stat.c (copie de travail)
-@@ -129,7 +129,7 @@
- * Varnish admin constructor */
- PHP_METHOD(VarnishStat, __construct)
- {
--#if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB >= 4
-+#if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB >= 40
- php_varnish_throw_win_unimpl_exception("VarnishStat functionality isn't available for Varnish >= 4" TSRMLS_CC);
- return;
- #elif !defined(PHP_WIN32)
-@@ -181,7 +181,7 @@
- }
- /* }}} */
-
--#if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB < 4
-+#if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB < 40
- /* {{{ proto array VarnishStat::getSnapshot(void)
- Get a statistics snapshot */
- PHP_METHOD(VarnishStat, getSnapshot)
-Index: varnish.c
-===================================================================
---- pecl/varnish/trunk/varnish.c (révision 340570)
-+++ pecl/varnish/trunk/varnish.c (copie de travail)
-@@ -98,7 +98,7 @@
- /* {{{ VarnishStat_methods{} */
- const zend_function_entry VarnishStat_methods[] = {
- PHP_ME(VarnishStat, __construct, NULL, ZEND_ACC_PUBLIC)
--#if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB < 4
-+#if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB < 40
- PHP_ME(VarnishStat, getSnapshot, NULL, ZEND_ACC_PUBLIC)
- #endif
- {NULL, NULL, NULL}
-@@ -108,7 +108,7 @@
- /* {{{ VarnishLog_methods{} */
- const zend_function_entry VarnishLog_methods[] = {
- PHP_ME(VarnishLog, __construct, NULL, ZEND_ACC_PUBLIC)
--#if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB < 4
-+#if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB < 40
- PHP_ME(VarnishLog, getLine, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(VarnishLog, getTagName, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
- #endif
-@@ -215,7 +215,7 @@
-
- /* log is not working on windows at the time*/
- #ifndef PHP_WIN32
--#if HAVE_VARNISHAPILIB >= 4
-+#if HAVE_VARNISHAPILIB >= 40
- #define SLTM(name, flags, shortdesc, longdesc) \
- zend_declare_class_constant_long(VarnishLog_ce, "TAG_"#name, strlen("TAG_"#name), SLT_##name TSRMLS_CC);
- #include "tbl/vsl_tags.h"
-Index: varnish_lib.c
-===================================================================
---- pecl/varnish/trunk/varnish_lib.c (révision 340568)
-+++ pecl/varnish/trunk/varnish_lib.c (copie de travail)
-@@ -348,12 +348,12 @@
- int sock = -1, j;
- struct VSM_data *vsd;
- char *t_arg, *t_start, *p, tmp_addr[41];
--#if HAVE_VARNISHAPILIB >= 4
-+#if HAVE_VARNISHAPILIB >= 40
- struct VSM_fantom vt;
- #endif
-
- vsd = VSM_New();
--#if HAVE_VARNISHAPILIB >= 4
-+#if HAVE_VARNISHAPILIB >= 40
- if (VSM_n_Arg(vsd, ident) > 0) {
- if (VSM_Open(vsd)) {
- #else
-@@ -363,7 +363,7 @@
- zend_throw_exception_ex(
- VarnishException_ce,
- PHP_VARNISH_SHM_EXCEPTION TSRMLS_CC,
--#if HAVE_VARNISHAPILIB >= 4
-+#if HAVE_VARNISHAPILIB >= 40
- VSM_Error(vsd)
- #else
- "Could not open shared memory"
-@@ -372,7 +372,7 @@
- return sock;
- }
-
--#if HAVE_VARNISHAPILIB >= 4
-+#if HAVE_VARNISHAPILIB >= 40
- if (!VSM_Get(vsd, &vt, "Arg", "-T", "")) {
- #else
- p = VSM_Find_Chunk(vsd, "Arg", "-T", "", NULL);
-@@ -381,7 +381,7 @@
- zend_throw_exception_ex(
- VarnishException_ce,
- PHP_VARNISH_SHM_EXCEPTION TSRMLS_CC,
--#if HAVE_VARNISHAPILIB >= 4
-+#if HAVE_VARNISHAPILIB >= 40
- VSM_Error(vsd)
- #else
- "No address and port found in the shared memory"
-@@ -390,7 +390,7 @@
- VSM_Delete(vsd);
- return sock;
- }
--#if HAVE_VARNISHAPILIB >= 4
-+#if HAVE_VARNISHAPILIB >= 40
- t_start = t_arg = estrdup(vt.b);
- #else
- t_start = t_arg = estrdup(p);
-@@ -406,7 +406,7 @@
- return sock;
- }
-
--#if HAVE_VARNISHAPILIB >= 4
-+#if HAVE_VARNISHAPILIB >= 40
- VSM_Delete(vsd);
- #endif
-
-@@ -528,7 +528,7 @@
- char *s_arg, *answer = NULL;
- int fd;
- char buf[CLI_AUTH_RESPONSE_LEN + 1];
--#if HAVE_VARNISHAPILIB >= 4
-+#if HAVE_VARNISHAPILIB >= 40
- struct VSM_fantom vt;
- #else
- char *p;
-@@ -538,7 +538,7 @@
- if (PHP_VARNISH_STATUS_AUTH == *status) {
- vsd = VSM_New();
- if (VSM_n_Arg(vsd, ident)) {
--#if HAVE_VARNISHAPILIB >= 4
-+#if HAVE_VARNISHAPILIB >= 40
- if (VSM_Open(vsd)) {
- #else
- if (VSM_Open(vsd, 1)) {
-@@ -551,7 +551,7 @@
- return sock;
- }
-
--#if HAVE_VARNISHAPILIB >= 4
-+#if HAVE_VARNISHAPILIB >= 40
- if (VSM_Get(vsd, &vt, "Arg", "-S", "")) {
- s_arg = estrdup(vt.b);
- #else
-@@ -570,7 +570,7 @@
- return 0;
- }
- efree(s_arg);
--#if HAVE_VARNISHAPILIB >= 4
-+#if HAVE_VARNISHAPILIB >= 40
- } else {
- VSM_Delete(vsd);
- return 0;
-@@ -775,7 +775,7 @@
- }/*}}}*/
-
- #ifndef PHP_WIN32
--#if HAVE_VARNISHAPILIB < 4
-+#if HAVE_VARNISHAPILIB < 40
- static int
- php_varnish_snap_stats_cb(void *priv, const struct VSC_point const *pt)
- {/*{{{*/
-@@ -783,7 +783,7 @@
- int f0, f1;
- zval *storage, *current;
- char buf0[128];
--#if HAVE_VARNISHAPILIB >= 4
-+#if HAVE_VARNISHAPILIB >= 40
- const char *type = pt->section->type;
- const char *ident = pt->section->ident;
- const char *name = pt->desc->name;
-@@ -812,7 +812,7 @@
- }/*}}}*/
- #endif
-
--#if HAVE_VARNISHAPILIB >= 4
-+#if HAVE_VARNISHAPILIB >= 40
- int
- php_varnish_snap_stats(zval *storage, const char *ident TSRMLS_DC)
- {/*{{{*/
-@@ -845,7 +845,7 @@
- }/*}}}*/
- #endif
-
--#if HAVE_VARNISHAPILIB >= 4
-+#if HAVE_VARNISHAPILIB >= 40
- int
- php_varnish_get_log(const struct VSM_data *vd, zval *line TSRMLS_DC)
- {/*{{{*/
-Index: varnish_lib.h
-===================================================================
---- pecl/varnish/trunk/varnish_lib.h (révision 340570)
-+++ pecl/varnish/trunk/varnish_lib.h (copie de travail)
-@@ -36,10 +36,10 @@
- #endif
-
- #ifndef PHP_WIN32
--#if HAVE_VARNISHAPILIB >= 5
-+#if HAVE_VARNISHAPILIB >= 41
- #include <vapi/vsm.h>
- #endif
--#if HAVE_VARNISHAPILIB >= 4
-+#if HAVE_VARNISHAPILIB >= 40
- #include <vcli.h>
- #include <vmod_abi.h>
- #include <vapi/vsl.h>