mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08:00
PHP5 and WIN32 support was improved
This commit is contained in:
parent
dfde3095e4
commit
c22d7cf883
33
ext/soap/config-php4.m4
Normal file
33
ext/soap/config-php4.m4
Normal file
@ -0,0 +1,33 @@
|
||||
dnl $Id$
|
||||
dnl config.m4 for extension soap
|
||||
|
||||
PHP_ARG_WITH(soap, whether to enable soap support,
|
||||
[ --with-soap[=DIR] Include SOAP support. DIR is libxml2
|
||||
library directory.])
|
||||
|
||||
if test "$PHP_SOAP" != "no"; then
|
||||
if test "$PHP_SOAP" = "yes"; then
|
||||
for i in /usr/local /usr; do
|
||||
if test -d "$i/include/libxml2/libxml"; then
|
||||
XML2_INCDIR=$i/include/libxml2
|
||||
XML2_LIBDIR=$i/lib
|
||||
fi
|
||||
done
|
||||
else
|
||||
if test -d "$PHP_SOAP/include/libxml2/libxml"; then
|
||||
XML2_INCDIR=$PHP_SOAP/include/libxml2
|
||||
XML2_LIBDIR=$PHP_SOAP/lib
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$XML2_INCDIR"; then
|
||||
AC_MSG_ERROR(Cannot find libxml2 header. Please specify correct libxml2 installation path)
|
||||
fi
|
||||
|
||||
AC_DEFINE(HAVE_PHP_SOAP,1,[Whether you have soap module])
|
||||
|
||||
PHP_ADD_INCLUDE($XML2_INCDIR)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(xml2,$XML2_LIBDIR,SOAP_SHARED_LIBADD)
|
||||
PHP_NEW_EXTENSION(soap, soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c, $ext_shared)
|
||||
PHP_SUBST(SOAP_SHARED_LIBADD)
|
||||
fi
|
@ -1,33 +1,20 @@
|
||||
dnl $Id$
|
||||
dnl config.m4 for extension soap
|
||||
|
||||
PHP_ARG_ENABLE(soap, whether to enable soap support,
|
||||
[ --enable-soap[=DIR] Enable soap support. DIR is libxml2
|
||||
library directory.])
|
||||
PHP_ARG_WITH(soap, whether to enable soap support,
|
||||
[ --with-soap Include SOAP support.])
|
||||
|
||||
if test "$PHP_SOAP" != "no"; then
|
||||
if test "$PHP_SOAP" = "yes"; then
|
||||
for i in /usr/local /usr; do
|
||||
if test -d "$i/include/libxml2/libxml"; then
|
||||
XML2_INCDIR=$i/include/libxml2
|
||||
XML2_LIBDIR=$i/lib
|
||||
fi
|
||||
done
|
||||
else
|
||||
if test -d "$PHP_SOAP/include/libxml2/libxml"; then
|
||||
XML2_INCDIR=$PHP_SOAP/include/libxml2
|
||||
XML2_LIBDIR=$PHP_SOAP/lib
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$XML2_INCDIR"; then
|
||||
AC_MSG_ERROR(Cannot find libxml2 header. Please specify correct libxml2 installation path)
|
||||
fi
|
||||
|
||||
AC_DEFINE(HAVE_PHP_SOAP,1,[Whether you have soap module])
|
||||
|
||||
PHP_ADD_INCLUDE($XML2_INCDIR)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(xml2,$XML2_LIBDIR,SOAP_SHARED_LIBADD)
|
||||
PHP_NEW_EXTENSION(soap, soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c, $ext_shared)
|
||||
PHP_SUBST(SOAP_SHARED_LIBADD)
|
||||
if test -z "$PHP_LIBXML_DIR"; then
|
||||
PHP_ARG_WITH(libxml-dir, libxml2 install dir,
|
||||
[ --with-libxml-dir=DIR XML: libxml2 install prefix], no, no)
|
||||
fi
|
||||
|
||||
if test "$PHP_SOAP" != "no" && test "$PHP_LIBXML" != "no"; then
|
||||
PHP_SETUP_LIBXML(SOAP_SHARED_LIBADD, [
|
||||
AC_DEFINE(HAVE_SOAP,1,[ ])
|
||||
PHP_NEW_EXTENSION(soap, soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c, $ext_shared)
|
||||
PHP_SUBST(SOAP_SHARED_LIBADD)
|
||||
], [
|
||||
AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.])
|
||||
])
|
||||
fi
|
||||
|
@ -1,14 +1,15 @@
|
||||
// $Id$
|
||||
// vim:ft=javascript
|
||||
|
||||
ARG_ENABLE("soap", "SOAP support", "no");
|
||||
ARG_WITH("soap", "SOAP support", "no");
|
||||
|
||||
if (PHP_SOAP != "no" && PHP_LIBXML == "yes") {
|
||||
if (PHP_SOAP == "yes" && PHP_LIBXML == "yes") {
|
||||
EXTENSION('soap', 'soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c');
|
||||
AC_DEFINE('HAVE_PHP_SOAP', 1);
|
||||
AC_DEFINE('HAVE_PHP_SOAP', 1, "SOAP support");
|
||||
|
||||
if (!PHP_SOAP_SHARED) {
|
||||
ADD_FLAG('CFLAGS_SOAP', "/D LIBXML_STATIC ");
|
||||
}
|
||||
ADD_EXTENSION_DEP('soap', 'libxml');
|
||||
}
|
||||
|
||||
|
@ -1992,10 +1992,14 @@ static xmlNodePtr to_xml_datetime_ex(encodeTypePtr type, zval *data, char *forma
|
||||
}
|
||||
|
||||
/* Time zone support */
|
||||
#if HAVE_TM_GMTOFF
|
||||
#ifdef HAVE_TM_GMTOFF
|
||||
sprintf(tzbuf, "%c%02d%02d", (ta->tm_gmtoff < 0) ? '-' : '+', abs(ta->tm_gmtoff / 3600), abs( (ta->tm_gmtoff % 3600) / 60 ));
|
||||
#else
|
||||
# ifdef ZEND_WIN32
|
||||
sprintf(tzbuf, "%c%02d%02d", ((ta->tm_isdst ? timezone - 3600:timezone)>0)?'-':'+', abs((ta->tm_isdst ? timezone - 3600 : timezone) / 3600), abs(((ta->tm_isdst ? timezone - 3600 : timezone) % 3600) / 60));
|
||||
# else
|
||||
sprintf(tzbuf, "%c%02d%02d", ((ta->tm_isdst ? tzone - 3600:tzone)>0)?'-':'+', abs((ta->tm_isdst ? tzone - 3600 : tzone) / 3600), abs(((ta->tm_isdst ? tzone - 3600 : tzone) % 3600) / 60));
|
||||
# endif
|
||||
#endif
|
||||
if (strcmp(tzbuf,"+0000") == 0) {
|
||||
strcpy(tzbuf,"Z");
|
||||
|
@ -162,6 +162,7 @@ xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef ZEND_ENGINE_2
|
||||
int php_stream_xmlIO_match_wrapper(const char *filename)
|
||||
{
|
||||
TSRMLS_FETCH();
|
||||
@ -185,6 +186,7 @@ int php_stream_xmlIO_close(void *context)
|
||||
TSRMLS_FETCH();
|
||||
return php_stream_close((php_stream*)context);
|
||||
}
|
||||
#endif
|
||||
|
||||
xmlNsPtr attr_find_ns(xmlAttrPtr node)
|
||||
{
|
||||
|
@ -44,10 +44,12 @@ xmlNodePtr get_node_with_attribute_ex(xmlNodePtr node, char *name, char *name_ns
|
||||
xmlNodePtr get_node_with_attribute_recursive_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, char *value, char *attr_ns);
|
||||
int parse_namespace(const char *inval,char **value,char **namespace);
|
||||
|
||||
#ifndef ZEND_ENGINE_2
|
||||
int php_stream_xmlIO_match_wrapper(const char *filename);
|
||||
void *php_stream_xmlIO_open_wrapper(const char *filename);
|
||||
int php_stream_xmlIO_read(void *context, char *buffer, int len);
|
||||
int php_stream_xmlIO_close(void *context);
|
||||
#endif
|
||||
|
||||
#define FOREACHATTRNODE(n,c,i) FOREACHATTRNODEEX(n,c,NULL,i)
|
||||
#define FOREACHATTRNODEEX(n,c,ns,i) \
|
||||
|
@ -28,7 +28,7 @@ TD:{
|
||||
This extension makes use of the <A HREF="http://www.xmlsoft.org" TARGET="_top">GNOME XML library</A>. Download and install this library. You will need at least libxml-2.5.4.
|
||||
<HR>
|
||||
<H2>Installation</H2>
|
||||
<I>FIXME</I>
|
||||
This extension is only available if PHP was configured with --with-soap.
|
||||
<HR>
|
||||
<H2>Predefined Constants</H2>
|
||||
The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.
|
||||
|
@ -356,10 +356,12 @@ PHP_MINIT_FUNCTION(soap)
|
||||
/* TODO: add ini entry for always use soap errors */
|
||||
ZEND_INIT_MODULE_GLOBALS(soap, php_soap_init_globals, NULL);
|
||||
|
||||
#ifndef ZEND_ENGINE_2
|
||||
/* Enable php stream/wrapper support for libxml */
|
||||
xmlRegisterDefaultInputCallbacks();
|
||||
xmlRegisterInputCallbacks(php_stream_xmlIO_match_wrapper, php_stream_xmlIO_open_wrapper,
|
||||
php_stream_xmlIO_read, php_stream_xmlIO_close);
|
||||
#endif
|
||||
|
||||
/* Register SoapClient class */
|
||||
/* BIG NOTE : THIS EMITS AN COMPILATION WARNING UNDER ZE2 - handle_function_call deprecated.
|
||||
@ -495,9 +497,6 @@ PHP_MINFO_FUNCTION(soap)
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "Soap Client", "enabled");
|
||||
php_info_print_table_row(2, "Soap Server", "enabled");
|
||||
#if HAVE_PHP_SESSION
|
||||
php_info_print_table_row(2, "Soap Serializer", "enabled");
|
||||
#endif
|
||||
php_info_print_table_end();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user