From 76a90e6606301d11be0260a386b8b2f78e855ba7 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 5 Aug 2009 11:37:45 +0000 Subject: [PATCH] PHP: define our own ZEND_MODULE_BUILD_ID macro for PHP <= 5.3 This silences the warning, but causes no breakage for future releases. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11504 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules/php.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx index 3bdbb9812..0591d971c 100644 --- a/Source/Modules/php.cxx +++ b/Source/Modules/php.cxx @@ -501,6 +501,10 @@ public: Printf(s_entry, "static zend_function_entry %s_functions[] = {\n", module); /* start the init section */ + Append(s_init, "#if ZEND_MODULE_API_NO <= 20090626\n"); + Append(s_init, "#undef ZEND_MODULE_BUILD_ID\n"); + Append(s_init, "#define ZEND_MODULE_BUILD_ID (char*)\"API\" ZEND_TOSTR(ZEND_MODULE_API_NO) ZEND_BUILD_TS ZEND_BUILD_DEBUG ZEND_BUILD_SYSTEM ZEND_BUILD_EXTRA\n"); + Append(s_init, "#endif\n"); Printv(s_init, "zend_module_entry ", module, "_module_entry = {\n" "#if ZEND_MODULE_API_NO > 20010900\n" " STANDARD_MODULE_HEADER,\n" "#endif\n", NIL); Printf(s_init, " (char*)\"%s\",\n", module); Printf(s_init, " %s_functions,\n", module);