diff --git a/Zend/zend_smart_str.c b/Zend/zend_smart_str.c index 5132043c60e..689989059c2 100644 --- a/Zend/zend_smart_str.c +++ b/Zend/zend_smart_str.c @@ -14,9 +14,11 @@ +----------------------------------------------------------------------+ */ -#include #include "zend_smart_str.h" #include "zend_smart_string.h" +#include "zend_globals_macros.h" // for EG() +#include "zend_globals.h" // struct _zend_executor_globals +#include "zend_strtod.h" // for zend_gcvt() #define SMART_STR_OVERHEAD (ZEND_MM_OVERHEAD + _ZSTR_HEADER_SIZE + 1) #define SMART_STR_START_SIZE 256 diff --git a/Zend/zend_smart_str.h b/Zend/zend_smart_str.h index e271835e41d..ac5b18db97e 100644 --- a/Zend/zend_smart_str.h +++ b/Zend/zend_smart_str.h @@ -17,10 +17,15 @@ #ifndef ZEND_SMART_STR_H #define ZEND_SMART_STR_H -#include -#include "zend_globals.h" #include "zend_smart_str_public.h" +#include "zend_operators.h" // for zend_print_long_to_buf() +#include "zend_portability.h" // for BEGIN_EXTERN_C +#include "zend_string.h" + +// forward declarations +typedef struct _zval_struct zval; + BEGIN_EXTERN_C() ZEND_API void ZEND_FASTCALL smart_str_erealloc(smart_str *str, size_t len); diff --git a/Zend/zend_smart_str_public.h b/Zend/zend_smart_str_public.h index e81a6839b3b..84fc3758ae7 100644 --- a/Zend/zend_smart_str_public.h +++ b/Zend/zend_smart_str_public.h @@ -17,6 +17,11 @@ #ifndef ZEND_SMART_STR_PUBLIC_H #define ZEND_SMART_STR_PUBLIC_H +#include // for size_t + +// forward declarations +typedef struct _zend_string zend_string; + typedef struct { /** See smart_str_extract() */ zend_string *s; diff --git a/Zend/zend_smart_string.h b/Zend/zend_smart_string.h index 8149b29fb33..08eb6a8eced 100644 --- a/Zend/zend_smart_string.h +++ b/Zend/zend_smart_string.h @@ -20,8 +20,9 @@ #include "zend_smart_string_public.h" -#include -#include +#include "zend_alloc.h" // for pefree() +#include "zend_operators.h" // for zend_print_long_to_buf() +#include "zend_portability.h" // for ZEND_FASTCALL /* wrapper */ diff --git a/Zend/zend_smart_string_public.h b/Zend/zend_smart_string_public.h index 543e1d37a4e..e61bdd2d36f 100644 --- a/Zend/zend_smart_string_public.h +++ b/Zend/zend_smart_string_public.h @@ -18,7 +18,7 @@ #ifndef PHP_SMART_STRING_PUBLIC_H #define PHP_SMART_STRING_PUBLIC_H -#include +#include // for size_t typedef struct { char *c;