- SPL doesn't install its headers
authorMichael Wallner <mike@php.net>
Wed, 9 Nov 2005 12:35:33 +0000 (12:35 +0000)
committerMichael Wallner <mike@php.net>
Wed, 9 Nov 2005 12:35:33 +0000 (12:35 +0000)
- %zu seems to be right for size_t arguments to *printf

http_message_object.c
http_requestpool_object.c
http_send_api.c

index e69010c9b694407602d524bf7ab39aff51af5e2c..310743981e8e523ef44def9087bb78d584e10f2e 100644 (file)
@@ -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
 
index 06733d2adbd918090ddef4f2559217608cead609..263be82524f24a559b01931c61b79304619ff122 100644 (file)
@@ -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
index e5a66ced540e669c4721df541e0c631ad56e13c0..badfaf702c20e3c7820dc16b570951ed404ae741 100644 (file)
@@ -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);