diff --git a/Zend/Optimizer/zend_ssa.h b/Zend/Optimizer/zend_ssa.h index 9fde352c79cc1..ce33a3732fee8 100644 --- a/Zend/Optimizer/zend_ssa.h +++ b/Zend/Optimizer/zend_ssa.h @@ -21,6 +21,7 @@ #include "zend_optimizer.h" #include "zend_cfg.h" +#include "zend_result.h" typedef struct _zend_ssa_range { zend_long min; diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h index 578d4c78cc5c5..95581cf2814c1 100644 --- a/Zend/zend_alloc.h +++ b/Zend/zend_alloc.h @@ -21,6 +21,8 @@ #ifndef ZEND_ALLOC_H #define ZEND_ALLOC_H +#include "zend_result.h" + #include #include "../TSRM/TSRM.h" diff --git a/Zend/zend_builtin_functions.h b/Zend/zend_builtin_functions.h index a49dab1b46838..b037891299e14 100644 --- a/Zend/zend_builtin_functions.h +++ b/Zend/zend_builtin_functions.h @@ -20,6 +20,8 @@ #ifndef ZEND_BUILTIN_FUNCTIONS_H #define ZEND_BUILTIN_FUNCTIONS_H +#include "zend_result.h" + zend_result zend_startup_builtin_functions(void); BEGIN_EXTERN_C() diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h index f61b5ecb304e2..0c701c3326ca0 100644 --- a/Zend/zend_exceptions.h +++ b/Zend/zend_exceptions.h @@ -22,6 +22,8 @@ #ifndef ZEND_EXCEPTIONS_H #define ZEND_EXCEPTIONS_H +#include "zend_result.h" + BEGIN_EXTERN_C() extern ZEND_API zend_class_entry *zend_ce_throwable; diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h index 14ba9054d9b6a..50ac657bb803e 100644 --- a/Zend/zend_extensions.h +++ b/Zend/zend_extensions.h @@ -22,6 +22,7 @@ #include "zend_compile.h" #include "zend_build.h" +#include "zend_result.h" /* The constants below are derived from ext/opcache/ZendAccelerator.h diff --git a/Zend/zend_highlight.h b/Zend/zend_highlight.h index e54a339ec4bc3..dd48ae1f39782 100644 --- a/Zend/zend_highlight.h +++ b/Zend/zend_highlight.h @@ -20,6 +20,8 @@ #ifndef ZEND_HIGHLIGHT_H #define ZEND_HIGHLIGHT_H +#include "zend_result.h" + #define HL_COMMENT_COLOR "#FF8000" /* orange */ #define HL_DEFAULT_COLOR "#0000BB" /* blue */ #define HL_HTML_COLOR "#000000" /* black */ diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h index 1618953835339..deb61dae370ac 100644 --- a/Zend/zend_ini.h +++ b/Zend/zend_ini.h @@ -19,6 +19,8 @@ #ifndef ZEND_INI_H #define ZEND_INI_H +#include "zend_result.h" + #define ZEND_INI_USER (1<<0) #define ZEND_INI_PERDIR (1<<1) #define ZEND_INI_SYSTEM (1<<2) diff --git a/Zend/zend_modules.h b/Zend/zend_modules.h index e1db8fdb59791..e32fab935bfb5 100644 --- a/Zend/zend_modules.h +++ b/Zend/zend_modules.h @@ -23,6 +23,7 @@ #include "zend.h" #include "zend_compile.h" #include "zend_build.h" +#include "zend_result.h" #define INIT_FUNC_ARGS int type, int module_number #define INIT_FUNC_ARGS_PASSTHRU type, module_number diff --git a/Zend/zend_multibyte.h b/Zend/zend_multibyte.h index 5466840cd900a..521780129ba10 100644 --- a/Zend/zend_multibyte.h +++ b/Zend/zend_multibyte.h @@ -20,6 +20,8 @@ #ifndef ZEND_MULTIBYTE_H #define ZEND_MULTIBYTE_H +#include "zend_result.h" + typedef struct _zend_encoding zend_encoding; typedef size_t (*zend_encoding_filter)(unsigned char **str, size_t *str_length, const unsigned char *buf, size_t length); diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 506c27fc50eb3..922ab92385899 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -21,6 +21,8 @@ #ifndef ZEND_OPERATORS_H #define ZEND_OPERATORS_H +#include "zend_result.h" + #include #include #include diff --git a/Zend/zend_result.h b/Zend/zend_result.h new file mode 100644 index 0000000000000..8e60fc68b6f68 --- /dev/null +++ b/Zend/zend_result.h @@ -0,0 +1,27 @@ +/* + +----------------------------------------------------------------------+ + | Zend Engine | + +----------------------------------------------------------------------+ + | Copyright (c) Zend Technologies Ltd. (http://www.zend.com) | + +----------------------------------------------------------------------+ + | This source file is subject to version 2.00 of the Zend license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.zend.com/license/2_00.txt. | + | If you did not receive a copy of the Zend license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@zend.com so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ +*/ + +#ifndef ZEND_RESULT_H +#define ZEND_RESULT_H + +typedef enum { + SUCCESS = 0, + FAILURE = -1, /* this MUST stay a negative number, or it may affect functions! */ +} ZEND_RESULT_CODE; + +typedef ZEND_RESULT_CODE zend_result; + +#endif /* ZEND_RESULT_H */ diff --git a/Zend/zend_stream.h b/Zend/zend_stream.h index 047719e175a04..39cec8e7ce1a8 100644 --- a/Zend/zend_stream.h +++ b/Zend/zend_stream.h @@ -22,6 +22,8 @@ #ifndef ZEND_STREAM_H #define ZEND_STREAM_H +#include "zend_result.h" + #include #include diff --git a/Zend/zend_system_id.h b/Zend/zend_system_id.h index 60514e15a0976..3089d0f6eabec 100644 --- a/Zend/zend_system_id.h +++ b/Zend/zend_system_id.h @@ -17,6 +17,8 @@ #ifndef ZEND_SYSTEM_ID_H #define ZEND_SYSTEM_ID_H +#include "zend_result.h" + BEGIN_EXTERN_C() /* True global; Write-only during MINIT/startup */ extern ZEND_API char zend_system_id[32]; diff --git a/Zend/zend_types.h b/Zend/zend_types.h index e6505d8b62ad1..dc298148b5c3e 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -24,6 +24,8 @@ #include "zend_portability.h" #include "zend_long.h" +#include "zend_result.h" + #include #ifdef __SSE2__ @@ -50,13 +52,6 @@ typedef bool zend_bool; typedef unsigned char zend_uchar; -typedef enum { - SUCCESS = 0, - FAILURE = -1, /* this MUST stay a negative number, or it may affect functions! */ -} ZEND_RESULT_CODE; - -typedef ZEND_RESULT_CODE zend_result; - #ifdef ZEND_ENABLE_ZVAL_LONG64 # ifdef ZEND_WIN32 # define ZEND_SIZE_MAX _UI64_MAX