diff --git a/ext/phar/dirstream.h b/ext/phar/dirstream.h index 4859c69fbe0..4debfecde41 100644 --- a/ext/phar/dirstream.h +++ b/ext/phar/dirstream.h @@ -22,6 +22,8 @@ int phar_wrapper_mkdir(php_stream_wrapper *wrapper, const char *url_from, int mo int phar_wrapper_rmdir(php_stream_wrapper *wrapper, const char *url, int options, php_stream_context *context); #ifdef PHAR_DIRSTREAM +#include "ext/standard/url.h" + php_url* phar_parse_url(php_stream_wrapper *wrapper, const char *filename, const char *mode, int options); /* directory handlers */ diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c index 53851abee0d..f1b2b0eba1e 100644 --- a/ext/phar/func_interceptors.c +++ b/ext/phar/func_interceptors.c @@ -17,6 +17,8 @@ */ #include "phar_internal.h" +#include "ext/standard/php_filestat.h" +#include "ext/standard/file.h" /* For php_le_stream_context() */ PHP_FUNCTION(phar_opendir) /* {{{ */ { diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 540e9302fb9..99767468ee7 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -19,9 +19,14 @@ #define PHAR_MAIN 1 #include "phar_internal.h" +#include "php_phar.h" #include "SAPI.h" #include "func_interceptors.h" +#include "ext/standard/crc32.h" #include "ext/standard/php_var.h" +#include "ext/standard/php_string.h" /* For php_stristr() */ +#include "ext/standard/info.h" +#include "zend_smart_str.h" static void destroy_phar_data(zval *zv); diff --git a/ext/phar/phar_internal.h b/ext/phar/phar_internal.h index 1226de19154..eb836ac691a 100644 --- a/ext/phar/phar_internal.h +++ b/ext/phar/phar_internal.h @@ -24,39 +24,9 @@ #include #include "php.h" #include "tar.h" -#include "php_ini.h" -#include "zend_constants.h" -#include "zend_execute.h" -#include "zend_exceptions.h" +#include "pharzip.h" #include "zend_hash.h" -#include "zend_interfaces.h" -#include "zend_operators.h" -#include "zend_sort.h" -#include "zend_vm.h" -#include "zend_smart_str.h" -#include "main/php_streams.h" -#include "main/streams/php_stream_plain_wrapper.h" -#include "main/SAPI.h" -#include "main/php_main.h" -#include "main/php_open_temporary_file.h" -#include "ext/standard/info.h" -#include "ext/standard/basic_functions.h" -#include "ext/standard/file.h" -#include "ext/standard/php_string.h" -#include "ext/standard/url.h" -#include "ext/standard/crc32.h" -#include "ext/standard/md5.h" -#include "ext/standard/sha1.h" -#include "ext/standard/php_var.h" -#include "ext/standard/php_versioning.h" -#include "Zend/zend_virtual_cwd.h" -#include "ext/spl/spl_array.h" #include "ext/spl/spl_directory.h" -#include "ext/spl/spl_exceptions.h" -#include "ext/spl/spl_iterators.h" -#include "php_phar.h" -#include "ext/hash/php_hash.h" -#include "ext/hash/php_hash_sha.h" /* PHP_ because this is public information via MINFO */ #define PHP_PHAR_API_VERSION "1.1.1" @@ -193,8 +163,6 @@ ZEND_EXTERN_MODULE_GLOBALS(phar) ZEND_TSRMLS_CACHE_EXTERN() #endif -#include "pharzip.h" - typedef union _phar_archive_object phar_archive_object; typedef union _phar_entry_object phar_entry_object; diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 5232649d7fe..e23a3eabc2a 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -20,6 +20,14 @@ #include "phar_internal.h" #include "func_interceptors.h" #include "phar_object_arginfo.h" +#include "ext/spl/spl_array.h" +#include "ext/spl/spl_exceptions.h" +#include "ext/spl/spl_iterators.h" +#include "ext/standard/php_var.h" +#include "main/SAPI.h" +#include "zend_exceptions.h" +#include "zend_interfaces.h" +#include "zend_exceptions.h" static zend_class_entry *phar_ce_archive; static zend_class_entry *phar_ce_data; diff --git a/ext/phar/stream.h b/ext/phar/stream.h index 732da3a0b3f..ce75b70dcba 100644 --- a/ext/phar/stream.h +++ b/ext/phar/stream.h @@ -18,6 +18,7 @@ */ BEGIN_EXTERN_C() +#include "ext/standard/url.h" php_url* phar_parse_url(php_stream_wrapper *wrapper, const char *filename, const char *mode, int options); void phar_entry_remove(phar_entry_data *idata, char **error); diff --git a/ext/phar/tar.c b/ext/phar/tar.c index 722a34b2300..44a8e127e23 100644 --- a/ext/phar/tar.c +++ b/ext/phar/tar.c @@ -18,6 +18,7 @@ */ #include "phar_internal.h" +#include "ext/standard/php_string.h" /* For php_stristr() */ static uint32_t phar_tar_number(const char *buf, size_t len) /* {{{ */ { diff --git a/ext/phar/util.c b/ext/phar/util.c index 0db5b1ae76f..e49e15aee9c 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -19,7 +19,10 @@ */ #include "phar_internal.h" +#include "php_phar.h" +#include "ext/hash/php_hash.h" /* Needed for PHP_HASH_API in ext/hash/php_hash_sha.h */ #include "ext/hash/php_hash_sha.h" +#include "ext/standard/md5.h" #ifdef PHAR_HAVE_OPENSSL /* OpenSSL includes */ diff --git a/ext/phar/zip.c b/ext/phar/zip.c index 9faf6054aff..70cdfc9cc1b 100644 --- a/ext/phar/zip.c +++ b/ext/phar/zip.c @@ -17,6 +17,8 @@ */ #include "phar_internal.h" +#include "ext/standard/crc32.h" +#include "ext/standard/php_string.h" /* For php_stristr() */ #define PHAR_GET_16(var) ((uint16_t)((((uint16_t)var[0]) & 0xff) | \ (((uint16_t)var[1]) & 0xff) << 8))