cvs: ZendEngine2(PHP_5_3) / zend_build.h zend_extensions.c zend_extensions.h zend_modules.h php-src/ext/standard dl.c info.c php-src/win32/build config.w32
[email protected] ("Stanislav Malyshev") Sat, 17 Jan 2009 02:05:14 -0000
| Newsgroups | php.zend-engine.cvs |
|---|---|
| Message-ID | <cvsstas1232157914@cvsserver> |
stas Sat Jan 17 02:05:14 2009 UTC
Added files: (Branch: PHP_5_3)
/ZendEngine2 zend_build.h
Modified files:
/php-src/win32/build config.w32
/php-src/ext/standard dl.c info.c
/ZendEngine2 zend_extensions.c zend_extensions.h zend_modules.h
Log:
Build IDs
stas-20090117020514.txt
(text/plain, 9.6 KB)
http://cvs.php.net/viewvc.cgi/php-src/win32/build/config.w32?r1=1.40.2.8.2.10.2.41&r2=1.40.2.8.2.10.2.42&diff_format=u
Index: php-src/win32/build/config.w32
diff -u php-src/win32/build/config.w32:1.40.2.8.2.10.2.41 php-src/win32/build/config.w32:1.40.2.8.2.10.2.42
--- php-src/win32/build/config.w32:1.40.2.8.2.10.2.41 Tue Jan 6 20:50:57 2009
+++ php-src/win32/build/config.w32 Sat Jan 17 02:05:13 2009
@@ -1,5 +1,5 @@
// vim:ft=javascript
-// $Id: config.w32,v 1.40.2.8.2.10.2.41 2009/01/06 20:50:57 pajoye Exp $
+// $Id: config.w32,v 1.40.2.8.2.10.2.42 2009/01/17 02:05:13 stas Exp $
// "Master" config file; think of it as a configure.in
// equivalent.
@@ -20,6 +20,7 @@
STDOUT.WriteLine(" Detected compiler " + VC_VERSIONS[VCVERS]);
AC_DEFINE('COMPILER', VC_VERSIONS[VCVERS], "Detected compiler version");
DEFINE("PHP_COMPILER_SHORT", VC_VERSIONS_SHORT[VCVERS]);
+AC_DEFINE('PHP_COMPILER_ID', VC_VERSIONS_SHORT[VCVERS], "Compiler compatibility ID");
// do we use x64 or 80x86 version of compiler?
X64 = probe_binary(CL, 64);
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dl.c?r1=1.106.2.1.2.5.2.10&r2=1.106.2.1.2.5.2.11&diff_format=u
Index: php-src/ext/standard/dl.c
diff -u php-src/ext/standard/dl.c:1.106.2.1.2.5.2.10 php-src/ext/standard/dl.c:1.106.2.1.2.5.2.11
--- php-src/ext/standard/dl.c:1.106.2.1.2.5.2.10 Wed Jan 7 13:02:43 2009
+++ php-src/ext/standard/dl.c Sat Jan 17 02:05:13 2009
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dl.c,v 1.106.2.1.2.5.2.10 2009/01/07 13:02:43 pajoye Exp $ */
+/* $Id: dl.c,v 1.106.2.1.2.5.2.11 2009/01/17 02:05:13 stas Exp $ */
#include "php.h"
#include "dl.h"
@@ -169,10 +169,7 @@
return FAILURE;
}
module_entry = get_module();
- if ((module_entry->zend_debug != ZEND_DEBUG) ||
- (module_entry->zts != USING_ZTS) ||
- (module_entry->zend_api != ZEND_MODULE_API_NO)
- ) {
+ if (module_entry->zend_api != ZEND_MODULE_API_NO) {
/* Check for pre-4.1.0 module which has a slightly different module_entry structure :( */
struct pre_4_1_0_module_entry {
char *name;
@@ -196,32 +193,36 @@
const char *name;
int zend_api;
- unsigned char zend_debug, zts;
if ((((struct pre_4_1_0_module_entry *)module_entry)->zend_api > 20000000) &&
(((struct pre_4_1_0_module_entry *)module_entry)->zend_api < 20010901)
) {
name = ((struct pre_4_1_0_module_entry *)module_entry)->name;
zend_api = ((struct pre_4_1_0_module_entry *)module_entry)->zend_api;
- zend_debug = ((struct pre_4_1_0_module_entry *)module_entry)->zend_debug;
- zts = ((struct pre_4_1_0_module_entry *)module_entry)->zts;
} else {
name = module_entry->name;
zend_api = module_entry->zend_api;
- zend_debug = module_entry->zend_debug;
- zts = module_entry->zts;
}
php_error_docref(NULL TSRMLS_CC, error_type,
"%s: Unable to initialize module\n"
- "Module compiled with module API=%d, debug=%d, thread-safety=%d\n"
- "PHP compiled with module API=%d, debug=%d, thread-safety=%d\n"
+ "Module compiled with module API=%d\n"
+ "PHP compiled with module API=%d\n"
"These options need to match\n",
- name, zend_api, zend_debug, zts,
- ZEND_MODULE_API_NO, ZEND_DEBUG, USING_ZTS);
+ name, zend_api, ZEND_MODULE_API_NO);
DL_UNLOAD(handle);
return FAILURE;
}
+ if(strcmp(module_entry->build_id, ZEND_MODULE_BUILD_ID)) {
+ php_error_docref(NULL TSRMLS_CC, error_type,
+ "%s: Unable to initialize module\n"
+ "Module compiled with build ID=%s\n"
+ "PHP compiled with build ID=%s\n"
+ "These options need to match\n",
+ module_entry->name, module_entry->build_id, ZEND_MODULE_BUILD_ID);
+ DL_UNLOAD(handle);
+ return FAILURE;
+ }
module_entry->type = type;
module_entry->module_number = zend_next_free_module();
module_entry->handle = handle;
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.249.2.10.2.14.2.22&r2=1.249.2.10.2.14.2.23&diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.249.2.10.2.14.2.22 php-src/ext/standard/info.c:1.249.2.10.2.14.2.23
--- php-src/ext/standard/info.c:1.249.2.10.2.14.2.22 Sun Jan 4 15:19:57 2009
+++ php-src/ext/standard/info.c Sat Jan 17 02:05:13 2009
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: info.c,v 1.249.2.10.2.14.2.22 2009/01/04 15:19:57 tony2001 Exp $ */
+/* $Id: info.c,v 1.249.2.10.2.14.2.23 2009/01/17 02:05:13 stas Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -696,6 +696,9 @@
snprintf(temp_api, sizeof(temp_api), "%d", ZEND_EXTENSION_API_NO);
php_info_print_table_row(2, "Zend Extension", temp_api);
+ php_info_print_table_row(2, "Zend Extension Build", ZEND_EXTENSION_BUILD_ID);
+ php_info_print_table_row(2, "PHP Extension Build", ZEND_MODULE_BUILD_ID);
+
#if ZEND_DEBUG
php_info_print_table_row(2, "Debug Build", "yes" );
#else
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_extensions.c?r1=1.48.2.1.2.3.2.3&r2=1.48.2.1.2.3.2.4&diff_format=u
Index: ZendEngine2/zend_extensions.c
diff -u ZendEngine2/zend_extensions.c:1.48.2.1.2.3.2.3 ZendEngine2/zend_extensions.c:1.48.2.1.2.3.2.4
--- ZendEngine2/zend_extensions.c:1.48.2.1.2.3.2.3 Wed Dec 31 11:15:32 2008
+++ ZendEngine2/zend_extensions.c Sat Jan 17 02:05:13 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_extensions.c,v 1.48.2.1.2.3.2.3 2008/12/31 11:15:32 sebastian Exp $ */
+/* $Id: zend_extensions.c,v 1.48.2.1.2.3.2.4 2009/01/17 02:05:13 stas Exp $ */
#include "zend_extensions.h"
@@ -79,18 +79,9 @@
DL_UNLOAD(handle);
return FAILURE;
}
- } else if (ZTS_V!=extension_version_info->thread_safe) {
- fprintf(stderr, "Cannot load %s - it %s thread safe, whereas Zend %s\n",
- new_extension->name,
- (extension_version_info->thread_safe?"is":"isn't"),
- (ZTS_V?"is":"isn't"));
- DL_UNLOAD(handle);
- return FAILURE;
- } else if (ZEND_DEBUG!=extension_version_info->debug) {
- fprintf(stderr, "Cannot load %s - it %s debug information, whereas Zend %s\n",
- new_extension->name,
- (extension_version_info->debug?"contains":"does not contain"),
- (ZEND_DEBUG?"does":"does not"));
+ } else if (strcmp(ZEND_EXTENSION_BUILD_ID, extension_version_info->build_id)) {
+ fprintf(stderr, "Cannot load %s - it was build with configuration %s, whereas running engine is %s\n",
+ new_extension->name, extension_version_info->build_id, ZEND_EXTENSION_BUILD_ID);
DL_UNLOAD(handle);
return FAILURE;
}
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_extensions.h?r1=1.67.2.3.2.3.2.4&r2=1.67.2.3.2.3.2.5&diff_format=u
Index: ZendEngine2/zend_extensions.h
diff -u ZendEngine2/zend_extensions.h:1.67.2.3.2.3.2.4 ZendEngine2/zend_extensions.h:1.67.2.3.2.3.2.5
--- ZendEngine2/zend_extensions.h:1.67.2.3.2.3.2.4 Wed Dec 31 11:15:32 2008
+++ ZendEngine2/zend_extensions.h Sat Jan 17 02:05:13 2009
@@ -17,25 +17,25 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_extensions.h,v 1.67.2.3.2.3.2.4 2008/12/31 11:15:32 sebastian Exp $ */
+/* $Id: zend_extensions.h,v 1.67.2.3.2.3.2.5 2009/01/17 02:05:13 stas Exp $ */
#ifndef ZEND_EXTENSIONS_H
#define ZEND_EXTENSIONS_H
#include "zend_compile.h"
+#include "zend_build.h"
/* The first number is the engine version and the rest is the date.
* This way engine 2/3 API no. is always greater than engine 1 API no..
*/
-#define ZEND_EXTENSION_API_NO 220070929
+#define ZEND_EXTENSION_API_NO 220090115
typedef struct _zend_extension_version_info {
int zend_extension_api_no;
- char *required_zend_version;
- unsigned char thread_safe;
- unsigned char debug;
+ char *build_id;
} zend_extension_version_info;
+#define ZEND_EXTENSION_BUILD_ID "API" ZEND_TOSTR(ZEND_EXTENSION_API_NO) ZEND_BUILD_TS ZEND_BUILD_DEBUG ZEND_BUILD_SYSTEM ZEND_BUILD_EXTRA
typedef struct _zend_extension zend_extension;
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_modules.h?r1=1.67.2.3.2.4.2.7&r2=1.67.2.3.2.4.2.8&diff_format=u
Index: ZendEngine2/zend_modules.h
diff -u ZendEngine2/zend_modules.h:1.67.2.3.2.4.2.7 ZendEngine2/zend_modules.h:1.67.2.3.2.4.2.8
--- ZendEngine2/zend_modules.h:1.67.2.3.2.4.2.7 Wed Dec 31 11:15:32 2008
+++ ZendEngine2/zend_modules.h Sat Jan 17 02:05:13 2009
@@ -17,13 +17,14 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_modules.h,v 1.67.2.3.2.4.2.7 2008/12/31 11:15:32 sebastian Exp $ */
+/* $Id: zend_modules.h,v 1.67.2.3.2.4.2.8 2009/01/17 02:05:13 stas Exp $ */
#ifndef MODULES_H
#define MODULES_H
#include "zend.h"
#include "zend_compile.h"
+#include "zend_build.h"
#define INIT_FUNC_ARGS int type, int module_number TSRMLS_DC
#define INIT_FUNC_ARGS_PASSTHRU type, module_number TSRMLS_CC
@@ -32,7 +33,7 @@
#define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module TSRMLS_DC
#define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module TSRMLS_CC
-#define ZEND_MODULE_API_NO 20071006
+#define ZEND_MODULE_API_NO 20090115
#ifdef ZTS
#define USING_ZTS 1
#else
@@ -45,7 +46,9 @@
#define ZE2_STANDARD_MODULE_HEADER \
STANDARD_MODULE_HEADER_EX, ini_entries, NULL
-#define STANDARD_MODULE_PROPERTIES_EX 0, 0, NULL, 0
+#define ZEND_MODULE_BUILD_ID "API" ZEND_TOSTR(ZEND_MODULE_API_NO) ZEND_BUILD_TS ZEND_BUILD_DEBUG ZEND_BUILD_SYSTEM ZEND_BUILD_EXTRA
+
+#define STANDARD_MODULE_PROPERTIES_EX 0, 0, NULL, 0, ZEND_MODULE_BUILD_ID
#define NO_MODULE_GLOBALS 0, NULL, NULL, NULL
@@ -95,6 +98,7 @@
unsigned char type;
void *handle;
int module_number;
+ char *build_id;
};
#define MODULE_DEP_REQUIRED 1
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_build.h?view=markup&rev=1.1
Index: ZendEngine2/zend_build.h
+++ ZendEngine2/zend_build.h