Archived
This forum has been archived. Please start a new discussion on GitHub.
Patch for Ice 3.5.0: Allow building IcePHP with PHP namespaces
Building IcePHP with USE_NAMESPACES=yes fails due to the invalid use of the INIT_NS_CLASS_ENTRY macro, e.g.:
The attached patch fixes the problem.
To apply the source patch Attachment not found. to a fresh Ice 3.5.0 source distribution:
Cheers,
Michael
p.s. - this also includes http://www.zeroc.com/forums/patches/5964-c-11-build-fix-php-src-icephp-init-cpp.html to allow compilation with C++11.
p.p.s - I tested this using clang, C++11 and PHP 5.4.
zend_class_entry ce; #ifdef ICEPHP_USE_NAMESPACES - INIT_NS_CLASS_ENTRY(ce, STRCAST("Ice"), STRCAST("Communicator"), _interfaceMethods); + INIT_NS_CLASS_ENTRY(ce, "Ice", "Communicator", _interfaceMethods); #else INIT_CLASS_ENTRY(ce, "Ice_Communicator", _interfaceMethods); #endif
The attached patch fixes the problem.
To apply the source patch Attachment not found. to a fresh Ice 3.5.0 source distribution:
cd Ice-3.5.0 patch -p0 < ice350-icephp-namespaces.patch.txt
Cheers,
Michael
p.s. - this also includes http://www.zeroc.com/forums/patches/5964-c-11-build-fix-php-src-icephp-init-cpp.html to allow compilation with C++11.
p.p.s - I tested this using clang, C++11 and PHP 5.4.
0