From: Michael Wallner Date: Wed, 9 Nov 2005 12:35:33 +0000 (+0000) Subject: - SPL doesn't install its headers X-Git-Tag: RELEASE_0_18_0~20 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=160400377eb70b98b216cd91aadf9243338d3fd5;p=m6w6%2Fext-http - SPL doesn't install its headers - %zu seems to be right for size_t arguments to *printf --- diff --git a/http_message_object.c b/http_message_object.c index e69010c..3107439 100644 --- a/http_message_object.c +++ b/http_message_object.c @@ -32,7 +32,8 @@ #ifndef WONKY # include "zend_interfaces.h" # if defined(HAVE_SPL) -# include "ext/spl/spl_array.h" +/* SPL doesn't install its headers */ +extern PHPAPI zend_class_entry *spl_ce_Countable; # endif #endif diff --git a/http_requestpool_object.c b/http_requestpool_object.c index 06733d2..263be82 100644 --- a/http_requestpool_object.c +++ b/http_requestpool_object.c @@ -29,8 +29,8 @@ #include "zend_interfaces.h" #if defined(HAVE_SPL) && !defined(WONKY) -# include "ext/spl/spl_array.h" -# include "ext/spl/spl_iterators.h" +/* SPL doesn't install its headers */ +extern PHPAPI zend_class_entry *spl_ce_Countable; #endif #ifdef PHP_WIN32 @@ -110,7 +110,7 @@ PHP_MINIT_FUNCTION(http_requestpool_object) { HTTP_REGISTER_CLASS_EX(HttpRequestPool, http_requestpool_object, NULL, 0); #if defined(HAVE_SPL) && !defined(WONKY) - zend_class_implements(http_requestpool_object_ce TSRMLS_CC, 2, spl_ce_Countable, spl_ce_Iterator); + zend_class_implements(http_requestpool_object_ce TSRMLS_CC, 2, spl_ce_Countable, zend_ce_iterator); #else zend_class_implements(http_requestpool_object_ce TSRMLS_CC, 1, zend_ce_iterator); #endif diff --git a/http_send_api.c b/http_send_api.c index e5a66ce..badfaf7 100644 --- a/http_send_api.c +++ b/http_send_api.c @@ -373,7 +373,7 @@ PHP_HTTP_API STATUS _http_send_ex(const void *data_ptr, size_t data_size, http_s #define HTTP_RANGE_PREFACE \ HTTP_CRLF "--%s" \ HTTP_CRLF "Content-Type: %s" \ - HTTP_CRLF "Content-Range: bytes %ld-%ld/%lu" \ + HTTP_CRLF "Content-Range: bytes %ld-%ld/%zu" \ HTTP_CRLF HTTP_CRLF preface_len = snprintf(preface_str, lenof(preface_str), HTTP_RANGE_PREFACE, boundary_str, content_type, Z_LVAL_PP(begin), Z_LVAL_PP(end), data_size);