mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-10 18:50:50 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1009b0bc44 |
No files matched your search
+43
-116
@@ -26,6 +26,11 @@ Status legend
|
||||
|
||||
== Server APIs ==
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: activescript
|
||||
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: aolserver
|
||||
MAINTENANCE: Unknown
|
||||
@@ -36,20 +41,15 @@ PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache2handler / apache2filter
|
||||
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache_hooks
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache2filter
|
||||
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache2handler
|
||||
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: caudium
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
@@ -63,11 +63,6 @@ MAINTENANCE: Marcus Boerger <helly@php.net>, Edin Kadribasic <edink@php.
|
||||
STATUS: Working
|
||||
SINCE: 4.3.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: continuity
|
||||
PRIMARY MAINTAINER: Alex Leigh <aleigh@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: embed
|
||||
PRIMARY MAINTAINER: Edin Kadribasic <edink@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -134,8 +129,12 @@ STATUS: Working
|
||||
SINCE: 4.0.6
|
||||
COMMENT: DB abstraction for odbc, mysql, pgsql, mssql, fbsql and more, see documentation
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: fbsql
|
||||
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
|
||||
EXTENSION: filepro
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: hwapi
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -176,26 +175,6 @@ MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 5.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oci8
|
||||
PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: odbc
|
||||
PRIMARY MAINTAINER: Daniel R. Kalowsky <kalowsky@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oracle
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
COMMENT: Using the new OCI8 driver is encouraged where possible.
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ovrimos
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pgsql
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>, Yasuo Ohgaki <yohgaki@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -217,6 +196,22 @@ EXTENSION: sybase_ct
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oci8
|
||||
PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: odbc
|
||||
PRIMARY MAINTAINER: Daniel R. Kalowsky <kalowsky@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oracle
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
COMMENT: Using the new OCI8 driver is encouraged where possible.
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
== XML extensions ==
|
||||
@@ -234,11 +229,6 @@ MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 5.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: soap
|
||||
PRIMARY MAINTAINER: Dmitry Stogov <dmitry@zend.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: wddx
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -275,6 +265,11 @@ MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
SINCE: 4.0.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dio
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
SINCE: 4.0.6
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: calendar
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
@@ -302,31 +297,17 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dio
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
SINCE: 4.0.6
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: exif
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: fam
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: fdf
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: filepro
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ftp
|
||||
PRIMARY MAINTAINER: Stefan Esser (sesser@php.net)
|
||||
MAINTENANCE: Maintained
|
||||
@@ -346,11 +327,6 @@ MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: hwapi
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: iconv
|
||||
PRIMARY MAINTAINER: Moriyoshi Koizumi <moriyoshi@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -361,11 +337,6 @@ PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ircg
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ldap
|
||||
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -381,63 +352,33 @@ PRIMARY MAINTAINER: Derick Rethans <derick@derickrethans.nl>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mcve
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mhash
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mime_magic
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Deprecated
|
||||
STATUS: Experimental
|
||||
COMMENT: Use PECL's fileinfo extension instead
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ming
|
||||
PRIMARY MAINTAINER: Frank M. Kromann
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mnogosearch
|
||||
PRIMARY MAINTAINER: Sergey Kartashoff <gluke@mail.ru>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mono
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: msession
|
||||
PRIMARY MAINTAINER Mark L. Woodward <mlwmohawk@mohawksoft.com>
|
||||
PRIMARY MAINTAINER Mark L. Woodward mlwmohawk@mohawksoft.com
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working/Experimental
|
||||
COMMENT: Tested on Linux, should work on other UNIX platforms. Backend server code can compile under Windows.
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ncurses
|
||||
PRIMARY MAINTAINER Ilia Alshanetsky <iliaa@php.net>, Wez Furlong <wez@php.net>, Hartmut Holzgraefe <hholzgra@php.net>, Georg Richter <georg@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: openssl
|
||||
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pcntl
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pcre
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdf
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pfpro
|
||||
PRIMARY MAINTAINER: David Croft <david@infotrek.co.uk>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -498,20 +439,6 @@ EXTENSION: sysvshm
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: tidy
|
||||
PRIMARY MAINTAINER: John Coggeshall <john@php.net>, Ilia Alshanetsky <iliaa@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: tokenizer
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: w32api
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: yaz
|
||||
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
|
||||
MAINTENANCE: Maintained
|
||||
|
||||
@@ -1,290 +1,6 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
24 Mar 2005, PHP 5.0.4RC2
|
||||
- Added SNMPv2 support. (harrie)
|
||||
- Added Oracle Instant Client support. (cjbj at hotmail dot com, Tony)
|
||||
- Added length and charsetnr for field array and object in mysqli. (Georg)
|
||||
- Added checks for negative values to gmp_sqrt(), gmp_powm(), gmp_sqrtrem()
|
||||
and gmp_fact() to prevent SIGFPE. (Tony)
|
||||
- Changed foreach() to throw an exception if IteratorAggregate::getIterator()
|
||||
does not return an Iterator. (Marcus)
|
||||
- Changed phpize not to require libtool. (Jani)
|
||||
- Updated bundled oniguruma library (used for multibyte regular expression)
|
||||
to 3.7.0. (Moriyoshi)
|
||||
- Updated bundled libmbfl library (used for multibyte functions). (Moriyoshi)
|
||||
Fixed bugs:
|
||||
. Bug #32063 (mb_convert_encoding ignores named entity 'alpha')
|
||||
. Bug #31911 (mb_decode_mimeheader() is case-sensitive to hex escapes)
|
||||
. bug #30573 (compiler warnings in libmbfl due to invalid type cast)
|
||||
. Bug #30549 (incorrect character translations for some ISO8859 charsets).
|
||||
- Fixed bug preventing from building oci8 as shared.
|
||||
(stanislav dot voroniy at portavita dot nl, Tony)
|
||||
- Fixed a bug in mysql_affected_rows and mysql_stmt_affected_rows when the
|
||||
api function returns -1 (Georg)
|
||||
- Fixed several leaks in ext/browscap and sapi/embed. (Andrei)
|
||||
- Fixed several leaks in ext/filepro. (Tony)
|
||||
- Fixed build system to always use bundled libtool files. (Jani)
|
||||
- Fixed a bug in mysqli_stmt_execute() (type conversion with NULL values).
|
||||
(Georg)
|
||||
- Fixed segfault in mysqli_fetch_field_direct() when invalid field offset
|
||||
is passed. (Tony)
|
||||
- Fixed posix_getsid() & posix_getpgid() to return sid & pgid instead
|
||||
of true. (Tony)
|
||||
- Fixed bug #32394 (offsetUnset() segfaults in a foreach). (Marcus)
|
||||
- Fixed bug #32373 (segfault in bzopen() if supplied path to non-existent
|
||||
file). (Tony)
|
||||
- Fixed bug #32326 (Check values of Connection/Transfer-Encoding
|
||||
case-incentively in SOAP extension). (Ilia)
|
||||
- Fixed bug #32290 (call_user_func_array() calls wrong class method within
|
||||
child class). (Marcus)
|
||||
- Fixed bug #32238 (spl_array.c: void function cannot return value). (Johannes)
|
||||
- Fixed bug #32210 (proc_get_status() sets "running" always to true). (Ilia)
|
||||
- Fixed bug #32200 (Prevent using both --with-apxs2 and --with-apxs2filter).
|
||||
(Jani)
|
||||
- Fixed bug #32160 (file truncation in copy() when source & destination are
|
||||
the same). (Ilia)
|
||||
- Fixed bug #32134 (Overloading offsetGet/offsetSet). (Marcus)
|
||||
- Fixed bug #32130 (ArrayIterator::seek() does not throw an Exception on
|
||||
invalid index). (Marcus)
|
||||
- Fixed bug #32115 (dateTime SOAP encoding of timezone incorrect). (Dmitry)
|
||||
- Fixed bug #32081 (in mysqli default socket value is not being used). (Ilia)
|
||||
- Fixed bug #32021 (Crash caused by range('', 'z')). (Derick)
|
||||
- Fixed bug #32011 (Fragments which replaced Nodes are not globaly useable).
|
||||
(Rob)
|
||||
- Fixed bug #32001 (xml_parse_into_struct() function exceeds maximum
|
||||
execution time). (Rob, Moriyoshi)
|
||||
- Fixed bug #31980 (Unicode exif data not available on Windows). (Edin)
|
||||
- Fixed bug #31792 (getrusage() does not provide ru_nswap value). (Ilia)
|
||||
- Fixed bug #31960 (msql_fetch_row() and msql_fetch_array() dropping columns
|
||||
with NULL values). (Daniel Convissor)
|
||||
- Fixed bug #31878 (Segmentation fault using clone keyword on nodes). (Rob)
|
||||
- Fixed bug #31858 (--disable-cli does not force --without-pear). (Jani)
|
||||
- Fixed bug #31842 (*date('r') does not return RFC2822 conforming date string).
|
||||
(Jani)
|
||||
- Fixed bug #31832 (SOAP encoding problem with complex types in WSDL mode with
|
||||
multiple parts). (Dmitry)
|
||||
- Fixed bug #31797 (exif_read_data() uses too low nesting limit). (Ilia)
|
||||
- Fixed bug #31796 (readline completion handler does not handle empty return
|
||||
values). (Ilia)
|
||||
- Fixed bug #31755 (Cannot create SOAP header in no namespace). (Dmitry)
|
||||
- Fixed bug #31754 (dbase_open() fails for mode = 1). (Mehdi, Derick)
|
||||
- Fixed bug #31751 (pg_parameter_status() missing on Windows). (Edin)
|
||||
- Fixed bug #31747 (SOAP Digest Authentication doesn't work with
|
||||
"HTTP/1.1 100 Continue" response). (Dmitry)
|
||||
- Fixed bug #31732 (mb_get_info() causes segfault when no parameters
|
||||
specified). (Tony)
|
||||
- Fixed bug #31710 (Wrong return values for mysqli_autocommit/commit/rollback).
|
||||
(Georg)
|
||||
- Fixed bug #31705 (parse_url() does not recognize http://foo.com#bar). (Ilia)
|
||||
- Fixed bug #31695 (Cannot redefine endpoint when using WSDL). (Dmitry)
|
||||
- Fixed bug #31684 (dio_tcsetattr(): misconfigured termios settings).
|
||||
(elod at itfais dot com)
|
||||
- Fixed bug #31683 (changes to $name in __get($name) override future
|
||||
parameters). (Dmitry)
|
||||
- Fixed bug #31699 (unserialize() float problem on non-English locales). (Ilia)
|
||||
- Fixed bug #31562 (__autoload() problem with static variables). (Marcus)
|
||||
- Fixed bug #31651 (ReflectionClass::getDefaultProperties segfaults with arrays).
|
||||
(Marcus)
|
||||
- Fixed bug #31623 (OCILogin does not support password grace period).
|
||||
(daniel dot beet at accuratesoftware dot com, Tony)
|
||||
- Fixed bug #31527 (crash in msg_send() when non-string is stored without
|
||||
being serialized). (Ilia)
|
||||
- Fixed bug #31515 (Improve performance of scandir() by factor of 10 or so). (Ilia)
|
||||
- Fixed bug #31514 (open_basedir uses path_translated rather then cwd for .
|
||||
translation). (Ilia)
|
||||
- Fixed bug #31480 (Possible infinite loop in imap_mail_compose()). (Ilia)
|
||||
- Fixed bug #31479 (Fixed crash in chunk_split(), when chunklen > strlen). (Ilia)
|
||||
- Fixed bug #31465 (False warning in unpack() when working with *). (Ilia)
|
||||
- Fixed bug #31454 (session_set_save_handler crashes PHP when supplied
|
||||
non-existent object ref). (Tony)
|
||||
- Fixed bug #31444 (Memory leak in zend_language_scanner.c).
|
||||
(hexer at studentcenter dot org)
|
||||
- Fixed bug #31442 (unserialize broken on 64-bit systems). (Marcus)
|
||||
- Fixed bug #31440 ($GLOBALS can be overwritten via GPC when register_globals
|
||||
is enabled). (Ilia)
|
||||
- Fixed bug #31422 (No Error-Logging on SoapServer-Side). (Dmitry)
|
||||
- Fixed bug #31413 (curl POSTFIELDS crashes on 64-bit platforms). (Joe)
|
||||
- Fixed bug #31396 (compile fails with gd 2.0.33 without freetype). (Jani)
|
||||
- Fixed bug #31371 (highlight_file() trims new line after heredoc). (Ilia)
|
||||
- Fixed bug #31361 (simplexml/domxml segfault when adding node twice). (Rob)
|
||||
- Fixed bug #31348 (CachingIterator::rewind() leaks). (Marcus)
|
||||
- Fixed bug #31346 (ArrayIterator::next segfaults). (Marcus)
|
||||
- Fixed bug #31190 (Unexpected warning then exception is thrown from
|
||||
call_user_func_array()). (phpbugs at domain51 dot net, Dmitry)
|
||||
- Fixed bug #31142 (imap_mail_compose() fails to generate correct output). (Ilia)
|
||||
- Fixed bug #31139 (XML Parser Functions seem to drop & when parsing). (Rob)
|
||||
- Fixed bug #31398 (When magic_guotes_gpc are enabled filenames with ' get cutoff).
|
||||
(Ilia)
|
||||
- Fixed bug #31288 (Possible crash in mysql_fetch_field(), if mysql_list_fields()
|
||||
was not called previously). (Ilia)
|
||||
- Fixed bug #31107, #31110, #31111, #31249 (Compile failure of zend_strtod.c).
|
||||
(Jani)
|
||||
- Fixed bug #31110 (PHP 4.3.10 does not compile on Tru64 UNIX 5.1B). (Derick)
|
||||
- Fixed bug #31107 (Compile failure on Solaris 9 (Intel) and gcc 3.4.3). (Derick)
|
||||
- Fixed bug #31103 (Better error message when c-client cannot be found). (Ilia)
|
||||
- Fixed bug #31101 (missing kerberos header file path with --with-openssl). (Jani)
|
||||
- Fixed bug #31098 (isset() / empty() incorrectly return true in dereference of
|
||||
a string type). (Moriyoshi)
|
||||
- Fixed bug #31087 (broken php_url_encode_hash macro). (Ilia)
|
||||
- Fixed bug #31072 (var_export() does not output an array element with an empty
|
||||
string key). (Derick)
|
||||
- Fixed bug #31060 (imageftbbox() does not use linespacing parameter). (Jani)
|
||||
- Fixed bug #31056 (php_std_date() returns invalid formatted date if
|
||||
y2k_compliance is On). (Ilia)
|
||||
- Fixed bug #31055 (apache2filter: per request leak proportional to the full
|
||||
path of the request URI). (kameshj at fastmail dot fm)
|
||||
- Fixed bug #30901 (can't send cookies with soap envelop). (Dmitry)
|
||||
- Fixed bug #30871 (Misleading warning message for array_combine()). (Andrey)
|
||||
- Fixed bug #30868 (evaluated pointer comparison in mbregex causes compile
|
||||
failure). (Moriyoshi)
|
||||
- Fixed bug #30862 (Static array with boolean indexes). (Marcus)
|
||||
- Fixed bug #30726 (-.1 like numbers are not being handled correctly). (Ilia)
|
||||
- Fixed bug #30725 (PHP segfaults when an exception is thrown in getIterator()
|
||||
within foreach). (Marcus)
|
||||
- Fixed bug #30609 (cURL functions bypass open_basedir). (Jani)
|
||||
- Fixed bug #30446 (apache2handler: virtual() includes files out of sequence)
|
||||
- Fixed bug #30430 (odbc_next_result() doesn't bind values and that results
|
||||
in segfault). (pdan-php at esync dot org, Tony)
|
||||
- Fixed bug #30266 (Invalid opcode 137/1/8). (Marcus)
|
||||
- Fixed bug #30120 (imagettftext() and imagettfbbox() accept too many
|
||||
parameters). (Jani)
|
||||
- Fixed bug #30106 (SOAP cannot not parse 'ref' element. Causes Uncaught
|
||||
SoapFault exception). (Dmitry)
|
||||
- Fixed bug #29989 (type re_registers redefined in oniguruma.h). (Moriyoshi)
|
||||
- Fixed bug #28803 (enabled debug causes bailout errors with CLI on AIX
|
||||
because of fflush() called on already closed filedescriptor). (Tony)
|
||||
- Fixed bug #29767 (Weird behaviour of __set($name, $value)). (Dmitry)
|
||||
- Fixed bug #29733 (printf() handles repeated placeholders wrong).
|
||||
(bugs dot php dot net at bluetwanger dot de, Ilia)
|
||||
- Fixed bug #29424 (width and height inverted for JPEG2000 files). (Ilia)
|
||||
- Fixed bug #29329 (configure for mysqli with shared doesn't work). (Georg)
|
||||
- Fixed bug #29136 (make test - libtool failure on MacOSX). (Jani)
|
||||
- Fixed bug #28976 (mail(): use "From:" from headers if sendmail_from is empty).
|
||||
(Jani)
|
||||
- Fixed bug #28930 (PHP sources pick wrong header files generated by bison).
|
||||
(eggert at gnu dot org, Jani)
|
||||
- Fixed bug #28840 (__destruct of a class that extends mysqli not called).
|
||||
(Marcus)
|
||||
- Fixed bug #28804 (ini-file section parsing pattern is buggy).
|
||||
(wendland at scan-plus dot de)
|
||||
- Fixed bug #28451 (corrupt EXIF headers have unlimited recursive IFD directory
|
||||
entries). (Andrei)
|
||||
- Fixed bug #28444 (Cannot access undefined property for object with overloaded
|
||||
property access). (Dmitry)
|
||||
- Fixed bug #28442 (Changing a static variables in a class changes it across
|
||||
sub/super classes.) (Marcus)
|
||||
- Fixed bug #28324 (HTTP_SESSION_VARS appear when register_long_arrays is
|
||||
Off). (Tony)
|
||||
- Fixed bug #28074 (FastCGI: stderr should be written in a FCGI stderr stream).
|
||||
(chris at ex-parrot dot com)
|
||||
- Fixed bug #28067 (partially incorrect utf8 to htmlentities mapping). (Derick,
|
||||
Benjamin Greiner)
|
||||
- Fixed bug #28041 (SOAP HTTP Digest Access Authentication). (Dmitry)
|
||||
- Fixed bug #27633 (Double \r problem on ftp_get in ASCII mode on Win32). (Ilia)
|
||||
- Fixed bug #18613 (Multiple OUs in x509 certificate not handled properly).
|
||||
(Jani)
|
||||
|
||||
15 Dec 2004, PHP 5.0.3
|
||||
- Added the %F modifier to *printf to render a non-locale-aware representation
|
||||
of a float with the . as decimal seperator. (Derick)
|
||||
- Fixed error handling in mysqli_multi_query. (Georg)
|
||||
- Extended the functionality of is_subclass_of() to accept either a class name
|
||||
or an object as first parameter. (Andrey)
|
||||
- Fixed potential problems with unserializing invalid serialize data. (Marcus)
|
||||
- Fixed bug #32076 (ReflectionMethod::isDestructor() always return true).
|
||||
(Derick, Tony)
|
||||
- Fixed bug #31034 (Problem with non-existing iconv header file). (Derick)
|
||||
- Fixed bug #30995 (snmp extension does not build with net-snmp 5.2). (Ilia)
|
||||
- Fixed bug #30994 (SOAP server unable to handle request with references).
|
||||
(Dmitry)
|
||||
- Fixed bug #30990 (allow popen() on *NIX to accept 'b' flag). (Ilia)
|
||||
- Fixed bug #30967 (properties in extended mysqli classes don't work). (Georg)
|
||||
- Fixed bug #30928 (When Using WSDL, SoapServer doesn't handle private or
|
||||
protected properties). (Dmitry)
|
||||
- Fixed bug #30922 (reflective functions crash PHP when interfaces extend
|
||||
themselves). (Tony, Dmitry)
|
||||
- Fixed bug #30904 (segfault when recording soapclient into session). (Tony,
|
||||
Dmitry)
|
||||
- Fixed bug #30890 (MySQLi testsuite)
|
||||
- Fixed bug #30856 (ReflectionClass::getStaticProperties segfaults). (Marcus)
|
||||
- Fixed bug #30832 ("!" stripped off comments in xml parser). (Rob)
|
||||
- Fixed bug #30799 (SoapServer doesn't handle private or protected properties).
|
||||
(Dmitry)
|
||||
- Fixed bug #30783 (Apache crash when using ReflectionFunction::
|
||||
getStaticVariables()). (Marcus)
|
||||
- Fixed bug #30750 (Meaningful error message when upload directory is not
|
||||
accessible). (Ilia)
|
||||
- Fixed bug #30685 (Malformed SOAPClient http header reequest). (Dmitry)
|
||||
- Fixed bug #30672 (Problem handling exif data in jpeg images at unusual
|
||||
places). (Marcus)
|
||||
- Fixed bug #30658 (Ensure that temporary files created by GD are removed).
|
||||
(Ilia)
|
||||
- Fixed bug #30645 (def. multi result set support for mysql_connect). (Georg)
|
||||
- Fixed bug #30637 (compile with pear error). (Antony)
|
||||
- Fixed bug #30587 (array_multisort doesn't separate zvals before
|
||||
changing them). (Tony)
|
||||
- Fixed bug #30572 (crash when comparing SimpleXML attribute to a boolean).
|
||||
(Andi)
|
||||
- Fixed bug #30566 (attribute namespace URIs are inconsistent when parsing).
|
||||
(Rob)
|
||||
- Fixed bug #30490 (PEAR installation fails). (Antony)
|
||||
- Fixed bug #30475 (curl_getinfo() may crash in some situations). (Ilia)
|
||||
- Fixed bug #30442 (segfault when parsing ?getvariable[][ ). (Tony)
|
||||
- Fixed bug #30388 (rename across filesystems loses ownership and
|
||||
permission info). (Tony)
|
||||
- Fixed bug #30387 (stream_socket_client async connect was broken).
|
||||
(vnegrier at esds dot com, Wez).
|
||||
- Fixed bug #30381 (Strange results with get_class_vars()). (Marcus)
|
||||
- Fixed bug #30375 (cal_info() does not work without a parameter). (Ilia)
|
||||
- Fixed bug #30362 (stream_get_line() not handling end string correctly).
|
||||
(Ilia)
|
||||
- Fixed bug #30359 (SOAP client requests have no port in "Host" field).
|
||||
(Dmitry)
|
||||
- Fixed bug #30356 (str_ireplace() does not work on all strings). (Ilia)
|
||||
- Fixed bug #30344 (Reflection::getModifierNames() returns too long strings).
|
||||
(Marcus)
|
||||
- Fixed bug #30329 (Error Fetching http body, No Content-Length, connection
|
||||
closed or chunked data). (Dmitry)
|
||||
- Fixed bug #30282 (segfault when using unknown/unsupported
|
||||
session.save_handler and/or session.serialize_handler). (Tony)
|
||||
- Fixed bug #30281 (Prevent non-wbmp images from being detected as such).
|
||||
(Ilia)
|
||||
- Fixed bug #30276 (Possible crash in ctype_digit on large numbers). (Ilia)
|
||||
- Fixed bug #30230 (exception handler not working with objects). (Marcus)
|
||||
- Fixed bug #30224 (Sybase date strings are sometimes not null terminated).
|
||||
(Ilia)
|
||||
- Fixed bug #30175 (SOAP results aren't parsed correctly). (Dmitry)
|
||||
- Fixed bug #30147 (OO sqlite_fetch_object did not reset error handler). (Wez)
|
||||
- Fixed bug #30133 (get_current_user() crashes on Windows). (Edin)
|
||||
- Fixed bug #30061 (xml_set_start_namespace_decl_handler not called). (Rob)
|
||||
- Fixed bug #30057 (did not detect IPV6 on FreeBSD 4.1). (Wez)
|
||||
- Fixed bug #30042 (strtotime does not use second param). (Derick)
|
||||
- Fixed bug #30027 (Possible crash inside ftp_get()).
|
||||
(cfield at affinitysolutions dot com)
|
||||
- Fixed bug #29954 (array_reduce segfaults when initial value is array). (Tony)
|
||||
- Fixed bug #29883 (isset gives invalid values on strings). (Tony, Dmitry)
|
||||
- Fixed bug #29801 (Set limit on the size of mmapable data). (Ilia)
|
||||
- Fixed bug #29557 (strtotime error). (Derick)
|
||||
- Fixed bug #29418 (double free when openssl_csr_new fails).
|
||||
(Kamesh Jayachandran).
|
||||
- Fixed bug #29385 (Soapserver always uses std class). (David, Dmitry)
|
||||
- Fixed bug #29211 (SoapClient doesn't request wsdl through proxy). (Rob)
|
||||
- Fixed bug #28817 (Var problem when extending domDocument). (Georg)
|
||||
- Fixed bug #28599 (strtotime fails with zero base time). (Derick)
|
||||
- Fixed bug #28598 (Lost support for MS Symbol fonts). (Pierre)
|
||||
- Fixed bug #28220 (mb_strwidth() returns wrong width values for some hangul
|
||||
characters). (Moriyoshi)
|
||||
- Fixed bug #28228 (NULL decimal separator is not being handled correctly).
|
||||
(Ilia)
|
||||
- Fixed bug #28209 (strtotime("now")). (Derick)
|
||||
- Fixed bug #27798 (private / protected variables not exposed by
|
||||
get_object_vars() inside class). (Marcus)
|
||||
- Fixed bug #27728 (Can't return within a zend_try {} block or the previous
|
||||
bailout state isn't restored. (Andi)
|
||||
- Fixed bug #27183 (Userland stream wrapper segfaults on stream_write).
|
||||
(Christian)
|
||||
|
||||
23 Sep 2004, PHP 5.0.2
|
||||
?? ??? 2004, PHP 5.0.2
|
||||
- Added new boolean (fourth) parameter to array_slice() that turns on the
|
||||
preservation of keys in the returned array. (Derick)
|
||||
- Added the sorting flag SORT_LOCALE_STRING to the sort() functions which makes
|
||||
@@ -298,9 +14,6 @@ PHP NEWS
|
||||
- Renamed SoapClient->__call() to SoapClinet->__soapCall(). (Dmitry)
|
||||
- Fixed bug with raw_post_data not getting set (Brian)
|
||||
- Fixed a file-descriptor leak with phpinfo() and other 'special' URLs (Zeev)
|
||||
- Fixed bug #30209 (ReflectionClass::getMethod() lowercases attribute).
|
||||
(Marcus)
|
||||
- Fixed bug #30182 (SOAP module processing WSDL file dumps core). (Dmitry)
|
||||
- Fixed bug #30045 (Cannot pass big integers (> 2147483647) in SOAP requests).
|
||||
(Dmitry)
|
||||
- Fixed bug #29985 (unserialize()/ __PHP_Incomplete_class does not report
|
||||
@@ -327,11 +40,9 @@ PHP NEWS
|
||||
- Fixed bug #29657 (xml_* functions throw non descriptive error).
|
||||
(Christian, Rob)
|
||||
- Fixed bug #29656 (segfault on result and statement properties). (Georg)
|
||||
- Fixed bug #29566 (foreach/string handling strangeness (crash)). (Dmitry)
|
||||
- Fixed bug #29447 (Reflection API issues). (Marcus)
|
||||
- Fixed bug #29296 (Added sslv2 and sslv3 transports). (Wez)
|
||||
- Fixed bug #29283 (Invalid statement handle in mysqli on execute). (Georg)
|
||||
- Fixed bug #29913 (parse_url() is now binary safe). (Ilia)
|
||||
- Fixed bug #27994 (segfault with Soapserver when WSDL-Cache is enabled).
|
||||
(Dmitry)
|
||||
- Fixed bug #27791 (Apache 2.0 SAPI build against Apache 2 HEAD). (Joe Orton,
|
||||
@@ -422,6 +133,7 @@ PHP NEWS
|
||||
- Fixed bug #28699 (Reflection api bugs). (Marcus)
|
||||
- Fixed bug #28694 (ReflectionExtension::getFunctions() crashes PHP). (Marcus)
|
||||
- Fixed bug #28512 (Allocate enough space to store MSSQL data). (Frank)
|
||||
- Fixed bug #28325 (Circular references not properly serialised). (Moriyoshi)
|
||||
- Fixed strip_tags() to correctly handle '\0' characters. (Stefan)
|
||||
|
||||
7 Jun 2004, PHP 5 Release Candidate 3
|
||||
@@ -506,6 +218,7 @@ PHP NEWS
|
||||
- Fixed bug #27619 (filters not applied to pre-buffered stream data). (Sara)
|
||||
- Fixed bug #27519 (Reflection_Function constructor crashes with non-existant
|
||||
function's name). (Marcus)
|
||||
- Fixed bug #27469 (serialize() objects of incomplete class). (Dmitry)
|
||||
- Fixed bug #27457 (handling of numeric indexes in strtr()). (Dmitry)
|
||||
- Fixed bug #27397 (debug_backtrace() not showing function arguments). (Zeev)
|
||||
- Fixed bug #27283 (The last catch statement was sometimes skipped). (Andi)
|
||||
|
||||
+10
-18
@@ -29,14 +29,7 @@ Having said that, here are the organizational rules:
|
||||
5. If you don't know how to do something, ask first!
|
||||
|
||||
6. Test your changes before committing them. We mean it. Really.
|
||||
|
||||
Currently we have the following branches in use:
|
||||
HEAD Will become PHP 5.1. This CVS branch is for active development.
|
||||
PHP_5_0 Is used to release the PHP 5.0.x series. Only minor feature
|
||||
enhancements may go in here, but please keep that as infrequent as
|
||||
possible.
|
||||
PHP_4_3 Is used to release the PHP 4.3.x series. Only bugfixes are permitted
|
||||
on this branch.
|
||||
|
||||
|
||||
The next few rules are more of a technical nature.
|
||||
|
||||
@@ -68,27 +61,26 @@ The next few rules are more of a technical nature.
|
||||
|
||||
The format of the commit messages is pretty simple.
|
||||
|
||||
Use a - to start a new item in your commit message.
|
||||
|
||||
If a line begins with #, it is taken to be a comment and will not appear
|
||||
in the ChangeLog. Everything else goes into the ChangeLog.
|
||||
|
||||
It is important to note that if your comment or news logline spans multiple
|
||||
lines, you have to put # at the beginning of _every_ such line.
|
||||
|
||||
Example. Say you modified two files, datetime.c and string.c. In datetime.c you
|
||||
added a new format option for the date() function, and in string.c you fixed a
|
||||
memory leak in php_trim(). Don't commit both of these at once. Commit them
|
||||
Example. Say you modified two files, datetime.c and string.c. In datetime.c
|
||||
you added a new format option for date() function, and in string.c you fixed
|
||||
a memory leak in php_trim(). Don't commit both of these at once. Commit them
|
||||
separately and try to make sure your commit messages look something like the
|
||||
following.
|
||||
|
||||
For datetime.c:
|
||||
- Added new 'K' format modifier to date() for printing out number of days until
|
||||
New Year's Eve.
|
||||
|
||||
(PHP date) Added new 'K' format modifier for printing out number of
|
||||
days until New Year's Eve.
|
||||
|
||||
For string.c:
|
||||
- Fixed a memory leak in php_trim() resulting from improper use of zval_dtor().
|
||||
#- Man, that thing was leaking all over the place!
|
||||
(php_trim) Fixed a memory leak resulting from improper use of zval_dtor().
|
||||
# Man, that thing was leaking all over the place!
|
||||
|
||||
The # lines will be omitted from the ChangeLog automagically.
|
||||
|
||||
@@ -98,7 +90,7 @@ bug report when developers are browsing CVS via. LXR or Bonsai.
|
||||
|
||||
Example:
|
||||
|
||||
Fixed bug #14016 (pgsql notice handler double free crash bug.)
|
||||
Fixed pgsql notice handler double free crash bug. Bug #14016
|
||||
|
||||
If you don't see your messages in ChangeLog right away, don't worry!
|
||||
These files are updated once a day, so your stuff will not show up until
|
||||
|
||||
+24
-2
@@ -296,11 +296,11 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
|
||||
}
|
||||
}
|
||||
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
|
||||
if (tsrm_new_thread_end_handler) {
|
||||
tsrm_new_thread_end_handler(thread_id, &((*thread_resources_ptr)->storage));
|
||||
}
|
||||
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
}
|
||||
|
||||
|
||||
@@ -481,6 +481,13 @@ TSRM_API THREAD_T tsrm_thread_id(void)
|
||||
{
|
||||
#ifdef TSRM_WIN32
|
||||
return GetCurrentThreadId();
|
||||
#elif defined(NETWARE)
|
||||
/* There seems to be some problem with the LibC call: NXThreadGetId().
|
||||
* Due to this, the PHPMyAdmin application is abending in PHP calls.
|
||||
* Used the call, kCurrentThread instead and it works fine.
|
||||
*/
|
||||
/* return NXThreadGetId(); */
|
||||
return kCurrentThread();
|
||||
#elif defined(GNUPTH)
|
||||
return pth_self();
|
||||
#elif defined(PTHREADS)
|
||||
@@ -501,9 +508,24 @@ TSRM_API THREAD_T tsrm_thread_id(void)
|
||||
TSRM_API MUTEX_T tsrm_mutex_alloc(void)
|
||||
{
|
||||
MUTEX_T mutexp;
|
||||
#ifdef NETWARE
|
||||
#ifndef USE_MPK
|
||||
/* To use the Recursive Mutex Locking of LibC */
|
||||
long flags = NX_MUTEX_RECURSIVE;
|
||||
NXHierarchy_t order = 0;
|
||||
NX_LOCK_INFO_ALLOC (lockInfo, "PHP-TSRM", 0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
mutexp = malloc(sizeof(CRITICAL_SECTION));
|
||||
InitializeCriticalSection(mutexp);
|
||||
#elif defined(NETWARE)
|
||||
#ifdef USE_MPK
|
||||
mutexp = kMutexAlloc((BYTE*)"PHP-TSRM");
|
||||
#else
|
||||
mutexp = NXMutexAlloc(flags, order, &lockInfo);
|
||||
#endif
|
||||
#elif defined(GNUPTH)
|
||||
mutexp = (MUTEX_T) malloc(sizeof(*mutexp));
|
||||
pth_mutex_init(mutexp);
|
||||
|
||||
+16
-2
@@ -14,8 +14,8 @@
|
||||
#define TSRM_H
|
||||
|
||||
/* #ifndef WIN32 */
|
||||
#ifndef WIN32
|
||||
# include <tsrm_config.h>
|
||||
#if !defined(WIN32) && !defined(NETWARE)
|
||||
# include "tsrm_config.h"
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
@@ -42,6 +42,13 @@
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# include <shellapi.h>
|
||||
#elif defined(NETWARE)
|
||||
# include <nks/thread.h>
|
||||
#ifdef USE_MPK
|
||||
# include <mpklib4php.h>
|
||||
#else
|
||||
# include <nks/synch.h>
|
||||
#endif
|
||||
#elif defined(GNUPTH)
|
||||
# include <pth.h>
|
||||
#elif defined(PTHREADS)
|
||||
@@ -59,6 +66,13 @@ typedef int ts_rsrc_id;
|
||||
#ifdef TSRM_WIN32
|
||||
# define THREAD_T DWORD
|
||||
# define MUTEX_T CRITICAL_SECTION *
|
||||
#elif defined(NETWARE)
|
||||
# define THREAD_T NXThreadId_t
|
||||
#ifdef USE_MPK
|
||||
# define MUTEX_T MUTEX
|
||||
#else
|
||||
# define MUTEX_T NXMutex_t *
|
||||
#endif
|
||||
#elif defined(GNUPTH)
|
||||
# define THREAD_T pth_t
|
||||
# define MUTEX_T pth_mutex_t *
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
AC_DEFUN([AM_SET_LIBTOOL_VARIABLE],[
|
||||
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
|
||||
])
|
||||
|
||||
+5
-13
@@ -30,7 +30,7 @@ dnl PTHREADS_FLAGS
|
||||
dnl
|
||||
dnl Set some magic defines to achieve POSIX threads conformance
|
||||
dnl
|
||||
AC_DEFUN([PTHREADS_FLAGS],[
|
||||
AC_DEFUN(PTHREADS_FLAGS,[
|
||||
if test -z "$host_alias" && test -n "$host"; then
|
||||
host_alias=$host
|
||||
fi
|
||||
@@ -65,7 +65,7 @@ dnl PTHREADS_CHECK_COMPILE
|
||||
dnl
|
||||
dnl Check whether the current setup can use POSIX threads calls
|
||||
dnl
|
||||
AC_DEFUN([PTHREADS_CHECK_COMPILE], [
|
||||
AC_DEFUN(PTHREADS_CHECK_COMPILE, [
|
||||
AC_TRY_RUN( [
|
||||
#include <pthread.h>
|
||||
#include <stddef.h>
|
||||
@@ -84,15 +84,7 @@ int main() {
|
||||
pthreads_working=yes
|
||||
], [
|
||||
pthreads_working=no
|
||||
], [
|
||||
dnl For cross compiling running this test is of no use. NetWare supports pthreads
|
||||
pthreads_working=no
|
||||
case $target_alias in
|
||||
*netware*)
|
||||
pthreads_working=yes
|
||||
esac
|
||||
]
|
||||
) ] )dnl
|
||||
], pthreads_working=no ) ] )dnl
|
||||
dnl
|
||||
dnl PTHREADS_CHECK()
|
||||
dnl
|
||||
@@ -108,7 +100,7 @@ dnl -pthreads gcc (Solaris)
|
||||
dnl -qthreaded AIX cc V5
|
||||
dnl -threads gcc (HP-UX)
|
||||
dnl
|
||||
AC_DEFUN([PTHREADS_CHECK],[
|
||||
AC_DEFUN(PTHREADS_CHECK,[
|
||||
|
||||
if test "$beos_threads" = "1"; then
|
||||
pthreads_working="yes"
|
||||
@@ -162,7 +154,7 @@ fi
|
||||
])dnl
|
||||
dnl
|
||||
dnl
|
||||
AC_DEFUN([PTHREADS_ASSIGN_VARS],[
|
||||
AC_DEFUN(PTHREADS_ASSIGN_VARS,[
|
||||
if test -n "$ac_cv_pthreads_lib"; then
|
||||
LIBS="$LIBS -l$ac_cv_pthreads_lib"
|
||||
fi
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
|
||||
dnl TSRM_CHECK_GCC_ARG(ARG, ACTION-IF-FOUND, ACTION-IF-NOT_FOUND)
|
||||
AC_DEFUN([TSRM_CHECK_GCC_ARG],[
|
||||
AC_DEFUN(TSRM_CHECK_GCC_ARG,[
|
||||
gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z-,a-z_)
|
||||
AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z-,a-z_), [
|
||||
echo 'void somefunc() { };' > conftest.c
|
||||
@@ -21,7 +21,7 @@ AC_DEFUN([TSRM_CHECK_GCC_ARG],[
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([TSRM_BASIC_CHECKS],[
|
||||
AC_DEFUN(TSRM_BASIC_CHECKS,[
|
||||
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
dnl AC_REQUIRE([AM_PROG_CC_STDC])dnl
|
||||
@@ -33,7 +33,7 @@ AC_CHECK_HEADERS(stdarg.h)
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([TSRM_CHECK_PTH],[
|
||||
AC_DEFUN(TSRM_CHECK_PTH,[
|
||||
|
||||
AC_MSG_CHECKING(for GNU Pth)
|
||||
PTH_PREFIX="`$1 --prefix`"
|
||||
@@ -50,7 +50,7 @@ AC_MSG_RESULT(yes - installed in $PTH_PREFIX)
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([TSRM_CHECK_ST],[
|
||||
AC_DEFUN(TSRM_CHECK_ST,[
|
||||
if test -r "$1/include/st.h"; then
|
||||
CPPFLAGS="$CPPFLAGS -I$1/include"
|
||||
LDFLAGS="$LDFLAGS -L$1/lib"
|
||||
@@ -70,7 +70,7 @@ AC_DEFUN([TSRM_CHECK_ST],[
|
||||
sinclude(threads.m4)
|
||||
sinclude(TSRM/threads.m4)
|
||||
|
||||
AC_DEFUN([TSRM_CHECK_PTHREADS],[
|
||||
AC_DEFUN(TSRM_CHECK_PTHREADS,[
|
||||
|
||||
PTHREADS_CHECK
|
||||
|
||||
@@ -89,7 +89,7 @@ fi
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([TSRM_THREADS_CHECKS],[
|
||||
AC_DEFUN(TSRM_THREADS_CHECKS,[
|
||||
|
||||
dnl For the thread implementations, we always use --with-*
|
||||
dnl to maintain consistency
|
||||
|
||||
@@ -7,8 +7,10 @@
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
# include "tsrm_config.w32.h"
|
||||
#elif defined(NETWARE)
|
||||
# include "tsrm_config.nw.h"
|
||||
#else
|
||||
# include <tsrm_config.h>
|
||||
# include "tsrm_config.h"
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
|
||||
|
||||
+11
-52
@@ -308,22 +308,15 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
|
||||
if (path_length == 0)
|
||||
return (0);
|
||||
if (path_length >= MAXPATHLEN)
|
||||
return (1);
|
||||
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
/* cwd_length can be 0 when getcwd() fails.
|
||||
* This can happen under solaris when a dir does not have read permissions
|
||||
* but *does* have execute permissions */
|
||||
if (IS_ABSOLUTE_PATH(path, path_length) || (state->cwd_length < 1)) {
|
||||
if (use_realpath) {
|
||||
if (realpath(path, resolved_path)) {
|
||||
path = resolved_path;
|
||||
path_length = strlen(path);
|
||||
} else {
|
||||
/* disable for now
|
||||
return 1; */
|
||||
}
|
||||
if (use_realpath && realpath(path, resolved_path)) {
|
||||
path = resolved_path;
|
||||
path_length = strlen(path);
|
||||
}
|
||||
} else { /* Concat current directory with relative path and then run realpath() on it */
|
||||
char *tmp;
|
||||
@@ -339,19 +332,9 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
memcpy(ptr, path, path_length);
|
||||
ptr += path_length;
|
||||
*ptr = '\0';
|
||||
if (strlen(tmp) >= MAXPATHLEN) {
|
||||
free(tmp);
|
||||
return 1;
|
||||
}
|
||||
if (use_realpath) {
|
||||
if (realpath(tmp, resolved_path)) {
|
||||
path = resolved_path;
|
||||
path_length = strlen(path);
|
||||
} else {
|
||||
/* disable for now
|
||||
free(tmp);
|
||||
return 1; */
|
||||
}
|
||||
if (use_realpath && realpath(tmp, resolved_path)) {
|
||||
path = resolved_path;
|
||||
path_length = strlen(path);
|
||||
}
|
||||
free(tmp);
|
||||
}
|
||||
@@ -746,7 +729,7 @@ CWD_API int virtual_stat(const char *path, struct stat_libc *buf TSRMLS_DC)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef TSRM_WIN32
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
@@ -868,24 +851,13 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
|
||||
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
|
||||
{
|
||||
int command_length;
|
||||
int dir_length, extra = 0;
|
||||
char *command_line;
|
||||
char *ptr, *dir;
|
||||
char *ptr;
|
||||
FILE *retval;
|
||||
|
||||
command_length = strlen(command);
|
||||
|
||||
dir_length = CWDG(cwd).cwd_length;
|
||||
dir = CWDG(cwd).cwd;
|
||||
while (dir_length > 0) {
|
||||
if (*dir == '\'') extra+=3;
|
||||
dir++;
|
||||
dir_length--;
|
||||
}
|
||||
dir_length = CWDG(cwd).cwd_length;
|
||||
dir = CWDG(cwd).cwd;
|
||||
|
||||
ptr = command_line = (char *) malloc(command_length + sizeof("cd '' ; ") + dir_length +extra+1+1);
|
||||
ptr = command_line = (char *) malloc(command_length + sizeof("cd ; ") + CWDG(cwd).cwd_length+1);
|
||||
if (!command_line) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -895,21 +867,8 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
|
||||
if (CWDG(cwd).cwd_length == 0) {
|
||||
*ptr++ = DEFAULT_SLASH;
|
||||
} else {
|
||||
*ptr++ = '\'';
|
||||
while (dir_length > 0) {
|
||||
switch (*dir) {
|
||||
case '\'':
|
||||
*ptr++ = '\'';
|
||||
*ptr++ = '\\';
|
||||
*ptr++ = '\'';
|
||||
/* fall-through */
|
||||
default:
|
||||
*ptr++ = *dir;
|
||||
}
|
||||
dir++;
|
||||
dir_length--;
|
||||
}
|
||||
*ptr++ = '\'';
|
||||
memcpy(ptr, CWDG(cwd).cwd, CWDG(cwd).cwd_length);
|
||||
ptr += CWDG(cwd).cwd_length;
|
||||
}
|
||||
|
||||
*ptr++ = ' ';
|
||||
|
||||
@@ -229,7 +229,7 @@ typedef struct _virtual_cwd_globals {
|
||||
#define VCWD_REALPATH(path, real_path) virtual_realpath(path, real_path TSRMLS_CC)
|
||||
#define VCWD_RENAME(oldname, newname) virtual_rename(oldname, newname TSRMLS_CC)
|
||||
#define VCWD_STAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
|
||||
#ifndef TSRM_WIN32
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
#define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
|
||||
#endif
|
||||
#define VCWD_UNLINK(path) virtual_unlink(path TSRMLS_CC)
|
||||
|
||||
+2
-2
@@ -6446,13 +6446,13 @@
|
||||
2003-02-08 Ilia Alshanetsky <ilia@prohost.org>
|
||||
|
||||
* zend_builtin_functions.c:
|
||||
The string.h is already available through zend.h, so the manual inclusion
|
||||
The string.h is already avaliable through zend.h, so the manual inclusion
|
||||
is not necessary.
|
||||
|
||||
2003-02-07 Ilia Alshanetsky <ilia@prohost.org>
|
||||
|
||||
* zend_builtin_functions.c:
|
||||
Added a check to ensure that string.h is available before trying to use it.
|
||||
Added a check to ensure that string.h is avaliable before trying to use it.
|
||||
|
||||
Thanks Andi.
|
||||
|
||||
|
||||
+1
-2
@@ -16,8 +16,7 @@ libZend_la_SOURCES=\
|
||||
zend_ini.c zend_qsort.c zend_objects.c zend_object_handlers.c \
|
||||
zend_objects_API.c zend_ts_hash.c zend_stream.c zend_mm.c \
|
||||
zend_default_classes.c zend_reflection_api.c \
|
||||
zend_iterators.c zend_interfaces.c zend_exceptions.c \
|
||||
zend_strtod.c zend_multibyte.c
|
||||
zend_iterators.c zend_interfaces.c zend_exceptions.c
|
||||
|
||||
libZend_la_LDFLAGS =
|
||||
libZend_la_LIBADD = @ZEND_EXTRA_LIBS@
|
||||
|
||||
+19
-27
@@ -7,20 +7,20 @@
|
||||
CFG=Zend - Win32 Release_inline
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Zend.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Zend.mak" CFG="Zend - Win32 Release_inline"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "Zend - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Zend - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Zend - Win32 Release_inline" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
@@ -95,7 +95,7 @@ LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
@@ -135,6 +135,10 @@ SOURCE=.\zend_default_classes.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_interfaces.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_dynamic_array.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -175,10 +179,6 @@ SOURCE=.\zend_ini_scanner.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_interfaces.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -243,10 +243,6 @@ SOURCE=.\zend_stream.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_strtod.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ts_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -295,6 +291,10 @@ SOURCE=.\zend_default_classes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_interfaces.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_dynamic_array.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -351,10 +351,6 @@ SOURCE=.\zend_ini_scanner.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_interfaces.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_istdiostream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -419,10 +415,6 @@ SOURCE=.\zend_stream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_strtod.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ts_hash.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -457,7 +449,7 @@ BuildCmds= \
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -512,7 +504,7 @@ BuildCmds= \
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
@@ -541,7 +533,7 @@ InputPath=.\zend_ini_scanner.l
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -578,7 +570,7 @@ InputPath=".\zend_language_scanner.l"
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
|
||||
+7
-38
@@ -4,7 +4,7 @@ dnl
|
||||
dnl This file contains Zend specific autoconf functions.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBZEND_BISON_CHECK],[
|
||||
AC_DEFUN(LIBZEND_BISON_CHECK,[
|
||||
|
||||
if test "$YACC" != "bison -y"; then
|
||||
AC_MSG_WARN(You will need bison if you want to regenerate the Zend parser.)
|
||||
@@ -19,29 +19,7 @@ fi
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBZEND_CHECK_INT_TYPE],[
|
||||
AC_MSG_CHECKING(for $1)
|
||||
AC_TRY_COMPILE([
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#elif HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif],
|
||||
[if (($1 *) 0)
|
||||
return 0;
|
||||
if (sizeof ($1))
|
||||
return 0;
|
||||
],[
|
||||
AC_DEFINE_UNQUOTED([HAVE_]translit($1,a-z_-,A-Z__), 1,[Define if $1 type is present. ])
|
||||
AC_MSG_RESULT(yes)
|
||||
], AC_MSG_RESULT(no)
|
||||
)dnl
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBZEND_BASIC_CHECKS],[
|
||||
AC_DEFUN(LIBZEND_BASIC_CHECKS,[
|
||||
|
||||
AC_REQUIRE([AC_PROG_YACC])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
@@ -64,8 +42,6 @@ if test "$ac_cv_prog_gcc" = "yes" -a "`uname -s`" = "Rhapsody"; then
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS(
|
||||
inttypes.h \
|
||||
stdint.h \
|
||||
limits.h \
|
||||
malloc.h \
|
||||
string.h \
|
||||
@@ -82,12 +58,12 @@ dlfcn.h)
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_SIGNAL
|
||||
|
||||
AC_DEFUN([LIBZEND_LIBDL_CHECKS],[
|
||||
AC_DEFUN(LIBZEND_LIBDL_CHECKS,[
|
||||
AC_CHECK_LIB(dl, dlopen, [LIBS="-ldl $LIBS"])
|
||||
AC_CHECK_FUNC(dlopen,[AC_DEFINE(HAVE_LIBDL, 1,[ ])])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBZEND_DLSYM_CHECK],[
|
||||
AC_DEFUN(LIBZEND_DLSYM_CHECK,[
|
||||
dnl
|
||||
dnl Ugly hack to check if dlsym() requires a leading underscore in symbol name.
|
||||
dnl
|
||||
@@ -106,10 +82,6 @@ dnl This is required for QNX and may be some BSD derived systems
|
||||
AC_CHECK_TYPE( uint, unsigned int )
|
||||
AC_CHECK_TYPE( ulong, unsigned long )
|
||||
|
||||
dnl Check if int32_t and uint32_t are defined
|
||||
LIBZEND_CHECK_INT_TYPE(int32_t)
|
||||
LIBZEND_CHECK_INT_TYPE(uint32_t)
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_FUNC_VPRINTF
|
||||
AC_FUNC_MEMCMP
|
||||
@@ -123,7 +95,7 @@ ZEND_FP_EXCEPT
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBZEND_ENABLE_DEBUG],[
|
||||
AC_DEFUN(LIBZEND_ENABLE_DEBUG,[
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug Compile with debugging symbols],[
|
||||
@@ -134,7 +106,7 @@ AC_ARG_ENABLE(debug,
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBZEND_OTHER_CHECKS],[
|
||||
AC_DEFUN(LIBZEND_OTHER_CHECKS,[
|
||||
|
||||
AC_ARG_ENABLE(maintainer-zts,
|
||||
[ --enable-maintainer-zts Enable thread safety - for code maintainers only],[
|
||||
@@ -265,9 +237,6 @@ int main()
|
||||
LIBZEND_MM_ALIGN_LOG2=`cat conftest.zend | cut -d ' ' -f 2`
|
||||
AC_DEFINE_UNQUOTED(ZEND_MM_ALIGNMENT, $LIBZEND_MM_ALIGN, [ ])
|
||||
AC_DEFINE_UNQUOTED(ZEND_MM_ALIGNMENT_LOG2, $LIBZEND_MM_ALIGN_LOG2, [ ])
|
||||
], [], [
|
||||
dnl cross-compile needs something here
|
||||
LIBZEND_MM_ALIGN=8
|
||||
])
|
||||
|
||||
AC_MSG_RESULT(done)
|
||||
@@ -275,7 +244,7 @@ AC_MSG_RESULT(done)
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([LIBZEND_CPLUSPLUS_CHECKS],[
|
||||
AC_DEFUN(LIBZEND_CPLUSPLUS_CHECKS,[
|
||||
|
||||
])
|
||||
|
||||
@@ -276,10 +276,6 @@ SOURCE=.\zend_stream.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_strtod.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ts_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -456,10 +452,6 @@ SOURCE=.\zend_stream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_strtod.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ts_hash.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
+4
-4
@@ -23,7 +23,9 @@
|
||||
#define ZEND_DLEXPORT
|
||||
#define ZEND_DLIMPORT
|
||||
|
||||
#ifndef NETWARE
|
||||
@TOP@
|
||||
#endif
|
||||
|
||||
#undef uint
|
||||
#undef ulong
|
||||
@@ -31,7 +33,9 @@
|
||||
/* Define if you want to enable memory limit support */
|
||||
#define MEMORY_LIMIT 0
|
||||
|
||||
#ifndef NETWARE
|
||||
@BOTTOM@
|
||||
#endif
|
||||
|
||||
#ifndef ZEND_ACCONFIG_H_NO_C_PROTOS
|
||||
|
||||
@@ -43,10 +47,6 @@
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IEEEFP_H
|
||||
# include <ieeefp.h>
|
||||
#endif
|
||||
|
||||
+4
-31
@@ -2,7 +2,7 @@ dnl $Id$
|
||||
dnl
|
||||
dnl This file contains local autoconf functions.
|
||||
|
||||
AC_DEFUN([ZEND_FP_EXCEPT],[
|
||||
AC_DEFUN(ZEND_FP_EXCEPT,[
|
||||
AC_CACHE_CHECK(whether fp_except is defined, ac_cv_type_fp_except,[
|
||||
AC_TRY_COMPILE([
|
||||
#include <floatingpoint.h>
|
||||
@@ -23,7 +23,7 @@ fp_except x = (fp_except) 0;
|
||||
dnl
|
||||
dnl Check for broken sprintf()
|
||||
dnl
|
||||
AC_DEFUN([AC_ZEND_BROKEN_SPRINTF],[
|
||||
AC_DEFUN(AC_ZEND_BROKEN_SPRINTF,[
|
||||
AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
|
||||
AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
|
||||
ac_cv_broken_sprintf=no
|
||||
@@ -41,34 +41,7 @@ AC_DEFUN([AC_ZEND_BROKEN_SPRINTF],[
|
||||
AC_DEFINE_UNQUOTED(ZEND_BROKEN_SPRINTF, $ac_result, [Whether sprintf is broken])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl AC_ZEND_C_BIGENDIAN
|
||||
dnl Replacement macro for AC_C_BIGENDIAN
|
||||
dnl
|
||||
AC_DEFUN([AC_ZEND_C_BIGENDIAN],
|
||||
[AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,
|
||||
[
|
||||
ac_cv_c_bigendian_php=unknown
|
||||
AC_TRY_RUN(
|
||||
[
|
||||
int main(void)
|
||||
{
|
||||
short one = 1;
|
||||
char *cp = (char *)&one;
|
||||
|
||||
if (*cp == 0) {
|
||||
return(0);
|
||||
} else {
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown])
|
||||
])
|
||||
if test $ac_cv_c_bigendian_php = yes; then
|
||||
AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([AM_SET_LIBTOOL_VARIABLE],[
|
||||
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
|
||||
])
|
||||
|
||||
@@ -10,14 +10,10 @@ AC_PROG_CC
|
||||
AM_PROG_LEX
|
||||
AM_PROG_CC_STDC
|
||||
ZEND_VERSION=$VERSION
|
||||
AC_ZEND_C_BIGENDIAN
|
||||
|
||||
dnl We want this one before the checks, so the checks can modify CFLAGS.
|
||||
test -z "$CFLAGS" && auto_cflags=1
|
||||
|
||||
AC_CHECK_SIZEOF(long, 8)
|
||||
AC_CHECK_SIZEOF(int, 4)
|
||||
|
||||
sinclude(Zend.m4)
|
||||
|
||||
LIBZEND_BASIC_CHECKS
|
||||
|
||||
@@ -19,55 +19,55 @@ for ($i = 0; $i < 8; $i++) {
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
|
||||
|
||||
@@ -11,19 +11,11 @@ class array_iterator implements IteratorAggregate {
|
||||
|
||||
$obj = new array_iterator;
|
||||
|
||||
try
|
||||
{
|
||||
foreach ($obj as $property => $value)
|
||||
{
|
||||
var_dump($value);
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
echo $e->getMessage() . "\n";
|
||||
foreach ($obj as $property => $value) {
|
||||
var_dump($value);
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Objects returned by array_iterator::getIterator() must be traversable or implement interface Iterator
|
||||
===DONE===
|
||||
Warning: Objects returned by array_iterator::getIterator() must be traversable or implement interface Iterator in %sbug26229.php on line %d
|
||||
===DONE===
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
Bug #27145 (Errors messages print unmangled PPP property names)
|
||||
--FILE--
|
||||
<?php
|
||||
class a {
|
||||
protected static $v = "aa";
|
||||
}
|
||||
class b extends a {
|
||||
protected static $v = "bb";
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot redeclare property static protected a::$v in class b in %s on line %d
|
||||
@@ -1,72 +0,0 @@
|
||||
--TEST--
|
||||
Bug #27798 (private / protected variables not exposed by get_object_vars() inside class)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Base
|
||||
{
|
||||
public $Foo = 1;
|
||||
protected $Bar = 2;
|
||||
private $Baz = 3;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
echo __METHOD__ . "\n";
|
||||
var_dump(get_object_vars($this));
|
||||
}
|
||||
}
|
||||
|
||||
class Child extends Base
|
||||
{
|
||||
private $Baz = 4;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
echo __METHOD__ . "\n";
|
||||
var_dump(get_object_vars($this));
|
||||
}
|
||||
}
|
||||
|
||||
var_dump(get_object_vars(new Base));
|
||||
var_dump(get_object_vars(new Child));
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
Base::__construct
|
||||
array(3) {
|
||||
["Foo"]=>
|
||||
int(1)
|
||||
["Bar"]=>
|
||||
int(2)
|
||||
["Baz"]=>
|
||||
int(3)
|
||||
}
|
||||
array(1) {
|
||||
["Foo"]=>
|
||||
int(1)
|
||||
}
|
||||
Base::__construct
|
||||
array(3) {
|
||||
["Baz"]=>
|
||||
int(4)
|
||||
["Foo"]=>
|
||||
int(1)
|
||||
["Bar"]=>
|
||||
int(2)
|
||||
}
|
||||
Child::__construct
|
||||
array(3) {
|
||||
["Baz"]=>
|
||||
int(4)
|
||||
["Foo"]=>
|
||||
int(1)
|
||||
["Bar"]=>
|
||||
int(2)
|
||||
}
|
||||
array(1) {
|
||||
["Foo"]=>
|
||||
int(1)
|
||||
}
|
||||
===DONE===
|
||||
@@ -1,65 +0,0 @@
|
||||
--TEST--
|
||||
Bug #28442 (Changing a static variables in a class changes it across sub/super classes.)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class ClassA
|
||||
{
|
||||
static $prop;
|
||||
}
|
||||
|
||||
class ClassB extends ClassA
|
||||
{
|
||||
static $prop;
|
||||
}
|
||||
|
||||
class ClassC extends ClassB
|
||||
{
|
||||
}
|
||||
|
||||
echo "===INIT===\n";
|
||||
ClassA::$prop = 'A';
|
||||
ClassB::$prop = 'B';
|
||||
ClassC::$prop = 'C';
|
||||
var_dump(ClassA::$prop);
|
||||
var_dump(ClassB::$prop);
|
||||
var_dump(ClassC::$prop);
|
||||
|
||||
echo "===SetA===\n";
|
||||
ClassA::$prop = 'A2';
|
||||
var_dump(ClassA::$prop);
|
||||
var_dump(ClassB::$prop);
|
||||
var_dump(ClassC::$prop);
|
||||
|
||||
echo "===SetB===\n";
|
||||
ClassB::$prop = 'B2';
|
||||
var_dump(ClassA::$prop);
|
||||
var_dump(ClassB::$prop);
|
||||
var_dump(ClassC::$prop);
|
||||
|
||||
echo "===SetC===\n";
|
||||
ClassC::$prop = 'C2';
|
||||
var_dump(ClassA::$prop);
|
||||
var_dump(ClassB::$prop);
|
||||
var_dump(ClassC::$prop);
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
===INIT===
|
||||
string(1) "A"
|
||||
string(1) "C"
|
||||
string(1) "C"
|
||||
===SetA===
|
||||
string(2) "A2"
|
||||
string(1) "C"
|
||||
string(1) "C"
|
||||
===SetB===
|
||||
string(2) "A2"
|
||||
string(2) "B2"
|
||||
string(2) "B2"
|
||||
===SetC===
|
||||
string(2) "A2"
|
||||
string(2) "C2"
|
||||
string(2) "C2"
|
||||
===DONE===
|
||||
@@ -1,74 +0,0 @@
|
||||
--TEST--
|
||||
Bug #28444 (Cannot access undefined property for object with overloaded property access)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Object
|
||||
{
|
||||
public $x;
|
||||
|
||||
function __construct($x)
|
||||
{
|
||||
$this->x = $x;
|
||||
}
|
||||
}
|
||||
|
||||
class Overloaded
|
||||
{
|
||||
public $props = array();
|
||||
public $x;
|
||||
|
||||
function __construct($x)
|
||||
{
|
||||
$this->x = new Object($x);
|
||||
}
|
||||
|
||||
function __get($prop)
|
||||
{
|
||||
echo __METHOD__ . "($prop)\n";
|
||||
return $this->props[$prop];
|
||||
}
|
||||
|
||||
function __set($prop, $val)
|
||||
{
|
||||
echo __METHOD__ . "($prop,$val)\n";
|
||||
$this->props[$prop] = $val;
|
||||
}
|
||||
}
|
||||
$y = new Overloaded(2);
|
||||
var_dump($y->x);
|
||||
var_dump($y->x->x);
|
||||
var_dump($y->x->x = 3);
|
||||
var_dump($y->y = 3);
|
||||
var_dump($y->y);
|
||||
var_dump($y->z = new Object(4));
|
||||
var_dump($y->z->x);
|
||||
$t = $y->z;
|
||||
var_dump($t->x = 5);
|
||||
var_dump($y->z->x = 6);
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
object(Object)#%d (1) {
|
||||
["x"]=>
|
||||
int(2)
|
||||
}
|
||||
int(2)
|
||||
int(3)
|
||||
Overloaded::__set(y,3)
|
||||
int(3)
|
||||
Overloaded::__get(y)
|
||||
int(3)
|
||||
Overloaded::__set(z,Object id #3)
|
||||
object(Object)#%d (1) {
|
||||
["x"]=>
|
||||
int(4)
|
||||
}
|
||||
Overloaded::__get(z)
|
||||
int(4)
|
||||
Overloaded::__get(z)
|
||||
int(5)
|
||||
Overloaded::__get(z)
|
||||
int(6)
|
||||
===DONE===
|
||||
@@ -1,34 +0,0 @@
|
||||
--TEST--
|
||||
Bug #29368 (The destructor is called when an exception is thrown from the constructor)
|
||||
--FILE--
|
||||
<?
|
||||
|
||||
class Foo
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
echo __METHOD__ . "\n";
|
||||
throw new Exception;
|
||||
}
|
||||
function __destruct()
|
||||
{
|
||||
echo __METHOD__ . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$bar = new Foo;
|
||||
} catch(Exception $exc)
|
||||
{
|
||||
echo "Caught exception!\n";
|
||||
}
|
||||
|
||||
unset($bar);
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Foo::__construct
|
||||
Caught exception!
|
||||
===DONE===
|
||||
@@ -1,13 +0,0 @@
|
||||
--TEST--
|
||||
Bug #29883 (isset gives invalid values on strings)
|
||||
--FILE--
|
||||
<?php
|
||||
$x = "bug";
|
||||
var_dump(isset($x[-1]));
|
||||
var_dump(isset($x["1"]));
|
||||
echo $x["1"]."\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
bool(true)
|
||||
u
|
||||
@@ -1,32 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30725 (PHP segfaults when an exception is thrown in getIterator() within foreach)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Test implements IteratorAggregate
|
||||
{
|
||||
function getIterator()
|
||||
{
|
||||
throw new Exception();
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$it = new Test;
|
||||
foreach($it as $v)
|
||||
{
|
||||
echo "Fail\n";
|
||||
}
|
||||
echo "Wrong\n";
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
echo "Caught\n";
|
||||
}
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
Caught
|
||||
===DONE===
|
||||
@@ -1,13 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30922 (reflective functions crash PHP when interfaces extend themselves)
|
||||
--FILE--
|
||||
<?php
|
||||
interface RecurisiveFooFar extends RecurisiveFooFar {}
|
||||
class A implements RecurisiveFooFar {}
|
||||
|
||||
$a = new A();
|
||||
var_dump($a instanceOf A);
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Interface RecurisiveFooFar cannot not implement itself in %sbug30922.php on line %d
|
||||
@@ -1,53 +0,0 @@
|
||||
--TEST--
|
||||
Bug #31098 (isset() / empty() incorrectly returns true in dereference of a wrong type)
|
||||
--FILE--
|
||||
<?php
|
||||
$a = '';
|
||||
var_dump(isset($a->b));
|
||||
$a = 'a';
|
||||
var_dump(isset($a->b));
|
||||
$a = '0';
|
||||
var_dump(isset($a->b));
|
||||
$a = '';
|
||||
var_dump(isset($a{'b'}));
|
||||
$a = 'a';
|
||||
var_dump(isset($a{'b'}));
|
||||
$a = '0';
|
||||
var_dump(isset($a{'b'}));
|
||||
|
||||
$simpleString = "Bogus String Text";
|
||||
echo isset($simpleString->wrong)?"bug\n":"ok\n";
|
||||
echo isset($simpleString["wrong"])?"ok\n":"bug\n";
|
||||
echo isset($simpleString[-1])?"bug\n":"ok\n";
|
||||
echo isset($simpleString[0])?"ok\n":"bug\n";
|
||||
echo isset($simpleString["0"])?"ok\n":"bug\n";
|
||||
echo isset($simpleString["16"])?"ok\n":"bug\n";
|
||||
echo isset($simpleString["17"])?"bug\n":"ok\n";
|
||||
echo isset($simpleString["wrong"][0])?"bug\n":"ok\n";
|
||||
echo $simpleString->wrong === null?"ok\n":"bug\n";
|
||||
echo $simpleString["wrong"] === "B"?"ok\n":"bug\n";
|
||||
echo $simpleString["0"] === "B"?"ok\n":"bug\n";
|
||||
$simpleString["wrong"] = "f";
|
||||
echo $simpleString["0"] === "f"?"ok\n":"bug\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(true)
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
|
||||
Notice: Trying to get property of non-object in %sbug31098.php on line %d
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
@@ -1,97 +0,0 @@
|
||||
--TEST--
|
||||
Bug #31683 (changes to $name in __get($name) override future parameters)
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Foo implements ArrayAccess {
|
||||
|
||||
function __get($test) {
|
||||
var_dump($test);
|
||||
$test = 'bug';
|
||||
}
|
||||
|
||||
function __set($test, $val) {
|
||||
var_dump($test);
|
||||
var_dump($val);
|
||||
$test = 'bug';
|
||||
$val = 'bug';
|
||||
}
|
||||
|
||||
function __call($test, $arg) {
|
||||
var_dump($test);
|
||||
$test = 'bug';
|
||||
}
|
||||
|
||||
function offsetget($test) {
|
||||
var_dump($test);
|
||||
$test = 'bug';
|
||||
return 123;
|
||||
}
|
||||
|
||||
function offsetset($test, $val) {
|
||||
var_dump($test);
|
||||
var_dump($val);
|
||||
$test = 'bug';
|
||||
$val = 'bug';
|
||||
}
|
||||
|
||||
function offsetexists($test) {
|
||||
var_dump($test);
|
||||
$test = 'bug';
|
||||
}
|
||||
|
||||
function offsetunset($test) {
|
||||
var_dump($test);
|
||||
$test = 'bug';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$foo = new Foo();
|
||||
$a = "ok";
|
||||
|
||||
for ($i=0; $i < 2; $i++) {
|
||||
$foo->ok("ok");
|
||||
$foo->ok;
|
||||
$foo->ok = "ok";
|
||||
$x = $foo["ok"];
|
||||
$foo["ok"] = "ok";
|
||||
isset($foo["ok"]);
|
||||
unset($foo["ok"]);
|
||||
// $foo[];
|
||||
$foo[] = "ok";
|
||||
// isset($foo[]);
|
||||
// unset($foo[]);
|
||||
$foo->$a;
|
||||
echo "---\n";
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
NULL
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
---
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
NULL
|
||||
string(2) "ok"
|
||||
string(2) "ok"
|
||||
---
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Bug #31720 (Invalid object callbacks not caught in array_walk())
|
||||
--FILE--
|
||||
<?
|
||||
$array = array('at least one element');
|
||||
|
||||
array_walk($array, array($nonesuchvar,'show'));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Notice: Undefined variable: nonesuchvar in %s on line %d
|
||||
|
||||
Notice: Non-callable array passed to zend_call_function() in %s on line %d
|
||||
|
||||
Warning: array_walk(): Unable to call Array() - function does not exist in %s on line %d
|
||||
===DONE===
|
||||
@@ -1,36 +0,0 @@
|
||||
--TEST--
|
||||
Bug # 32226 (SEGV with exception handler on non existing instance)
|
||||
--FILE--
|
||||
<?
|
||||
|
||||
class A
|
||||
{
|
||||
public function A()
|
||||
{
|
||||
set_exception_handler(array($this, 'EH'));
|
||||
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public function EH()
|
||||
{
|
||||
restore_exception_handler();
|
||||
|
||||
throw new Exception();
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$a = new A();
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
echo "Caught\n";
|
||||
}
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
Caught
|
||||
===DONE===
|
||||
@@ -1,35 +0,0 @@
|
||||
--TEST--
|
||||
Bug #32290 (calling call_user_func_array() ends in infinite loop within child class)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class TestA
|
||||
{
|
||||
public function doSomething($i)
|
||||
{
|
||||
echo __METHOD__ . "($this)\n";
|
||||
return --$i;
|
||||
}
|
||||
}
|
||||
|
||||
class TestB extends TestA
|
||||
{
|
||||
public function doSomething($i)
|
||||
{
|
||||
echo __METHOD__ . "($this)\n";
|
||||
$i++;
|
||||
if ($i >= 5) return 5;
|
||||
return call_user_func_array(array("TestA","doSomething"), array($i));
|
||||
}
|
||||
}
|
||||
|
||||
$x = new TestB();
|
||||
var_dump($x->doSomething(1));
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
TestB::doSomething(Object id #%d)
|
||||
TestA::doSomething(Object id #%d)
|
||||
int(1)
|
||||
===DONE===
|
||||
@@ -1,28 +0,0 @@
|
||||
--TEST--
|
||||
Bug - crash in debug_backtrace when trace starts in eval
|
||||
--FILE--
|
||||
<?php
|
||||
function foo() {
|
||||
bar();
|
||||
}
|
||||
|
||||
function bar() {
|
||||
boo();
|
||||
}
|
||||
|
||||
function boo(){
|
||||
debug_print_backtrace();
|
||||
}
|
||||
|
||||
eval("foo();");
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
#0 boo() called at [%s:%d]
|
||||
#1 bar() called at [%s:%d]
|
||||
#2 foo() called at [%s(%d) : eval()'d code:1]
|
||||
#3 eval() called at [%s:%d]
|
||||
Done
|
||||
===DONE===
|
||||
+9
-18
@@ -494,12 +494,6 @@ static void zend_new_thread_end_handler(THREAD_T thread_id TSRMLS_DC)
|
||||
zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC);
|
||||
}
|
||||
|
||||
|
||||
static void alloc_globals_dtor(zend_alloc_globals *alloc_globals_p TSRMLS_DC)
|
||||
{
|
||||
shutdown_memory_manager(0, 1 TSRMLS_CC);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -509,6 +503,14 @@ static void alloc_globals_ctor(zend_alloc_globals *alloc_globals_p TSRMLS_DC)
|
||||
}
|
||||
|
||||
|
||||
#ifdef ZTS
|
||||
static void alloc_globals_dtor(zend_alloc_globals *alloc_globals_p TSRMLS_DC)
|
||||
{
|
||||
shutdown_memory_manager(0, 1 TSRMLS_CC);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
/* FreeBSD and DragonFly floating point precision fix */
|
||||
#include <floatingpoint.h>
|
||||
@@ -703,7 +705,6 @@ void zend_shutdown(TSRMLS_D)
|
||||
|
||||
zend_hash_destroy(GLOBAL_AUTO_GLOBALS_TABLE);
|
||||
free(GLOBAL_AUTO_GLOBALS_TABLE);
|
||||
|
||||
zend_shutdown_extensions(TSRMLS_C);
|
||||
free(zend_version_info);
|
||||
|
||||
@@ -838,7 +839,6 @@ static int exec_done_cb(zend_module_entry *module TSRMLS_DC)
|
||||
void zend_post_deactivate_modules(TSRMLS_D)
|
||||
{
|
||||
zend_hash_apply(&module_registry, (apply_func_t) exec_done_cb TSRMLS_CC);
|
||||
zend_hash_apply(&module_registry, (apply_func_t) module_registry_unload_temp TSRMLS_CC);
|
||||
}
|
||||
|
||||
|
||||
@@ -865,7 +865,6 @@ ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval
|
||||
ZEND_API void zend_error(int type, const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_list usr_copy;
|
||||
zval ***params;
|
||||
zval *retval;
|
||||
zval *z_error_type, *z_error_message, *z_error_filename, *z_error_lineno, *z_context;
|
||||
@@ -937,15 +936,7 @@ ZEND_API void zend_error(int type, const char *format, ...)
|
||||
ALLOC_INIT_ZVAL(z_error_lineno);
|
||||
ALLOC_INIT_ZVAL(z_context);
|
||||
|
||||
#if defined(va_copy)
|
||||
va_copy(usr_copy, args);
|
||||
#else
|
||||
usr_copy = args;
|
||||
#endif
|
||||
z_error_message->value.str.len = zend_vspprintf(&z_error_message->value.str.val, 0, format, usr_copy);
|
||||
#if defined(va_copy)
|
||||
va_end(usr_copy);
|
||||
#endif
|
||||
z_error_message->value.str.len = zend_vspprintf(&z_error_message->value.str.val, 0, format, args);
|
||||
z_error_message->type = IS_STRING;
|
||||
|
||||
z_error_type->value.lval = type;
|
||||
|
||||
+6
-22
@@ -22,7 +22,7 @@
|
||||
#ifndef ZEND_H
|
||||
#define ZEND_H
|
||||
|
||||
#define ZEND_VERSION "2.0.4-dev"
|
||||
#define ZEND_VERSION "2.0.2RC1"
|
||||
|
||||
#define ZEND_ENGINE_2
|
||||
|
||||
@@ -44,13 +44,13 @@
|
||||
# include "zend_config.w32.h"
|
||||
# define ZEND_PATHS_SEPARATOR ';'
|
||||
#elif defined(NETWARE)
|
||||
# include <zend_config.h>
|
||||
# define ZEND_PATHS_SEPARATOR ';'
|
||||
# include "zend_config.nw.h"
|
||||
# include "acconfig.h"
|
||||
#elif defined(__riscos__)
|
||||
# include <zend_config.h>
|
||||
# include "zend_config.h"
|
||||
# define ZEND_PATHS_SEPARATOR ';'
|
||||
#else
|
||||
# include <zend_config.h>
|
||||
# include "zend_config.h"
|
||||
# define ZEND_PATHS_SEPARATOR ':'
|
||||
#endif
|
||||
|
||||
@@ -103,8 +103,6 @@ const char *zend_mh_bundle_error(void);
|
||||
|
||||
# if defined(RTLD_GROUP) && defined(RTLD_WORLD) && defined(RTLD_PARENT)
|
||||
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT)
|
||||
# elif defined(RTLD_DEEPBIND)
|
||||
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND)
|
||||
# else
|
||||
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL)
|
||||
# endif
|
||||
@@ -119,7 +117,7 @@ const char *zend_mh_bundle_error(void);
|
||||
# define ZEND_EXTENSIONS_SUPPORT 1
|
||||
#elif defined(HAVE_MACH_O_DYLD_H)
|
||||
# define DL_LOAD(libname) zend_mh_bundle_load(libname)
|
||||
# define DL_UNLOAD zend_mh_bundle_unload
|
||||
# define DL_UNLOAD(handle) zend_mh_bundle_unload(handle)
|
||||
# define DL_FETCH_SYMBOL(h,s) zend_mh_bundle_symbol(h,s)
|
||||
# define DL_ERROR zend_mh_bundle_error
|
||||
# define DL_HANDLE void *
|
||||
@@ -603,20 +601,6 @@ END_EXTERN_C()
|
||||
(*ppzv_dest)->refcount = refcount; \
|
||||
}
|
||||
|
||||
#define SEPARATE_ARG_IF_REF(varptr) \
|
||||
if (PZVAL_IS_REF(varptr)) { \
|
||||
zval *original_var = varptr; \
|
||||
ALLOC_ZVAL(varptr); \
|
||||
varptr->value = original_var->value; \
|
||||
varptr->type = original_var->type; \
|
||||
varptr->is_ref = 0; \
|
||||
varptr->refcount = 1; \
|
||||
zval_copy_ctor(varptr); \
|
||||
} else { \
|
||||
varptr->refcount++; \
|
||||
}
|
||||
|
||||
|
||||
#define ZEND_MAX_RESERVED_RESOURCES 4
|
||||
|
||||
|
||||
|
||||
+26
-32
@@ -687,16 +687,6 @@ ZEND_API void zend_merge_properties(zval *obj, HashTable *properties, int destro
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC)
|
||||
{
|
||||
if (!class_type->constants_updated) {
|
||||
zend_hash_apply_with_argument(&class_type->default_properties, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
|
||||
zend_hash_apply_with_argument(class_type->static_members, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
|
||||
class_type->constants_updated = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* This function requires 'properties' to contain all props declared in the
|
||||
* class and all props being public. If only a subset is given or the class
|
||||
* has protected members then you need to merge the properties seperately by
|
||||
@@ -711,7 +701,11 @@ ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type
|
||||
zend_error(E_ERROR, "Cannot instantiate %s %s", what, class_type->name);
|
||||
}
|
||||
|
||||
zend_update_class_constants(class_type TSRMLS_CC);
|
||||
if (!class_type->constants_updated) {
|
||||
zend_hash_apply_with_argument(&class_type->default_properties, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
|
||||
zend_hash_apply_with_argument(class_type->static_members, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
|
||||
class_type->constants_updated = 1;
|
||||
}
|
||||
|
||||
arg->type = IS_OBJECT;
|
||||
if (class_type->create_object == NULL) {
|
||||
@@ -1381,7 +1375,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
|
||||
}
|
||||
while (ptr->fname) {
|
||||
if (zend_hash_exists(target_function_table, ptr->fname, strlen(ptr->fname)+1)) {
|
||||
zend_error(error_type, "Function registration failed - duplicate name - %s%s%s", scope ? scope->name : "", scope ? "::" : "", ptr->fname);
|
||||
zend_error(error_type, "Function registration failed - duplicate name - %s", ptr->fname);
|
||||
}
|
||||
ptr++;
|
||||
}
|
||||
@@ -1488,6 +1482,9 @@ void module_destructor(zend_module_entry *module)
|
||||
if (module->type == MODULE_TEMPORARY) {
|
||||
zend_clean_module_rsrc_dtors(module->module_number TSRMLS_CC);
|
||||
clean_module_constants(module->module_number TSRMLS_CC);
|
||||
if (module->request_shutdown_func) {
|
||||
module->request_shutdown_func(module->type, module->module_number TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
|
||||
if (module->module_started && module->module_shutdown_func) {
|
||||
@@ -1501,9 +1498,9 @@ void module_destructor(zend_module_entry *module)
|
||||
zend_unregister_functions(module->functions, -1, NULL TSRMLS_CC);
|
||||
}
|
||||
|
||||
#if HAVE_LIBDL || defined(HAVE_MACH_O_DYLD_H)
|
||||
#if HAVE_LIBDL
|
||||
if (module->handle) {
|
||||
DL_UNLOAD(module->handle);
|
||||
dlclose(module->handle);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1525,23 +1522,24 @@ int module_registry_request_startup(zend_module_entry *module TSRMLS_DC)
|
||||
}
|
||||
|
||||
|
||||
/* call request shutdown for all modules */
|
||||
/* for persistent modules - call request shutdown and flag NOT to erase
|
||||
* for temporary modules - do nothing, and flag to erase
|
||||
*/
|
||||
int module_registry_cleanup(zend_module_entry *module TSRMLS_DC)
|
||||
{
|
||||
if (module->request_shutdown_func) {
|
||||
#if 0
|
||||
zend_printf("%s: Request shutdown\n", module->name);
|
||||
#endif
|
||||
module->request_shutdown_func(module->type, module->module_number TSRMLS_CC);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int module_registry_unload_temp(zend_module_entry *module TSRMLS_DC)
|
||||
{
|
||||
switch (module->type) {
|
||||
case MODULE_PERSISTENT:
|
||||
if (module->request_shutdown_func) {
|
||||
#if 0
|
||||
zend_printf("%s: Request shutdown\n", module->name);
|
||||
#endif
|
||||
module->request_shutdown_func(module->type, module->module_number TSRMLS_CC);
|
||||
}
|
||||
return 0;
|
||||
break;
|
||||
case MODULE_TEMPORARY:
|
||||
return 1;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -1603,9 +1601,7 @@ ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *cla
|
||||
ZEND_API void zend_class_implements(zend_class_entry *class_entry TSRMLS_DC, int num_interfaces, ...)
|
||||
{
|
||||
zend_class_entry *interface_entry;
|
||||
int ce_num = class_entry->num_interfaces, impl_num;
|
||||
va_list interface_list;
|
||||
va_start(interface_list, num_interfaces);
|
||||
|
||||
if (class_entry->type & ZEND_INTERNAL_CLASS) {
|
||||
class_entry->interfaces = realloc(class_entry->interfaces, sizeof(zend_class_entry*) * (class_entry->num_interfaces+num_interfaces));
|
||||
@@ -1613,13 +1609,11 @@ ZEND_API void zend_class_implements(zend_class_entry *class_entry TSRMLS_DC, int
|
||||
class_entry->interfaces = erealloc(class_entry->interfaces, sizeof(zend_class_entry*) * (class_entry->num_interfaces+num_interfaces));
|
||||
}
|
||||
|
||||
va_start(interface_list, num_interfaces);
|
||||
while (num_interfaces--) {
|
||||
interface_entry = va_arg(interface_list, zend_class_entry *);
|
||||
class_entry->interfaces[class_entry->num_interfaces++] = interface_entry;
|
||||
}
|
||||
impl_num = class_entry->num_interfaces;
|
||||
while(ce_num < impl_num) {
|
||||
zend_do_implement_interface(class_entry, class_entry->interfaces[ce_num++] TSRMLS_CC);
|
||||
zend_do_implement_interface(class_entry, interface_entry TSRMLS_CC);
|
||||
}
|
||||
va_end(interface_list);
|
||||
}
|
||||
|
||||
@@ -188,7 +188,6 @@ ZEND_API int zend_declare_property_null(zend_class_entry *ce, char *name, int na
|
||||
ZEND_API int zend_declare_property_long(zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC);
|
||||
ZEND_API int zend_declare_property_string(zend_class_entry *ce, char *name, int name_length, char *value, int access_type TSRMLS_DC);
|
||||
|
||||
ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC);
|
||||
ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, char *name, int name_length, zval *value TSRMLS_DC);
|
||||
ZEND_API void zend_update_property_null(zend_class_entry *scope, zval *object, char *name, int name_length TSRMLS_DC);
|
||||
ZEND_API void zend_update_property_long(zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC);
|
||||
|
||||
+63
-117
@@ -433,7 +433,7 @@ ZEND_FUNCTION(error_reporting)
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto bool define(string constant_name, mixed value, boolean case_sensitive=true)
|
||||
/* {{{ proto bool define(string constant_name, mixed value, case_sensitive=true)
|
||||
Define a new constant */
|
||||
ZEND_FUNCTION(define)
|
||||
{
|
||||
@@ -603,21 +603,12 @@ static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool only_subclass)
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
if (only_subclass && Z_TYPE_PP(obj) == IS_STRING) {
|
||||
zend_class_entry **the_ce;
|
||||
if (zend_lookup_class(Z_STRVAL_PP(obj), Z_STRLEN_PP(obj), &the_ce TSRMLS_CC) == FAILURE) {
|
||||
zend_error(E_WARNING, "Unknown class passed as parameter");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
instance_ce = *the_ce;
|
||||
} else if (Z_TYPE_PP(obj) != IS_OBJECT) {
|
||||
if (Z_TYPE_PP(obj) != IS_OBJECT) {
|
||||
RETURN_FALSE;
|
||||
} else {
|
||||
instance_ce = NULL;
|
||||
}
|
||||
|
||||
/* TBI!! new object handlers */
|
||||
if (Z_TYPE_PP(obj) == IS_OBJECT && !HAS_CLASS_ENTRY(**obj)) {
|
||||
if (!HAS_CLASS_ENTRY(**obj)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -627,11 +618,7 @@ static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool only_subclass)
|
||||
retval = 0;
|
||||
} else {
|
||||
if (only_subclass) {
|
||||
if (!instance_ce) {
|
||||
instance_ce = Z_OBJCE_PP(obj)->parent;
|
||||
} else {
|
||||
instance_ce = instance_ce->parent;
|
||||
}
|
||||
instance_ce = Z_OBJCE_PP(obj)->parent;
|
||||
} else {
|
||||
instance_ce = Z_OBJCE_PP(obj);
|
||||
}
|
||||
@@ -670,72 +657,59 @@ ZEND_FUNCTION(is_a)
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ add_class_vars */
|
||||
static void add_class_vars(zend_class_entry *ce, HashTable *properties, zval *return_value TSRMLS_DC)
|
||||
{
|
||||
int instanceof = EG(scope) && instanceof_function(EG(scope), ce TSRMLS_CC);
|
||||
|
||||
if (zend_hash_num_elements(properties) > 0) {
|
||||
HashPosition pos;
|
||||
zval **prop;
|
||||
|
||||
zend_hash_internal_pointer_reset_ex(properties, &pos);
|
||||
while (zend_hash_get_current_data_ex(properties, (void **) &prop, &pos) == SUCCESS) {
|
||||
char *key, *class_name, *prop_name;
|
||||
uint key_len;
|
||||
ulong num_index;
|
||||
zval *prop_copy;
|
||||
|
||||
zend_hash_get_current_key_ex(properties, &key, &key_len, &num_index, 0, &pos);
|
||||
zend_hash_move_forward_ex(properties, &pos);
|
||||
zend_unmangle_property_name(key, &class_name, &prop_name);
|
||||
if (class_name) {
|
||||
if (class_name[0] != '*' && strcmp(class_name, ce->name)) {
|
||||
/* filter privates from base classes */
|
||||
continue;
|
||||
} else if (!instanceof) {
|
||||
/* filter protected if not inside class */
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* copy: enforce read only access */
|
||||
ALLOC_ZVAL(prop_copy);
|
||||
*prop_copy = **prop;
|
||||
zval_copy_ctor(prop_copy);
|
||||
INIT_PZVAL(prop_copy);
|
||||
|
||||
/* this is necessary to make it able to work with default array
|
||||
* properties, returned to user */
|
||||
if (Z_TYPE_P(prop_copy) == IS_CONSTANT_ARRAY || Z_TYPE_P(prop_copy) == IS_CONSTANT) {
|
||||
zval_update_constant(&prop_copy, 0 TSRMLS_CC);
|
||||
}
|
||||
|
||||
add_assoc_zval(return_value, prop_name, prop_copy);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto array get_class_vars(string class_name)
|
||||
Returns an array of default properties of the class. */
|
||||
Returns an array of default properties of the class */
|
||||
ZEND_FUNCTION(get_class_vars)
|
||||
{
|
||||
char *class_name;
|
||||
int class_name_len;
|
||||
zend_class_entry **pce;
|
||||
zval **class_name;
|
||||
zend_class_entry *ce, **pce;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &class_name, &class_name_len) == FAILURE) {
|
||||
return;
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
if (zend_lookup_class(class_name, class_name_len, &pce TSRMLS_CC) == FAILURE) {
|
||||
convert_to_string_ex(class_name);
|
||||
|
||||
if (zend_lookup_class(Z_STRVAL_PP(class_name), Z_STRLEN_PP(class_name), &pce TSRMLS_CC) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
} else {
|
||||
ce = *pce;
|
||||
array_init(return_value);
|
||||
add_class_vars(*pce, &(*pce)->default_properties, return_value TSRMLS_CC);
|
||||
add_class_vars(*pce, (*pce)->static_members, return_value TSRMLS_CC);
|
||||
|
||||
if (zend_hash_num_elements(&ce->default_properties) > 0) {
|
||||
HashPosition pos;
|
||||
zval **prop;
|
||||
|
||||
zend_hash_internal_pointer_reset_ex(&ce->default_properties, &pos);
|
||||
while (zend_hash_get_current_data_ex(&ce->default_properties, (void **) &prop, &pos) == SUCCESS) {
|
||||
char *key, *class_name, *prop_name;
|
||||
uint key_len;
|
||||
ulong num_index;
|
||||
zval *prop_copy;
|
||||
|
||||
zend_hash_get_current_key_ex(&ce->default_properties, &key, &key_len, &num_index, 0, &pos);
|
||||
zend_hash_move_forward_ex(&ce->default_properties, &pos);
|
||||
zend_unmangle_property_name(key, &class_name, &prop_name);
|
||||
if (class_name && class_name[0] != '*' && strcmp(class_name, ce->name)) {
|
||||
/* filter privates from base classes */
|
||||
continue;
|
||||
}
|
||||
|
||||
/* copy: enforce read only access */
|
||||
ALLOC_ZVAL(prop_copy);
|
||||
*prop_copy = **prop;
|
||||
zval_copy_ctor(prop_copy);
|
||||
INIT_PZVAL(prop_copy);
|
||||
|
||||
/* this is necessary to make it able to work with default array
|
||||
* properties, returned to user */
|
||||
if (Z_TYPE_P(prop_copy) == IS_CONSTANT_ARRAY || Z_TYPE_P(prop_copy) == IS_CONSTANT) {
|
||||
zval_update_constant(&prop_copy, 0 TSRMLS_CC);
|
||||
}
|
||||
|
||||
add_assoc_zval(return_value, prop_name, prop_copy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -749,10 +723,9 @@ ZEND_FUNCTION(get_object_vars)
|
||||
zval **value;
|
||||
HashTable *properties;
|
||||
HashPosition pos;
|
||||
char *key, *prop_name, *class_name;
|
||||
char *key;
|
||||
uint key_len;
|
||||
ulong num_index;
|
||||
int instanceof;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &obj) == FAILURE) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
@@ -765,27 +738,16 @@ ZEND_FUNCTION(get_object_vars)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
instanceof = EG(This) && instanceof_function(Z_OBJCE_P(EG(This)), Z_OBJCE_PP(obj) TSRMLS_CC);
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
properties = Z_OBJ_HT_PP(obj)->get_properties(*obj TSRMLS_CC);
|
||||
zend_hash_internal_pointer_reset_ex(properties, &pos);
|
||||
|
||||
while (zend_hash_get_current_data_ex(properties, (void **) &value, &pos) == SUCCESS) {
|
||||
if (zend_hash_get_current_key_ex(properties, &key, &key_len, &num_index, 0, &pos) == HASH_KEY_IS_STRING) {
|
||||
if (key[0]) {
|
||||
if (zend_hash_get_current_key_ex(properties, &key, &key_len, &num_index, 0, &pos) == HASH_KEY_IS_STRING && key[0]) {
|
||||
/* Not separating references */
|
||||
(*value)->refcount++;
|
||||
add_assoc_zval_ex(return_value, key, key_len, *value);
|
||||
} else if (instanceof) {
|
||||
zend_unmangle_property_name(key, &class_name, &prop_name);
|
||||
if (!memcmp(class_name, "*", 2) || (Z_OBJCE_P(EG(This)) == Z_OBJCE_PP(obj) && !strcmp(Z_OBJCE_P(EG(This))->name, class_name))) {
|
||||
/* Not separating references */
|
||||
(*value)->refcount++;
|
||||
add_assoc_zval_ex(return_value, prop_name, strlen(prop_name)+1, *value);
|
||||
}
|
||||
}
|
||||
}
|
||||
zend_hash_move_forward_ex(properties, &pos);
|
||||
}
|
||||
@@ -802,7 +764,6 @@ ZEND_FUNCTION(get_class_methods)
|
||||
zend_class_entry *ce = NULL, **pce;
|
||||
HashPosition pos;
|
||||
zend_function *mptr;
|
||||
int instanceof;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class)==FAILURE) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
@@ -824,22 +785,18 @@ ZEND_FUNCTION(get_class_methods)
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
instanceof = EG(scope) && instanceof_function(EG(scope), ce TSRMLS_CC);
|
||||
|
||||
array_init(return_value);
|
||||
zend_hash_internal_pointer_reset_ex(&ce->function_table, &pos);
|
||||
|
||||
while (zend_hash_get_current_data_ex(&ce->function_table, (void **) &mptr, &pos) == SUCCESS) {
|
||||
if ((mptr->common.fn_flags & ZEND_ACC_PUBLIC)
|
||||
|| (instanceof && ((mptr->common.fn_flags & ZEND_ACC_PROTECTED) || EG(scope) == mptr->common.scope))) {
|
||||
MAKE_STD_ZVAL(method_name);
|
||||
ZVAL_STRING(method_name, mptr->common.function_name, 1);
|
||||
zend_hash_next_index_insert(return_value->value.ht, &method_name, sizeof(zval *), NULL);
|
||||
}
|
||||
MAKE_STD_ZVAL(method_name);
|
||||
ZVAL_STRING(method_name, mptr->common.function_name, 1);
|
||||
zend_hash_next_index_insert(return_value->value.ht, &method_name, sizeof(zval *), NULL);
|
||||
zend_hash_move_forward_ex(&ce->function_table, &pos);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
\
|
||||
|
||||
|
||||
/* {{{ proto bool method_exists(object object, string method)
|
||||
@@ -1140,15 +1097,13 @@ ZEND_FUNCTION(set_exception_handler)
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
if (Z_TYPE_PP(exception_handler) != IS_NULL) { /* NULL == unset */
|
||||
if (!zend_is_callable(*exception_handler, 0, &exception_handler_name)) {
|
||||
zend_error(E_WARNING, "%s() expects the argument (%s) to be a valid callback",
|
||||
get_active_function_name(TSRMLS_C), exception_handler_name?exception_handler_name:"unknown");
|
||||
efree(exception_handler_name);
|
||||
return;
|
||||
}
|
||||
if (!zend_is_callable(*exception_handler, 0, &exception_handler_name)) {
|
||||
zend_error(E_WARNING, "%s() expects the argument (%s) to be a valid callback",
|
||||
get_active_function_name(TSRMLS_C), exception_handler_name?exception_handler_name:"unknown");
|
||||
efree(exception_handler_name);
|
||||
return;
|
||||
}
|
||||
efree(exception_handler_name);
|
||||
|
||||
if (EG(user_exception_handler)) {
|
||||
had_orig_exception_handler = 1;
|
||||
@@ -1158,7 +1113,7 @@ ZEND_FUNCTION(set_exception_handler)
|
||||
}
|
||||
ALLOC_ZVAL(EG(user_exception_handler));
|
||||
|
||||
if (Z_TYPE_PP(exception_handler) == IS_NULL) { /* unset user-defined handler */
|
||||
if (Z_STRLEN_PP(exception_handler)==0) { /* unset user-defined handler */
|
||||
FREE_ZVAL(EG(user_exception_handler));
|
||||
EG(user_exception_handler) = NULL;
|
||||
RETURN_TRUE;
|
||||
@@ -1592,7 +1547,6 @@ ZEND_FUNCTION(debug_print_backtrace)
|
||||
|
||||
while (ptr) {
|
||||
class_name = call_type = NULL;
|
||||
arg_array = NULL;
|
||||
if (ptr->op_array) {
|
||||
filename = ptr->op_array->filename;
|
||||
lineno = ptr->opline->lineno;
|
||||
@@ -1706,11 +1660,11 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last TSRML
|
||||
ptr = EG(current_execute_data);
|
||||
|
||||
/* skip debug_backtrace() */
|
||||
ptr = ptr->prev_execute_data;
|
||||
if (skip_last--) {
|
||||
int arg_count = *((ulong*)(cur_arg_pos - 2));
|
||||
cur_arg_pos -= (arg_count + 2);
|
||||
frames_on_stack--;
|
||||
ptr = ptr->prev_execute_data;
|
||||
}
|
||||
|
||||
array_init(return_value);
|
||||
@@ -1737,7 +1691,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last TSRML
|
||||
if (function_name) {
|
||||
add_assoc_string_ex(stack_frame, "function", sizeof("function"), function_name, 1);
|
||||
|
||||
if (ptr->object && Z_TYPE_P(ptr->object) == IS_OBJECT) {
|
||||
if (ptr->object) {
|
||||
class_name = Z_OBJCE(*ptr->object)->name;
|
||||
call_type = "->";
|
||||
} else if (ptr->function_state.function->common.scope) {
|
||||
@@ -1763,11 +1717,6 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last TSRML
|
||||
/* i know this is kinda ugly, but i'm trying to avoid extra cycles in the main execution loop */
|
||||
zend_bool build_filename_arg = 1;
|
||||
|
||||
if (!ptr->opline) {
|
||||
/* can happen when calling eval from a custom sapi */
|
||||
function_name = "unknown";
|
||||
build_filename_arg = 0;
|
||||
} else
|
||||
switch (ptr->opline->op2.u.constant.value.lval) {
|
||||
case ZEND_EVAL:
|
||||
function_name = "eval";
|
||||
@@ -1869,13 +1818,10 @@ ZEND_FUNCTION(get_extension_funcs)
|
||||
|
||||
convert_to_string_ex(extension_name);
|
||||
if (strncasecmp(Z_STRVAL_PP(extension_name), "zend", sizeof("zend"))) {
|
||||
char *lcname = zend_str_tolower_dup(Z_STRVAL_PP(extension_name), Z_STRLEN_PP(extension_name));
|
||||
if (zend_hash_find(&module_registry, lcname,
|
||||
if (zend_hash_find(&module_registry, Z_STRVAL_PP(extension_name),
|
||||
Z_STRLEN_PP(extension_name)+1, (void**)&module) == FAILURE) {
|
||||
efree(lcname);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
efree(lcname);
|
||||
|
||||
if (!(func = module->functions)) {
|
||||
RETURN_FALSE;
|
||||
|
||||
+9
-6
@@ -19,7 +19,7 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#include <zend_language_parser.h>
|
||||
#include "zend_language_parser.h"
|
||||
#include "zend.h"
|
||||
#include "zend_compile.h"
|
||||
#include "zend_constants.h"
|
||||
@@ -68,7 +68,7 @@ static void build_runtime_defined_function_key(zval *result, char *name, int nam
|
||||
uint char_pos_len;
|
||||
char *filename;
|
||||
|
||||
char_pos_len = zend_sprintf(char_pos_buf, "%p", LANG_SCNG(_yy_last_accepting_cpos));
|
||||
char_pos_len = zend_sprintf(char_pos_buf, "%x", (unsigned int) LANG_SCNG(_yy_last_accepting_cpos));
|
||||
if (CG(active_op_array)->filename) {
|
||||
filename = CG(active_op_array)->filename;
|
||||
} else {
|
||||
@@ -1204,7 +1204,7 @@ void zend_do_begin_method_call(znode *left_bracket TSRMLS_DC)
|
||||
last_op_number = get_next_op_number(CG(active_op_array))-1;
|
||||
last_op = &CG(active_op_array)->opcodes[last_op_number];
|
||||
|
||||
if ((last_op->op2.op_type == IS_CONST) && (last_op->op2.u.constant.type == IS_STRING) && (last_op->op2.u.constant.value.str.len == sizeof(ZEND_CLONE_FUNC_NAME)-1)
|
||||
if ((last_op->op2.op_type == IS_CONST) && (last_op->op2.u.constant.value.str.len == sizeof(ZEND_CLONE_FUNC_NAME)-1)
|
||||
&& !zend_binary_strcasecmp(last_op->op2.u.constant.value.str.val, last_op->op2.u.constant.value.str.len, ZEND_CLONE_FUNC_NAME, sizeof(ZEND_CLONE_FUNC_NAME)-1)) {
|
||||
zend_error(E_COMPILE_ERROR, "Cannot call __clone() method on objects - use 'clone $obj' instead");
|
||||
}
|
||||
@@ -1908,6 +1908,12 @@ static zend_bool do_inherit_property_access_check(HashTable *target_ht, zend_pro
|
||||
zend_hash_del(&ce->default_properties, prot_name, prot_name_length+1);
|
||||
}
|
||||
pefree(prot_name, ce->type & ZEND_INTERNAL_CLASS);
|
||||
} else if (!(child_info->flags & ZEND_ACC_PRIVATE) && (child_info->flags & ZEND_ACC_STATIC)) {
|
||||
char *prop_name, *tmp;
|
||||
|
||||
zend_unmangle_property_name(child_info->name, &tmp, &prop_name);
|
||||
zend_error(E_COMPILE_ERROR, "Cannot redeclare property static %s %s::$%s in class %s",
|
||||
zend_visibility_string(child_info->flags), parent_ce->name, prop_name, ce->name);
|
||||
}
|
||||
return 0; /* Don't copy from parent */
|
||||
} else {
|
||||
@@ -1922,9 +1928,6 @@ static inline void do_implement_interface(zend_class_entry *ce, zend_class_entry
|
||||
if (!(ce->ce_flags & ZEND_ACC_INTERFACE) && iface->interface_gets_implemented && iface->interface_gets_implemented(iface, ce TSRMLS_CC) == FAILURE) {
|
||||
zend_error(E_CORE_ERROR, "Class %s could not implement interface %s", ce->name, iface->name);
|
||||
}
|
||||
if (ce == iface) {
|
||||
zend_error(E_ERROR, "Interface %s cannot not implement itself", ce->name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-34
@@ -50,8 +50,7 @@ void zend_throw_exception_internal(zval *exception TSRMLS_DC)
|
||||
zend_throw_exception_hook(exception TSRMLS_CC);
|
||||
}
|
||||
|
||||
if (EG(current_execute_data)->opline == NULL ||
|
||||
(EG(current_execute_data)->opline+1)->opcode == ZEND_HANDLE_EXCEPTION) {
|
||||
if ((EG(current_execute_data)->opline+1)->opcode == ZEND_HANDLE_EXCEPTION) {
|
||||
/* no need to rethrow the exception */
|
||||
return;
|
||||
}
|
||||
@@ -100,15 +99,12 @@ static zend_object_value zend_default_exception_new(zend_class_entry *class_type
|
||||
return obj.value.obj;
|
||||
}
|
||||
|
||||
|
||||
ZEND_METHOD(exception, __clone)
|
||||
{
|
||||
/* Should never be executable */
|
||||
zend_throw_exception(NULL, "Cannot clone object using __clone()", 0 TSRMLS_CC);
|
||||
}
|
||||
|
||||
/* {{{ proto Exception::__construct()
|
||||
Exception constructor */
|
||||
ZEND_METHOD(exception, __construct)
|
||||
{
|
||||
char *message = NULL;
|
||||
@@ -130,7 +126,6 @@ ZEND_METHOD(exception, __construct)
|
||||
zend_update_property_long(default_exception_ce, object, "code", sizeof("code")-1, code TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#define DEFAULT_0_PARAMS \
|
||||
if (ZEND_NUM_ARGS() > 0) { \
|
||||
@@ -147,61 +142,40 @@ static void _default_exception_get_entry(zval *object, char *name, int name_len,
|
||||
zval_copy_ctor(return_value);
|
||||
}
|
||||
|
||||
|
||||
/* {{{ proto Exception::getFile()
|
||||
Obtain the file name in which the exception occurred */
|
||||
ZEND_METHOD(exception, getFile)
|
||||
{
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
_default_exception_get_entry(getThis(), "file", sizeof("file")-1, return_value TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto Exception::getLine()
|
||||
Obtain the line number in which the exception occurred */
|
||||
ZEND_METHOD(exception, getLine)
|
||||
{
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
_default_exception_get_entry(getThis(), "line", sizeof("line")-1, return_value TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto Exception::getMessage()
|
||||
Obtain the exception message */
|
||||
ZEND_METHOD(exception, getMessage)
|
||||
{
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
_default_exception_get_entry(getThis(), "message", sizeof("message")-1, return_value TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto Exception::getCode()
|
||||
Obtain the user-defined exception code */
|
||||
ZEND_METHOD(exception, getCode)
|
||||
{
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
_default_exception_get_entry(getThis(), "code", sizeof("code")-1, return_value TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto Exception::getTrace()
|
||||
Obtain a stack trace for the location in which the exception occurred */
|
||||
ZEND_METHOD(exception, getTrace)
|
||||
{
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
_default_exception_get_entry(getThis(), "trace", sizeof("trace")-1, return_value TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ ZEND_METHOD(exception, gettraceasstring) */
|
||||
#define TRACE_APPEND_CHR(chr) \
|
||||
@@ -453,15 +427,9 @@ ZEND_METHOD(exception, __toString)
|
||||
* And never try to change the state of exceptions and never implement anything
|
||||
* that gives the user anything to accomplish this.
|
||||
*/
|
||||
static
|
||||
ZEND_BEGIN_ARG_INFO(arginfo_exception___construct, 0)
|
||||
ZEND_ARG_INFO(0, message)
|
||||
ZEND_ARG_INFO(0, code)
|
||||
ZEND_END_ARG_INFO();
|
||||
|
||||
static zend_function_entry default_exception_functions[] = {
|
||||
ZEND_ME(exception, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
|
||||
ZEND_ME(exception, __construct, arginfo_exception___construct, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(exception, __construct, NULL, 0)
|
||||
ZEND_ME(exception, getMessage, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
|
||||
ZEND_ME(exception, getCode, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
|
||||
ZEND_ME(exception, getFile, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
|
||||
|
||||
+18
-49
@@ -175,15 +175,9 @@ static inline void zend_fetch_property_address_inner(zval *object, znode *op2, z
|
||||
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **ptr_ptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, prop_ptr TSRMLS_CC);
|
||||
if(NULL == ptr_ptr) {
|
||||
if (Z_OBJ_HT_P(object)->read_property &&
|
||||
(T(result->u.var).var.ptr = Z_OBJ_HT_P(object)->read_property(object, prop_ptr, BP_VAR_W TSRMLS_CC)) != NULL) {
|
||||
T(result->u.var).var.ptr_ptr = &T(result->u.var).var.ptr;
|
||||
} else {
|
||||
zend_error(E_ERROR, "Cannot access undefined property for object with overloaded property access");
|
||||
}
|
||||
} else {
|
||||
T(result->u.var).var.ptr_ptr = ptr_ptr;
|
||||
zend_error(E_ERROR, "Cannot access undefined property for object with overloaded property access");
|
||||
}
|
||||
T(result->u.var).var.ptr_ptr = ptr_ptr;
|
||||
} else if (Z_OBJ_HT_P(object)->read_property) {
|
||||
T(result->u.var).var.ptr = Z_OBJ_HT_P(object)->read_property(object, prop_ptr, BP_VAR_W TSRMLS_CC);
|
||||
T(result->u.var).var.ptr_ptr = &T(result->u.var).var.ptr;
|
||||
@@ -384,7 +378,7 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode
|
||||
*retval = EG(uninitialized_zval_ptr);
|
||||
|
||||
SELECTIVE_PZVAL_LOCK(*retval, result);
|
||||
FREE_OP(Ts, value_op, free_value);
|
||||
PZVAL_UNLOCK(value);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -769,13 +763,13 @@ static void zend_fetch_var_address(zend_op *opline, temp_variable *Ts, int type
|
||||
if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &retval) == FAILURE) {
|
||||
switch (type) {
|
||||
case BP_VAR_R:
|
||||
zend_error(E_NOTICE,"Undefined variable: %s", varname->value.str.val);
|
||||
zend_error(E_NOTICE,"Undefined variable: %s", varname->value.str.val);
|
||||
/* break missing intentionally */
|
||||
case BP_VAR_IS:
|
||||
retval = &EG(uninitialized_zval_ptr);
|
||||
break;
|
||||
case BP_VAR_RW:
|
||||
zend_error(E_NOTICE,"Undefined variable: %s", varname->value.str.val);
|
||||
zend_error(E_NOTICE,"Undefined variable: %s", varname->value.str.val);
|
||||
/* break missing intentionally */
|
||||
case BP_VAR_W: {
|
||||
zval *new_zval = &EG(uninitialized_zval);
|
||||
@@ -1917,20 +1911,10 @@ static inline int zend_incdec_op_helper(incdec_t incdec_op_arg, ZEND_OPCODE_HAND
|
||||
zend_error(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
if (*var_ptr == EG(error_zval_ptr)) {
|
||||
switch (opline->opcode) {
|
||||
case ZEND_PRE_INC:
|
||||
case ZEND_PRE_DEC:
|
||||
EX_T(opline->result.u.var).var.ptr_ptr = &EG(uninitialized_zval_ptr);
|
||||
SELECTIVE_PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &opline->result);
|
||||
AI_USE_PTR(EX_T(opline->result.u.var).var);
|
||||
NEXT_OPCODE();
|
||||
break;
|
||||
case ZEND_POST_INC:
|
||||
case ZEND_POST_DEC:
|
||||
EX_T(opline->result.u.var).tmp_var = *EG(uninitialized_zval_ptr);
|
||||
NEXT_OPCODE();
|
||||
break;
|
||||
}
|
||||
EX_T(opline->result.u.var).var.ptr_ptr = &EG(uninitialized_zval_ptr);
|
||||
SELECTIVE_PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &opline->result);
|
||||
AI_USE_PTR(EX_T(opline->result.u.var).var);
|
||||
NEXT_OPCODE();
|
||||
}
|
||||
|
||||
switch (opline->opcode) {
|
||||
@@ -2454,7 +2438,7 @@ int zend_fetch_class_handler(ZEND_OPCODE_HANDLER_ARGS)
|
||||
|
||||
|
||||
if (opline->op2.op_type == IS_UNUSED) {
|
||||
EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, ZEND_FETCH_CLASS_AUTO, opline->extended_value TSRMLS_CC);
|
||||
EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
|
||||
NEXT_OPCODE();
|
||||
}
|
||||
|
||||
@@ -3725,7 +3709,7 @@ int zend_fe_reset_handler(ZEND_OPCODE_HANDLER_ARGS)
|
||||
if (opline->extended_value) {
|
||||
array_ptr_ptr = get_zval_ptr_ptr(&opline->op1, EX(Ts), BP_VAR_R);
|
||||
if (array_ptr_ptr == NULL) {
|
||||
ALLOC_INIT_ZVAL(array_ptr);
|
||||
MAKE_STD_ZVAL(array_ptr);
|
||||
} else if (Z_TYPE_PP(array_ptr_ptr) == IS_OBJECT) {
|
||||
ce = Z_OBJCE_PP(array_ptr_ptr);
|
||||
if (!ce || ce->get_iterator == NULL) {
|
||||
@@ -3757,17 +3741,10 @@ int zend_fe_reset_handler(ZEND_OPCODE_HANDLER_ARGS)
|
||||
if (ce && ce->get_iterator) {
|
||||
iter = ce->get_iterator(ce, array_ptr TSRMLS_CC);
|
||||
|
||||
if (iter && !EG(exception)) {
|
||||
if (iter) {
|
||||
array_ptr = zend_iterator_wrap(iter TSRMLS_CC);
|
||||
} else {
|
||||
zval_ptr_dtor(&array_ptr);
|
||||
FREE_OP(Ts, op1, EG(free_op1));
|
||||
if (!EG(exception)) {
|
||||
zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Object of type %s did not create an Iterator", ce->name);
|
||||
}
|
||||
zend_throw_exception_internal(NULL TSRMLS_CC);
|
||||
NEXT_OPCODE();
|
||||
return 0;
|
||||
array_ptr->refcount++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4055,30 +4032,22 @@ static int zend_isset_isempty_dim_prop_obj_handler(int prop_dim, ZEND_OPCODE_HAN
|
||||
} else {
|
||||
result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
|
||||
}
|
||||
} else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
|
||||
zval tmp;
|
||||
|
||||
if (offset->type != IS_LONG) {
|
||||
tmp = *offset;
|
||||
zval_copy_ctor(&tmp);
|
||||
convert_to_long(&tmp);
|
||||
offset = &tmp;
|
||||
}
|
||||
} else if ((*container)->type == IS_STRING) { /* string offsets */
|
||||
switch (opline->extended_value) {
|
||||
case ZEND_ISSET:
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
|
||||
if (offset->value.lval < Z_STRLEN_PP(container)) {
|
||||
result = 1;
|
||||
}
|
||||
break;
|
||||
case ZEND_ISEMPTY:
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
|
||||
if (offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
EX_T(opline->result.u.var).tmp_var.type = IS_BOOL;
|
||||
|
||||
switch (opline->extended_value) {
|
||||
@@ -4316,7 +4285,7 @@ int zend_verify_abstract_class_handler(ZEND_OPCODE_HANDLER_ARGS)
|
||||
|
||||
void zend_init_opcodes_handlers()
|
||||
{
|
||||
memset(zend_opcode_handlers, 0, sizeof(zend_opcode_handlers));
|
||||
memset(zend_opcode_handlers, sizeof(zend_opcode_handlers), 0);
|
||||
zend_opcode_handlers[ZEND_NOP] = zend_nop_handler;
|
||||
zend_opcode_handlers[ZEND_ADD] = zend_add_handler;
|
||||
zend_opcode_handlers[ZEND_SUB] = zend_sub_handler;
|
||||
|
||||
+4
-25
@@ -183,6 +183,8 @@ void init_executor(TSRMLS_D)
|
||||
EG(scope) = NULL;
|
||||
|
||||
EG(This) = NULL;
|
||||
|
||||
EG(float_separator)[0] = '.';
|
||||
}
|
||||
|
||||
void shutdown_executor(TSRMLS_D)
|
||||
@@ -206,9 +208,6 @@ void shutdown_executor(TSRMLS_D)
|
||||
zend_llist_apply(&zend_extensions, (llist_apply_func_t) zend_extension_deactivator TSRMLS_CC);
|
||||
zend_objects_store_call_destructors(&EG(objects_store) TSRMLS_CC);
|
||||
zend_hash_graceful_reverse_destroy(&EG(symbol_table));
|
||||
} zend_catch {
|
||||
/* if we couldn't destruct cleanly, mark all objects as destructed anyway */
|
||||
zend_objects_store_mark_destructed(&EG(objects_store) TSRMLS_CC);
|
||||
} zend_end_try();
|
||||
|
||||
zend_try {
|
||||
@@ -499,7 +498,6 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC)
|
||||
case IS_STRING:
|
||||
zend_symtable_update(p->value.ht, const_value.value.str.val, const_value.value.str.len+1, &new_val, sizeof(zval *), NULL);
|
||||
break;
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
zend_hash_index_update(p->value.ht, const_value.value.lval, &new_val, sizeof(zval *), NULL);
|
||||
break;
|
||||
@@ -572,10 +570,6 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
|
||||
zval *params_array;
|
||||
int call_via_handler = 0;
|
||||
|
||||
if (EG(exception)) {
|
||||
return FAILURE; /* we would result in an instable executor otherwise */
|
||||
}
|
||||
|
||||
switch (fci->size) {
|
||||
case sizeof(zend_fcall_info):
|
||||
break; /* nothing to do currently */
|
||||
@@ -674,9 +668,6 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
|
||||
|
||||
fci->function_table = &(*ce)->function_table;
|
||||
calling_scope = *ce;
|
||||
} else {
|
||||
zend_error(E_NOTICE, "Non-callable array passed to zend_call_function()");
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (fci->function_table == NULL) {
|
||||
@@ -693,15 +684,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
|
||||
zend_error(E_ERROR, "Object does not support method calls");
|
||||
}
|
||||
EX(function_state).function =
|
||||
Z_OBJ_HT_PP(fci->object_pp)->get_method(*fci->object_pp, Z_STRVAL_P(fci->function_name), Z_STRLEN_P(fci->function_name) TSRMLS_CC);
|
||||
if (EX(function_state).function && calling_scope != EX(function_state).function->common.scope) {
|
||||
char *function_name_lc = zend_str_tolower_dup(Z_STRVAL_P(fci->function_name), Z_STRLEN_P(fci->function_name));
|
||||
if (zend_hash_find(&calling_scope->function_table, function_name_lc, fci->function_name->value.str.len+1, (void **) &EX(function_state).function)==FAILURE) {
|
||||
efree(function_name_lc);
|
||||
zend_error(E_ERROR, "Cannot call method %s::%s() or method does not exist", calling_scope->name, Z_STRVAL_P(fci->function_name));
|
||||
}
|
||||
efree(function_name_lc);
|
||||
}
|
||||
Z_OBJ_HT_PP(fci->object_pp)->get_method(*fci->object_pp, Z_STRVAL_P(fci->function_name), Z_STRLEN_P(fci->function_name) TSRMLS_CC);
|
||||
} else if (calling_scope) {
|
||||
char *function_name_lc = zend_str_tolower_dup(Z_STRVAL_P(fci->function_name), Z_STRLEN_P(fci->function_name));
|
||||
|
||||
@@ -823,7 +806,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
|
||||
} else {
|
||||
severity = E_ERROR;
|
||||
}
|
||||
zend_error(severity, "Non-static method %s::%s() cannot be called statically", calling_scope->name, EX(function_state).function->common.function_name);
|
||||
zend_error(E_STRICT, "Non-static method %s::%s() cannot be called statically", calling_scope->name, EX(function_state).function->common.function_name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -902,10 +885,6 @@ ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry ***
|
||||
zval *exception;
|
||||
char dummy = 1;
|
||||
|
||||
if (name == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
lc_name = do_alloca(name_length + 1);
|
||||
zend_str_tolower_copy(lc_name, name, name_length);
|
||||
|
||||
|
||||
@@ -237,6 +237,9 @@ struct _zend_executor_globals {
|
||||
|
||||
zend_property_info std_property_info;
|
||||
|
||||
/* locale stuff */
|
||||
char float_separator[1];
|
||||
|
||||
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
#include "zend.h"
|
||||
#include <zend_language_parser.h>
|
||||
#include "zend_language_parser.h"
|
||||
#include "zend_compile.h"
|
||||
#include "zend_highlight.h"
|
||||
#include "zend_ptr_stack.h"
|
||||
@@ -102,7 +102,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
int token_type;
|
||||
char *last_color = syntax_highlighter_ini->highlight_html;
|
||||
char *next_color;
|
||||
int in_string=0, post_heredoc = 0;
|
||||
int in_string=0;
|
||||
|
||||
zend_printf("<code>");
|
||||
zend_printf("<span style=\"color: %s\">\n", last_color);
|
||||
@@ -159,14 +159,15 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
switch (token_type) {
|
||||
case T_END_HEREDOC:
|
||||
zend_html_puts(token.value.str.val, token.value.str.len TSRMLS_CC);
|
||||
post_heredoc = 1;
|
||||
{
|
||||
char *ptr = LANG_SCNG(yy_text);
|
||||
if (ptr[LANG_SCNG(yy_leng) - 1] != ';') {
|
||||
zend_html_putc('\n');
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC);
|
||||
if (post_heredoc) {
|
||||
zend_html_putc('\n');
|
||||
post_heredoc = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
#include "zend.h"
|
||||
#include <zend_language_parser.h>
|
||||
#include "zend_language_parser.h"
|
||||
#include "zend_compile.h"
|
||||
#include "zend_indent.h"
|
||||
|
||||
|
||||
+3
-4
@@ -24,7 +24,6 @@
|
||||
#include "zend_ini.h"
|
||||
#include "zend_alloc.h"
|
||||
#include "zend_operators.h"
|
||||
#include "zend_strtod.h"
|
||||
|
||||
static HashTable *registered_zend_ini_directives;
|
||||
|
||||
@@ -299,9 +298,9 @@ ZEND_API double zend_ini_double(char *name, uint name_length, int orig)
|
||||
|
||||
if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
|
||||
if (orig && ini_entry->modified) {
|
||||
return (double) (ini_entry->orig_value ? zend_strtod(ini_entry->orig_value, NULL) : 0.0);
|
||||
return (double) (ini_entry->orig_value ? strtod(ini_entry->orig_value, NULL) : 0.0);
|
||||
} else if (ini_entry->value) {
|
||||
return (double) zend_strtod(ini_entry->value, NULL);
|
||||
return (double) strtod(ini_entry->value, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -487,7 +486,7 @@ ZEND_API ZEND_INI_MH(OnUpdateReal)
|
||||
|
||||
p = (double *) (base+(size_t) mh_arg1);
|
||||
|
||||
*p = zend_strtod(new_value, NULL);
|
||||
*p = strtod(new_value, NULL);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <errno.h>
|
||||
#include "zend.h"
|
||||
#include "zend_globals.h"
|
||||
#include <zend_ini_parser.h>
|
||||
#include "zend_ini_parser.h"
|
||||
#include "zend_ini_scanner.h"
|
||||
|
||||
#undef YYSTYPE
|
||||
@@ -53,13 +53,13 @@ static char *ini_filename;
|
||||
|
||||
void init_ini_scanner(TSRMLS_D)
|
||||
{
|
||||
SCNG(lineno)=1;
|
||||
SCNG(lineno)=1;
|
||||
}
|
||||
|
||||
|
||||
int zend_ini_scanner_get_lineno(TSRMLS_D)
|
||||
{
|
||||
return SCNG(lineno);
|
||||
return SCNG(lineno);
|
||||
}
|
||||
|
||||
|
||||
@@ -116,10 +116,10 @@ NEWLINE ("\r"|"\n"|"\r\n")
|
||||
return CFG_FALSE;
|
||||
}
|
||||
|
||||
<INITIAL>[[][^\]\n]+[\]][ ]*{NEWLINE}? {
|
||||
<INITIAL>[[][^[]+[\]][ ]*{NEWLINE}? {
|
||||
/* SECTION */
|
||||
|
||||
/* eat trailing ] and spaces */
|
||||
/* eat trailng and spaces ] */
|
||||
while (yyleng>0 && (yytext[yyleng-1]=='\n' || yytext[yyleng-1]=='\r' || yytext[yyleng-1]==']' || yytext[yyleng-1]==' ')) {
|
||||
yyleng--;
|
||||
yytext[yyleng]=0;
|
||||
|
||||
+10
-23
@@ -21,7 +21,6 @@
|
||||
#include "zend.h"
|
||||
#include "zend_API.h"
|
||||
#include "zend_interfaces.h"
|
||||
#include "zend_exceptions.h"
|
||||
|
||||
ZEND_API zend_class_entry *zend_ce_traversable;
|
||||
ZEND_API zend_class_entry *zend_ce_aggregate;
|
||||
@@ -36,7 +35,6 @@ ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend
|
||||
zend_fcall_info fci;
|
||||
zval z_fname;
|
||||
zval *retval;
|
||||
HashTable *function_table;
|
||||
|
||||
zval **params[2];
|
||||
|
||||
@@ -63,17 +61,12 @@ ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend
|
||||
|
||||
fcic.initialized = 1;
|
||||
if (!obj_ce) {
|
||||
obj_ce = object_pp ? Z_OBJCE_PP(object_pp) : NULL;
|
||||
}
|
||||
if (obj_ce) {
|
||||
function_table = &obj_ce->function_table;
|
||||
} else {
|
||||
function_table = EG(function_table);
|
||||
obj_ce = Z_OBJCE_PP(object_pp);
|
||||
}
|
||||
if (!fn_proxy || !*fn_proxy) {
|
||||
if (zend_hash_find(function_table, function_name, function_name_len+1, (void **) &fcic.function_handler) == FAILURE) {
|
||||
if (zend_hash_find(&obj_ce->function_table, function_name, function_name_len+1, (void **) &fcic.function_handler) == FAILURE) {
|
||||
/* error at c-level */
|
||||
zend_error(E_CORE_ERROR, "Couldn't find implementation for method %s%s%s", obj_ce ? obj_ce->name : "", obj_ce ? "::" : "", function_name);
|
||||
zend_error(E_CORE_ERROR, "Couldn't find implementation for method %s::%s", obj_ce->name, function_name);
|
||||
}
|
||||
if (fn_proxy) {
|
||||
*fn_proxy = fcic.function_handler;
|
||||
@@ -88,9 +81,9 @@ ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend
|
||||
if (result == FAILURE) {
|
||||
/* error at c-level */
|
||||
if (!obj_ce) {
|
||||
obj_ce = object_pp ? Z_OBJCE_PP(object_pp) : NULL;
|
||||
obj_ce = Z_OBJCE_PP(object_pp);
|
||||
}
|
||||
zend_error(E_CORE_ERROR, "Couldn't execute method %s%s%s", obj_ce ? obj_ce->name : "", obj_ce ? "::" : "", function_name);
|
||||
zend_error(E_CORE_ERROR, "Couldn't execute method %s::%s", obj_ce->name, function_name);
|
||||
}
|
||||
if (!retval_ptr_ptr) {
|
||||
if (retval) {
|
||||
@@ -277,17 +270,11 @@ static zend_object_iterator *zend_user_it_get_new_iterator(zend_class_entry *ce,
|
||||
zval *iterator = zend_user_it_new_iterator(ce, object TSRMLS_CC);
|
||||
zend_object_iterator *new_iterator;
|
||||
|
||||
zend_class_entry *ce_it = iterator && Z_TYPE_P(iterator) == IS_OBJECT ? Z_OBJCE_P(iterator) : NULL;
|
||||
zend_class_entry *ce_it = Z_TYPE_P(iterator) == IS_OBJECT ? Z_OBJCE_P(iterator) : NULL;
|
||||
|
||||
if (!ce || !ce_it || !ce_it->get_iterator || (ce_it->get_iterator == zend_user_it_get_new_iterator && iterator == object)) {
|
||||
if (!EG(exception))
|
||||
{
|
||||
zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Objects returned by %s::getIterator() must be traversable or implement interface Iterator", ce->name);
|
||||
}
|
||||
if (iterator)
|
||||
{
|
||||
zval_ptr_dtor(&iterator);
|
||||
}
|
||||
if (!ce || !ce_it || !ce_it->get_iterator) {
|
||||
zend_error(E_WARNING, "Objects returned by %s::getIterator() must be traversable or implement interface Iterator", ce->name);
|
||||
zval_ptr_dtor(&iterator);
|
||||
return NULL;
|
||||
}
|
||||
new_iterator = ce_it->get_iterator(ce_it, iterator TSRMLS_CC);
|
||||
@@ -300,7 +287,7 @@ static zend_object_iterator *zend_user_it_get_new_iterator(zend_class_entry *ce,
|
||||
static int zend_implement_traversable(zend_class_entry *interface, zend_class_entry *class_type TSRMLS_DC)
|
||||
{
|
||||
/* check that class_type is traversable at c-level or implements at least one of 'aggregate' and 'Iterator' */
|
||||
zend_uint i;
|
||||
int i;
|
||||
|
||||
if (class_type->get_iterator || (class_type->parent && class_type->parent->get_iterator)) {
|
||||
return SUCCESS;
|
||||
|
||||
@@ -50,14 +50,13 @@
|
||||
#include <errno.h>
|
||||
#include "zend.h"
|
||||
#include "zend_alloc.h"
|
||||
#include <zend_language_parser.h>
|
||||
#include "zend_language_parser.h"
|
||||
#include "zend_compile.h"
|
||||
#include "zend_language_scanner.h"
|
||||
#include "zend_highlight.h"
|
||||
#include "zend_constants.h"
|
||||
#include "zend_variables.h"
|
||||
#include "zend_operators.h"
|
||||
#include "zend_strtod.h"
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
# include <stdarg.h>
|
||||
@@ -128,16 +127,11 @@ void startup_scanner(TSRMLS_D)
|
||||
RESET_DOC_COMMENT();
|
||||
SCNG(yy_start_stack_ptr) = 0;
|
||||
SCNG(yy_start_stack_depth) = 0;
|
||||
SCNG(current_buffer) = NULL;
|
||||
#ifdef ZEND_MULTIBYTE
|
||||
SCNG(script_org) = NULL;
|
||||
SCNG(script_org_size) = 0;
|
||||
SCNG(script_filtered) = NULL;
|
||||
SCNG(script_filtered_size) = 0;
|
||||
SCNG(input_filter) = NULL;
|
||||
SCNG(output_filter) = NULL;
|
||||
SCNG(script_encoding) = NULL;
|
||||
SCNG(internal_encoding) = NULL;
|
||||
#endif /* ZEND_MULTIBYTE */
|
||||
}
|
||||
|
||||
@@ -148,10 +142,6 @@ void shutdown_scanner(TSRMLS_D)
|
||||
efree(CG(heredoc));
|
||||
CG(heredoc_len)=0;
|
||||
}
|
||||
if (SCNG(yy_start_stack)) {
|
||||
yy_flex_free(SCNG(yy_start_stack));
|
||||
SCNG(yy_start_stack) = NULL;
|
||||
}
|
||||
RESET_DOC_COMMENT();
|
||||
|
||||
#ifdef ZEND_MULTIBYTE
|
||||
@@ -163,12 +153,6 @@ void shutdown_scanner(TSRMLS_D)
|
||||
efree(SCNG(script_filtered));
|
||||
SCNG(script_filtered) = NULL;
|
||||
}
|
||||
SCNG(script_org_size) = 0;
|
||||
SCNG(script_filtered_size) = 0;
|
||||
SCNG(input_filter) = NULL;
|
||||
SCNG(output_filter) = NULL;
|
||||
SCNG(script_encoding) = NULL;
|
||||
SCNG(internal_encoding) = NULL;
|
||||
#endif /* ZEND_MULTIBYTE */
|
||||
}
|
||||
END_EXTERN_C()
|
||||
@@ -1176,7 +1160,6 @@ NEWLINE ("\r"|"\n"|"\r\n")
|
||||
|
||||
|
||||
<ST_IN_SCRIPTING>"}" {
|
||||
RESET_DOC_COMMENT();
|
||||
/* This is a temporary fix which is dependant on flex and it's implementation */
|
||||
if (yy_start_stack_ptr) {
|
||||
yy_pop_state(TSRMLS_C);
|
||||
@@ -1205,7 +1188,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
|
||||
errno = 0;
|
||||
zendlval->value.lval = strtol(yytext, NULL, 0);
|
||||
if (errno == ERANGE) { /* overflow */
|
||||
zendlval->value.dval = zend_strtod(yytext, NULL);
|
||||
zendlval->value.dval = strtod(yytext, NULL);
|
||||
zendlval->type = IS_DOUBLE;
|
||||
return T_DNUMBER;
|
||||
} else {
|
||||
@@ -1242,7 +1225,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>{DNUM}|{EXPONENT_DNUM} {
|
||||
zendlval->value.dval = zend_strtod(yytext, NULL);
|
||||
zendlval->value.dval = strtod(yytext, NULL);
|
||||
zendlval->type = IS_DOUBLE;
|
||||
return T_DNUMBER;
|
||||
}
|
||||
|
||||
+2
-2
@@ -319,12 +319,12 @@ zend_mm_finished_searching_for_block:
|
||||
if (true_size > (heap->block_size - ZEND_MM_ALIGNED_SEGMENT_SIZE - ZEND_MM_ALIGNED_HEADER_SIZE)) {
|
||||
/* Make sure we add a memory block which is big enough */
|
||||
if (zend_mm_add_memory_block(heap, true_size + ZEND_MM_ALIGNED_SEGMENT_SIZE + ZEND_MM_ALIGNED_HEADER_SIZE)) {
|
||||
zend_error(E_ERROR, "Out of memory: cannot allocate %zd bytes!", true_size);
|
||||
zend_error(E_ERROR, "Out of memory: cannot allocate %d bytes!", true_size);
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
if (zend_mm_add_memory_block(heap, heap->block_size)) {
|
||||
zend_error(E_ERROR, "Out of memory: cannot allocate %zd bytes!", heap->block_size);
|
||||
zend_error(E_ERROR, "Out of memory: cannot allocate %d bytes!", heap->block_size);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-3
@@ -23,7 +23,6 @@
|
||||
#define MODULES_H
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_compile.h"
|
||||
|
||||
#define INIT_FUNC_ARGS int type, int module_number TSRMLS_DC
|
||||
#define INIT_FUNC_ARGS_PASSTHRU type, module_number TSRMLS_CC
|
||||
@@ -38,7 +37,7 @@ extern struct _zend_arg_info third_arg_force_ref[4];
|
||||
extern struct _zend_arg_info fourth_arg_force_ref[5];
|
||||
extern struct _zend_arg_info all_args_by_ref[1];
|
||||
|
||||
#define ZEND_MODULE_API_NO 20041030
|
||||
#define ZEND_MODULE_API_NO 20040412
|
||||
#ifdef ZTS
|
||||
#define USING_ZTS 1
|
||||
#else
|
||||
@@ -89,7 +88,6 @@ extern ZEND_API HashTable module_registry;
|
||||
void module_destructor(zend_module_entry *module);
|
||||
int module_registry_cleanup(zend_module_entry *module TSRMLS_DC);
|
||||
int module_registry_request_startup(zend_module_entry *module TSRMLS_DC);
|
||||
int module_registry_unload_temp(zend_module_entry *module TSRMLS_DC);
|
||||
|
||||
#define ZEND_MODULE_DTOR (void (*)(void *)) module_destructor
|
||||
#endif
|
||||
|
||||
+30
-43
@@ -72,7 +72,6 @@ static zval *zend_std_call_getter(zval *object, zval *member TSRMLS_DC)
|
||||
INIT_PZVAL(&__get_name);
|
||||
ZVAL_STRINGL(&__get_name, ZEND_GET_FUNC_NAME, sizeof(ZEND_GET_FUNC_NAME)-1, 0);
|
||||
|
||||
SEPARATE_ARG_IF_REF(member);
|
||||
call_args[0] = &member;
|
||||
|
||||
/* go call the __get handler */
|
||||
@@ -88,13 +87,11 @@ static zval *zend_std_call_getter(zval *object, zval *member TSRMLS_DC)
|
||||
retval returns the value that is received
|
||||
*/
|
||||
|
||||
|
||||
if (call_result == FAILURE) {
|
||||
zend_error(E_ERROR, "Could not call __get handler for class %s", Z_OBJCE_P(object)->name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
zval_ptr_dtor(&member);
|
||||
|
||||
if (retval) {
|
||||
retval->refcount--;
|
||||
}
|
||||
@@ -108,7 +105,7 @@ static int zend_std_call_setter(zval *object, zval *member, zval *value TSRMLS_D
|
||||
zval *retval = NULL;
|
||||
zval __set_name;
|
||||
int call_result;
|
||||
int result;
|
||||
int ret;
|
||||
|
||||
/* __set handler is called with two arguments:
|
||||
property name
|
||||
@@ -119,7 +116,6 @@ static int zend_std_call_setter(zval *object, zval *member, zval *value TSRMLS_D
|
||||
INIT_PZVAL(&__set_name);
|
||||
ZVAL_STRINGL(&__set_name, ZEND_SET_FUNC_NAME, sizeof(ZEND_SET_FUNC_NAME)-1, 0);
|
||||
|
||||
SEPARATE_ARG_IF_REF(member);
|
||||
call_args[0] = &member;
|
||||
value->refcount++;
|
||||
call_args[1] = &value;
|
||||
@@ -143,16 +139,19 @@ static int zend_std_call_setter(zval *object, zval *member, zval *value TSRMLS_D
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
zval_ptr_dtor(&member);
|
||||
zval_ptr_dtor(&value);
|
||||
|
||||
if (retval) {
|
||||
result = i_zend_is_true(retval) ? SUCCESS : FAILURE;
|
||||
zval_ptr_dtor(&retval);
|
||||
return result;
|
||||
if (retval && zend_is_true(retval)) {
|
||||
ret = SUCCESS;
|
||||
} else {
|
||||
return FAILURE;
|
||||
ret = FAILURE;
|
||||
}
|
||||
|
||||
if (retval) {
|
||||
zval_ptr_dtor(&retval);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -384,14 +383,12 @@ zval *zend_std_read_dimension(zval *object, zval *offset, int type TSRMLS_DC)
|
||||
if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) {
|
||||
if(offset == NULL) {
|
||||
/* [] construct */
|
||||
ALLOC_INIT_ZVAL(offset);
|
||||
} else {
|
||||
SEPARATE_ARG_IF_REF(offset);
|
||||
zval offset_null;
|
||||
INIT_ZVAL(offset_null);
|
||||
offset = &offset_null;
|
||||
}
|
||||
zend_call_method_with_1_params(&object, ce, NULL, "offsetget", &retval, offset);
|
||||
|
||||
zval_ptr_dtor(&offset);
|
||||
|
||||
if (!retval) {
|
||||
if (!EG(exception)) {
|
||||
zend_error(E_ERROR, "Undefined offset for object of type %s used as array", ce->name);
|
||||
@@ -413,15 +410,14 @@ zval *zend_std_read_dimension(zval *object, zval *offset, int type TSRMLS_DC)
|
||||
static void zend_std_write_dimension(zval *object, zval *offset, zval *value TSRMLS_DC)
|
||||
{
|
||||
zend_class_entry *ce = Z_OBJCE_P(object);
|
||||
zval tmp;
|
||||
|
||||
if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) {
|
||||
if (!offset) {
|
||||
ALLOC_INIT_ZVAL(offset);
|
||||
} else {
|
||||
SEPARATE_ARG_IF_REF(offset);
|
||||
INIT_ZVAL(tmp);
|
||||
offset = &tmp;
|
||||
}
|
||||
zend_call_method_with_2_params(&object, ce, NULL, "offsetset", NULL, offset, value);
|
||||
zval_ptr_dtor(&offset);
|
||||
} else {
|
||||
zend_error(E_ERROR, "Cannot use object of type %s as array", ce->name);
|
||||
}
|
||||
@@ -435,16 +431,10 @@ static int zend_std_has_dimension(zval *object, zval *offset, int check_empty TS
|
||||
int result;
|
||||
|
||||
if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) {
|
||||
SEPARATE_ARG_IF_REF(offset);
|
||||
zend_call_method_with_1_params(&object, ce, NULL, "offsetexists", &retval, offset);
|
||||
zval_ptr_dtor(&offset);
|
||||
if (retval) {
|
||||
result = i_zend_is_true(retval);
|
||||
zval_ptr_dtor(&retval);
|
||||
return result;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
result = i_zend_is_true(retval);
|
||||
zval_ptr_dtor(&retval);
|
||||
return result;
|
||||
} else {
|
||||
zend_error(E_ERROR, "Cannot use object of type %s as array", ce->name);
|
||||
return 0;
|
||||
@@ -523,11 +513,11 @@ static void zend_std_unset_property(zval *object, zval *member TSRMLS_DC)
|
||||
static void zend_std_unset_dimension(zval *object, zval *offset TSRMLS_DC)
|
||||
{
|
||||
zend_class_entry *ce = Z_OBJCE_P(object);
|
||||
zval *retval;
|
||||
|
||||
if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) {
|
||||
SEPARATE_ARG_IF_REF(offset);
|
||||
zend_call_method_with_1_params(&object, ce, NULL, "offsetunset", NULL, offset);
|
||||
zval_ptr_dtor(&offset);
|
||||
zend_call_method_with_1_params(&object, ce, NULL, "offsetunset", &retval, offset);
|
||||
zval_ptr_dtor(&retval);
|
||||
} else {
|
||||
zend_error(E_ERROR, "Cannot use object of type %s as array", ce->name);
|
||||
}
|
||||
@@ -538,7 +528,7 @@ ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS)
|
||||
{
|
||||
zval ***args;
|
||||
zend_internal_function *func = (zend_internal_function *)EG(function_state_ptr)->function;
|
||||
zval __call_name;
|
||||
zval method_name, method_args, __call_name;
|
||||
zval *method_name_ptr, *method_args_ptr;
|
||||
zval **call_args[2];
|
||||
zval *method_result_ptr = NULL;
|
||||
@@ -552,11 +542,11 @@ ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
ALLOC_ZVAL(method_name_ptr);
|
||||
method_name_ptr = &method_name;
|
||||
INIT_PZVAL(method_name_ptr);
|
||||
ZVAL_STRING(method_name_ptr, func->function_name, 0); /* no dup - it's a copy */
|
||||
|
||||
ALLOC_ZVAL(method_args_ptr);
|
||||
method_args_ptr = &method_args;
|
||||
INIT_PZVAL(method_args_ptr);
|
||||
array_init(method_args_ptr);
|
||||
|
||||
@@ -601,8 +591,8 @@ ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS)
|
||||
}
|
||||
|
||||
/* now destruct all auxiliaries */
|
||||
zval_ptr_dtor(&method_args_ptr);
|
||||
zval_ptr_dtor(&method_name_ptr);
|
||||
zval_dtor(method_args_ptr);
|
||||
zval_dtor(method_name_ptr);
|
||||
|
||||
/* destruct the function also, then - we have allocated it in get_method */
|
||||
efree(func);
|
||||
@@ -612,7 +602,7 @@ ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS)
|
||||
* Returns the function address that should be called, or NULL
|
||||
* if no such function exists.
|
||||
*/
|
||||
static inline zend_function *zend_check_private(zend_function *fbc, zend_class_entry *ce, int fn_flags, char *function_name_strval, int function_name_strlen TSRMLS_DC)
|
||||
inline zend_function *zend_check_private(zend_function *fbc, zend_class_entry *ce, int fn_flags, char *function_name_strval, int function_name_strlen TSRMLS_DC)
|
||||
{
|
||||
if (!ce) {
|
||||
return 0;
|
||||
@@ -798,10 +788,7 @@ ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, char *propert
|
||||
#endif
|
||||
|
||||
if (!zend_verify_property_access(property_info, ce TSRMLS_CC)) {
|
||||
if (!silent) {
|
||||
zend_error(E_ERROR, "Cannot access %s property %s::$%s", zend_visibility_string(property_info->flags), ce->name, property_name);
|
||||
}
|
||||
return NULL;
|
||||
zend_error(E_ERROR, "Cannot access %s property %s::$%s", zend_visibility_string(property_info->flags), ce->name, property_name);
|
||||
}
|
||||
|
||||
zend_hash_quick_find(tmp_ce->static_members, property_info->name, property_info->name_length+1, property_info->h, (void **) &retval);
|
||||
|
||||
@@ -58,16 +58,6 @@ ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TS
|
||||
}
|
||||
}
|
||||
|
||||
ZEND_API void zend_objects_store_mark_destructed(zend_objects_store *objects TSRMLS_DC)
|
||||
{
|
||||
zend_uint i = 1;
|
||||
|
||||
for (i = 1; i < objects->top ; i++) {
|
||||
if (objects->object_buckets[i].valid) {
|
||||
objects->object_buckets[i].destructor_called = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ZEND_API void zend_objects_store_free_object_storage(zend_objects_store *objects TSRMLS_DC)
|
||||
{
|
||||
|
||||
@@ -57,7 +57,6 @@ typedef struct _zend_objects_store {
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API void zend_objects_store_init(zend_objects_store *objects, zend_uint init_size);
|
||||
ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TSRMLS_DC);
|
||||
ZEND_API void zend_objects_store_mark_destructed(zend_objects_store *objects TSRMLS_DC);
|
||||
ZEND_API void zend_objects_store_destroy(zend_objects_store *objects);
|
||||
|
||||
/* Store API functions */
|
||||
|
||||
+25
-11
@@ -29,7 +29,6 @@
|
||||
#include "zend_fast_cache.h"
|
||||
#include "zend_API.h"
|
||||
#include "zend_multiply.h"
|
||||
#include "zend_strtod.h"
|
||||
|
||||
#define LONG_SIGN_MASK (1L << (8*sizeof(long)-1))
|
||||
|
||||
@@ -184,7 +183,15 @@ ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC)
|
||||
}
|
||||
|
||||
|
||||
#define DVAL_TO_LVAL(d, l) (l) = (d) > LONG_MAX ? (unsigned long) (d) : (long) (d)
|
||||
#define DVAL_TO_LVAL(d, l) do { \
|
||||
if ((d) > LONG_MAX) { \
|
||||
l = LONG_MAX; \
|
||||
} else if ((d) < LONG_MIN) { \
|
||||
l = LONG_MIN; \
|
||||
} else { \
|
||||
l = (d); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define zendi_convert_to_long(op, holder, result) \
|
||||
if (op==result) { \
|
||||
@@ -377,7 +384,7 @@ ZEND_API void convert_to_double(zval *op)
|
||||
case IS_STRING:
|
||||
strval = op->value.str.val;
|
||||
|
||||
op->value.dval = zend_strtod(strval, NULL);
|
||||
op->value.dval = strtod(strval, NULL);
|
||||
STR_FREE(strval);
|
||||
break;
|
||||
case IS_ARRAY:
|
||||
@@ -1897,9 +1904,9 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
|
||||
(ret2=is_numeric_string(s2->value.str.val, s2->value.str.len, &lval2, &dval2, 0))) {
|
||||
if ((ret1==IS_DOUBLE) || (ret2==IS_DOUBLE)) {
|
||||
if (ret1!=IS_DOUBLE) {
|
||||
dval1 = zend_strtod(s1->value.str.val, NULL);
|
||||
dval1 = strtod(s1->value.str.val, NULL);
|
||||
} else if (ret2!=IS_DOUBLE) {
|
||||
dval2 = zend_strtod(s2->value.str.val, NULL);
|
||||
dval2 = strtod(s2->value.str.val, NULL);
|
||||
}
|
||||
result->value.dval = dval1 - dval2;
|
||||
result->value.lval = ZEND_NORMALIZE_BOOL(result->value.dval);
|
||||
@@ -1952,13 +1959,13 @@ ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2 TSRMLS_DC)
|
||||
{
|
||||
result->type = IS_LONG;
|
||||
|
||||
if (Z_OBJ_HANDLE_P(o1) == Z_OBJ_HANDLE_P(o2)) {
|
||||
result->value.lval = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Z_OBJ_HT_P(o1)->compare_objects == NULL) {
|
||||
result->value.lval = 1;
|
||||
if (Z_OBJ_HANDLE_P(o1) == Z_OBJ_HANDLE_P(o2)) {
|
||||
result->value.lval = 0;
|
||||
} else {
|
||||
result->value.lval = 1;
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
result->value.lval = Z_OBJ_HT_P(o1)->compare_objects(o1, o2 TSRMLS_CC);
|
||||
}
|
||||
@@ -1973,6 +1980,13 @@ ZEND_API void zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_DC)
|
||||
op->value.str.val = (char *) emalloc_rel(MAX_LENGTH_OF_DOUBLE + EG(precision) + 1);
|
||||
sprintf(op->value.str.val, "%.*G", (int) EG(precision), dval);
|
||||
op->value.str.len = strlen(op->value.str.val);
|
||||
|
||||
if (EG(float_separator)[0] != '.') {
|
||||
char *p = op->value.str.val;
|
||||
if ((p = strchr(p, '.'))) {
|
||||
*p = EG(float_separator)[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <ieeefp.h>
|
||||
#endif
|
||||
|
||||
#include "zend_strtod.h"
|
||||
|
||||
#if 0&&HAVE_BCMATH
|
||||
#include "ext/bcmath/libbcmath/src/bcmath.h"
|
||||
@@ -88,7 +87,7 @@ static inline zend_bool is_numeric_string(char *str, int length, long *lval, dou
|
||||
*lval = local_lval;
|
||||
}
|
||||
return IS_LONG;
|
||||
} else if (end_ptr_long == str && *end_ptr_long != '\0' && *str != '.' && *str != '-') { /* ignore partial string matches */
|
||||
} else if (end_ptr_long == str && *end_ptr_long != '\0' && *str != '.') { /* ignore partial string matches */
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
@@ -100,7 +99,7 @@ static inline zend_bool is_numeric_string(char *str, int length, long *lval, dou
|
||||
}
|
||||
|
||||
errno=0;
|
||||
local_dval = zend_strtod(str, &end_ptr_double);
|
||||
local_dval = strtod(str, &end_ptr_double);
|
||||
if (errno != ERANGE) {
|
||||
if (end_ptr_double == str+length) { /* floating point string */
|
||||
if (!zend_finite(local_dval)) {
|
||||
|
||||
+81
-292
@@ -145,10 +145,8 @@ typedef struct _property_reference {
|
||||
|
||||
/* Struct for parameters */
|
||||
typedef struct _parameter_reference {
|
||||
zend_uint offset;
|
||||
zend_uint required;
|
||||
int offset;
|
||||
struct _zend_arg_info *arg_info;
|
||||
zend_function *fptr;
|
||||
} parameter_reference;
|
||||
|
||||
/* Struct for reflection objects */
|
||||
@@ -157,7 +155,6 @@ typedef struct {
|
||||
void *ptr;
|
||||
unsigned int free_ptr:1;
|
||||
zval *obj;
|
||||
zend_class_entry *ce;
|
||||
} reflection_object;
|
||||
|
||||
static zend_object_handlers reflection_object_handlers;
|
||||
@@ -216,7 +213,6 @@ static void reflection_objects_clone(void *object, void **object_clone TSRMLS_DC
|
||||
|
||||
static zend_object_value reflection_objects_new(zend_class_entry *class_type TSRMLS_DC)
|
||||
{
|
||||
zval tmp;
|
||||
zend_object_value retval;
|
||||
reflection_object *intern;
|
||||
|
||||
@@ -230,7 +226,6 @@ static zend_object_value reflection_objects_new(zend_class_entry *class_type TSR
|
||||
|
||||
ALLOC_HASHTABLE(intern->zo.properties);
|
||||
zend_hash_init(intern->zo.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
zend_hash_copy(intern->zo.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
retval.handle = zend_objects_store_put(intern, NULL, reflection_free_objects_storage, reflection_objects_clone TSRMLS_CC);
|
||||
retval.handlers = &reflection_object_handlers;
|
||||
return retval;
|
||||
@@ -506,14 +501,9 @@ static void _const_string(string *str, char *name, zval *value, char *indent TSR
|
||||
/* }}} */
|
||||
|
||||
/* {{{ _parameter_string */
|
||||
static void _parameter_string(string *str, zend_function *fptr, struct _zend_arg_info *arg_info, zend_uint offset, zend_uint required, char* indent TSRMLS_DC)
|
||||
static void _parameter_string(string *str, struct _zend_arg_info *arg_info, int offset, char* indent TSRMLS_DC)
|
||||
{
|
||||
string_printf(str, "Parameter #%d [ ", offset);
|
||||
if (offset >= required) {
|
||||
string_printf(str, "<optional> ");
|
||||
} else {
|
||||
string_printf(str, "<required> ");
|
||||
}
|
||||
if (arg_info->class_name) {
|
||||
string_printf(str, "%s ", arg_info->class_name);
|
||||
if (arg_info->allow_null) {
|
||||
@@ -528,32 +518,6 @@ static void _parameter_string(string *str, zend_function *fptr, struct _zend_arg
|
||||
} else {
|
||||
string_printf(str, "$param%d", offset);
|
||||
}
|
||||
if (fptr->type == ZEND_USER_FUNCTION && offset >= required) {
|
||||
zend_op *precv = &((zend_op_array*)fptr)->opcodes[offset*2 + 1];
|
||||
if (precv->opcode == ZEND_RECV_INIT && precv->op2.op_type != IS_UNUSED) {
|
||||
zval *zv, zv_copy;
|
||||
int use_copy;
|
||||
string_write(str, " = ", sizeof(" = ")-1);
|
||||
zv_copy = precv->op2.u.constant;
|
||||
zv = &zv_copy;
|
||||
zval_update_constant(&zv, (void*)1 TSRMLS_CC);
|
||||
if (Z_TYPE_P(zv) == IS_NULL) {
|
||||
string_write(str, "NULL", sizeof("NULL")-1);
|
||||
} else if (Z_TYPE_P(zv) == IS_STRING) {
|
||||
string_write(str, "'", sizeof("'")-1);
|
||||
string_write(str, Z_STRVAL_P(zv), MIN(Z_STRLEN_P(zv), 15));
|
||||
if (Z_STRLEN_P(zv) > 15) {
|
||||
string_write(str, "...", sizeof("...")-1);
|
||||
}
|
||||
string_write(str, "'", sizeof("'")-1);
|
||||
} else {
|
||||
zend_make_printable_zval(zv, &zv_copy, &use_copy);
|
||||
string_write(str, Z_STRVAL(zv_copy), Z_STRLEN(zv_copy));
|
||||
zval_dtor(&zv_copy);
|
||||
}
|
||||
zval_ptr_dtor(&zv);
|
||||
}
|
||||
}
|
||||
string_write(str, " ]", sizeof(" ]")-1);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -561,8 +525,8 @@ static void _parameter_string(string *str, zend_function *fptr, struct _zend_arg
|
||||
/* {{{ _function_parameter_string */
|
||||
static void _function_parameter_string(string *str, zend_function *fptr, char* indent TSRMLS_DC)
|
||||
{
|
||||
zend_uint i;
|
||||
struct _zend_arg_info *arg_info = fptr->common.arg_info;
|
||||
zend_uint i, required = fptr->common.required_num_args;
|
||||
|
||||
if (!arg_info) {
|
||||
return;
|
||||
@@ -572,7 +536,7 @@ static void _function_parameter_string(string *str, zend_function *fptr, char* i
|
||||
string_printf(str, "%s- Parameters [%d] {\n", indent, fptr->common.num_args);
|
||||
for (i = 0; i < fptr->common.num_args; i++) {
|
||||
string_printf(str, "%s ", indent);
|
||||
_parameter_string(str, fptr, arg_info, i, required, indent TSRMLS_CC);
|
||||
_parameter_string(str, arg_info, i, indent TSRMLS_CC);
|
||||
string_write(str, "\n", sizeof("\n")-1);
|
||||
arg_info++;
|
||||
}
|
||||
@@ -622,9 +586,6 @@ static void _function_string(string *str, zend_function *fptr, char* indent TSRM
|
||||
case ZEND_ACC_PROTECTED:
|
||||
string_printf(str, "protected ");
|
||||
break;
|
||||
default:
|
||||
string_printf(str, "<visibility error> ");
|
||||
break;
|
||||
}
|
||||
|
||||
string_printf(str, fptr->common.scope ? "method " : "function ");
|
||||
@@ -818,8 +779,8 @@ static void _function_check_flag(INTERNAL_FUNCTION_PARAMETERS, int mask)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ zend_reflection_class_factory */
|
||||
ZEND_API void zend_reflection_class_factory(zend_class_entry *ce, zval *object TSRMLS_DC)
|
||||
/* {{{ reflection_class_factory */
|
||||
static void reflection_class_factory(zend_class_entry *ce, zval *object TSRMLS_DC)
|
||||
{
|
||||
reflection_object *intern;
|
||||
zval *name;
|
||||
@@ -830,7 +791,6 @@ ZEND_API void zend_reflection_class_factory(zend_class_entry *ce, zval *object T
|
||||
intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC);
|
||||
intern->ptr = ce;
|
||||
intern->free_ptr = 0;
|
||||
intern->ce = ce;
|
||||
zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -858,13 +818,12 @@ static void reflection_extension_factory(zval *object, char *name_str TSRMLS_DC)
|
||||
ZVAL_STRINGL(name, module->name, name_len, 1);
|
||||
intern->ptr = module;
|
||||
intern->free_ptr = 0;
|
||||
intern->ce = NULL;
|
||||
zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ reflection_parameter_factory */
|
||||
static void reflection_parameter_factory(zend_function *fptr, struct _zend_arg_info *arg_info, zend_uint offset, zend_uint required, zval *object TSRMLS_DC)
|
||||
static void reflection_parameter_factory(struct _zend_arg_info *arg_info, int offset, zval *object TSRMLS_DC)
|
||||
{
|
||||
reflection_object *intern;
|
||||
parameter_reference *reference;
|
||||
@@ -881,11 +840,8 @@ static void reflection_parameter_factory(zend_function *fptr, struct _zend_arg_i
|
||||
reference = (parameter_reference*) emalloc(sizeof(parameter_reference));
|
||||
reference->arg_info = arg_info;
|
||||
reference->offset = offset;
|
||||
reference->required = required;
|
||||
reference->fptr = fptr;
|
||||
intern->ptr = reference;
|
||||
intern->free_ptr = 1;
|
||||
intern->ce = fptr->common.scope;
|
||||
zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -903,7 +859,6 @@ static void reflection_function_factory(zend_function *function, zval *object TS
|
||||
intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC);
|
||||
intern->ptr = function;
|
||||
intern->free_ptr = 0;
|
||||
intern->ce = NULL;
|
||||
zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -923,7 +878,6 @@ static void reflection_method_factory(zend_class_entry *ce, zend_function *metho
|
||||
intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC);
|
||||
intern->ptr = method;
|
||||
intern->free_ptr = 0;
|
||||
intern->ce = ce;
|
||||
zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL);
|
||||
zend_hash_update(Z_OBJPROP_P(object), "class", sizeof("class"), (void **) &classname, sizeof(zval *), NULL);
|
||||
}
|
||||
@@ -969,7 +923,6 @@ static void reflection_property_factory(zend_class_entry *ce, zend_property_info
|
||||
reference->prop = prop;
|
||||
intern->ptr = reference;
|
||||
intern->free_ptr = 1;
|
||||
intern->ce = ce;
|
||||
zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL);
|
||||
zend_hash_update(Z_OBJPROP_P(object), "class", sizeof("class"), (void **) &classname, sizeof(zval *), NULL);
|
||||
}
|
||||
@@ -1098,7 +1051,7 @@ ZEND_METHOD(reflection, export)
|
||||
zval_ptr_dtor(&fname);
|
||||
|
||||
if (result == FAILURE) {
|
||||
_DO_THROW("Invocation of method __toString() failed");
|
||||
_DO_THROW("Invokation of method __toString() failed");
|
||||
/* Returns from this function */
|
||||
}
|
||||
|
||||
@@ -1131,32 +1084,32 @@ ZEND_METHOD(reflection, getModifierNames)
|
||||
array_init(return_value);
|
||||
|
||||
if (modifiers & (ZEND_ACC_ABSTRACT | ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) {
|
||||
add_next_index_stringl(return_value, "abstract", sizeof("abstract")-1, 1);
|
||||
add_next_index_stringl(return_value, "abstract", sizeof("abstract"), 1);
|
||||
}
|
||||
if (modifiers & (ZEND_ACC_FINAL | ZEND_ACC_FINAL_CLASS)) {
|
||||
add_next_index_stringl(return_value, "final", sizeof("final")-1, 1);
|
||||
add_next_index_stringl(return_value, "final", sizeof("final"), 1);
|
||||
}
|
||||
|
||||
/* These are mutually exclusive */
|
||||
switch (modifiers & ZEND_ACC_PPP_MASK) {
|
||||
case ZEND_ACC_PUBLIC:
|
||||
add_next_index_stringl(return_value, "public", sizeof("public")-1, 1);
|
||||
add_next_index_stringl(return_value, "public", sizeof("public"), 1);
|
||||
break;
|
||||
case ZEND_ACC_PRIVATE:
|
||||
add_next_index_stringl(return_value, "private", sizeof("private")-1, 1);
|
||||
add_next_index_stringl(return_value, "private", sizeof("private"), 1);
|
||||
break;
|
||||
case ZEND_ACC_PROTECTED:
|
||||
add_next_index_stringl(return_value, "protected", sizeof("protected")-1, 1);
|
||||
add_next_index_stringl(return_value, "protected", sizeof("protected"), 1);
|
||||
break;
|
||||
}
|
||||
|
||||
if (modifiers & ZEND_ACC_STATIC) {
|
||||
add_next_index_stringl(return_value, "static", sizeof("static")-1, 1);
|
||||
add_next_index_stringl(return_value, "static", sizeof("static"), 1);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public static mixed ReflectionFunction::export(string name [, bool return]) throws ReflectionException
|
||||
/* {{{ proto public static mixed ReflectionFunction::export(string name, [, bool return]) throws ReflectionException
|
||||
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
|
||||
ZEND_METHOD(reflection_function, export)
|
||||
{
|
||||
@@ -1199,7 +1152,6 @@ ZEND_METHOD(reflection_function, __construct)
|
||||
zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL);
|
||||
intern->ptr = fptr;
|
||||
intern->free_ptr = 0;
|
||||
intern->ce = NULL;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1331,7 +1283,7 @@ ZEND_METHOD(reflection_function, getStaticVariables)
|
||||
|
||||
/* Return an empty array in case no static variables exist */
|
||||
array_init(return_value);
|
||||
if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.static_variables != NULL) {
|
||||
if (fptr->op_array.static_variables != NULL) {
|
||||
zend_hash_copy(Z_ARRVAL_P(return_value), fptr->op_array.static_variables, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *));
|
||||
}
|
||||
}
|
||||
@@ -1380,7 +1332,7 @@ ZEND_METHOD(reflection_function, invoke)
|
||||
|
||||
if (result == FAILURE) {
|
||||
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
|
||||
"Invocation of method %s() failed", fptr->common.function_name);
|
||||
"Invokation of method %s() failed", fptr->common.function_name);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1404,41 +1356,13 @@ ZEND_METHOD(reflection_function, returnsReference)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool ReflectionFunction::getNumberOfParameters()
|
||||
Gets the number of required parameters */
|
||||
ZEND_METHOD(reflection_function, getNumberOfParameters)
|
||||
{
|
||||
reflection_object *intern;
|
||||
zend_function *fptr;
|
||||
|
||||
METHOD_NOTSTATIC;
|
||||
GET_REFLECTION_OBJECT_PTR(fptr);
|
||||
|
||||
RETURN_LONG(fptr->common.num_args);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool ReflectionFunction::getNumberOfRequiredParameters()
|
||||
Gets the number of required parameters */
|
||||
ZEND_METHOD(reflection_function, getNumberOfRequiredParameters)
|
||||
{
|
||||
reflection_object *intern;
|
||||
zend_function *fptr;
|
||||
|
||||
METHOD_NOTSTATIC;
|
||||
GET_REFLECTION_OBJECT_PTR(fptr);
|
||||
|
||||
RETURN_LONG(fptr->common.required_num_args);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public ReflectionParameter[] Reflection_Function::getParameters()
|
||||
/* {{{ proto public ReflectionParameter[] ReflectionFunction::getParameters()
|
||||
Returns an array of parameter objects for this function */
|
||||
ZEND_METHOD(reflection_function, getParameters)
|
||||
{
|
||||
reflection_object *intern;
|
||||
zend_function *fptr;
|
||||
zend_uint i;
|
||||
int i;
|
||||
struct _zend_arg_info *arg_info;
|
||||
|
||||
METHOD_NOTSTATIC;
|
||||
@@ -1451,7 +1375,7 @@ ZEND_METHOD(reflection_function, getParameters)
|
||||
zval *parameter;
|
||||
|
||||
ALLOC_ZVAL(parameter);
|
||||
reflection_parameter_factory(fptr, arg_info, i, fptr->common.required_num_args, parameter TSRMLS_CC);
|
||||
reflection_parameter_factory(arg_info, i, parameter TSRMLS_CC);
|
||||
add_next_index_zval(return_value, parameter);
|
||||
|
||||
arg_info++;
|
||||
@@ -1459,7 +1383,7 @@ ZEND_METHOD(reflection_function, getParameters)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public static mixed ReflectionParameter::export(mixed function, mixed parameter [, bool return]) throws ReflectionException
|
||||
/* {{{ proto public static mixed ReflectionParameter::export(mixed function, mixed parameter, [, bool return]) throws ReflectionException
|
||||
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
|
||||
ZEND_METHOD(reflection_parameter, export)
|
||||
{
|
||||
@@ -1479,7 +1403,6 @@ ZEND_METHOD(reflection_parameter, __construct)
|
||||
zend_function *fptr;
|
||||
struct _zend_arg_info *arg_info;
|
||||
int position;
|
||||
zend_class_entry *ce = NULL;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", &reference, ¶meter) == FAILURE) {
|
||||
return;
|
||||
@@ -1512,6 +1435,7 @@ ZEND_METHOD(reflection_parameter, __construct)
|
||||
case IS_ARRAY: {
|
||||
zval **classref;
|
||||
zval **method;
|
||||
zend_class_entry *ce;
|
||||
zend_class_entry **pce;
|
||||
char *lcname;
|
||||
|
||||
@@ -1555,12 +1479,12 @@ ZEND_METHOD(reflection_parameter, __construct)
|
||||
arg_info = fptr->common.arg_info;
|
||||
if (Z_TYPE_P(parameter) == IS_LONG) {
|
||||
position= Z_LVAL_P(parameter);
|
||||
if (position < 0 || (zend_uint)position >= fptr->common.num_args) {
|
||||
if (position < 0 || position >= fptr->common.num_args) {
|
||||
_DO_THROW("The parameter specified by its offset could not be found");
|
||||
/* returns out of this function */
|
||||
}
|
||||
} else {
|
||||
zend_uint i;
|
||||
int i;
|
||||
|
||||
position= -1;
|
||||
convert_to_string_ex(¶meter);
|
||||
@@ -1586,12 +1510,9 @@ ZEND_METHOD(reflection_parameter, __construct)
|
||||
|
||||
ref = (parameter_reference*) emalloc(sizeof(parameter_reference));
|
||||
ref->arg_info = &arg_info[position];
|
||||
ref->offset = (zend_uint)position;
|
||||
ref->required = fptr->common.required_num_args;
|
||||
ref->fptr = fptr;
|
||||
ref->offset = position;
|
||||
intern->ptr = ref;
|
||||
intern->free_ptr = 1;
|
||||
intern->ce = ce;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1606,7 +1527,7 @@ ZEND_METHOD(reflection_parameter, __toString)
|
||||
METHOD_NOTSTATIC_NUMPARAMS(0);
|
||||
GET_REFLECTION_OBJECT_PTR(param);
|
||||
string_init(&str);
|
||||
_parameter_string(&str, param->fptr, param->arg_info, param->offset, param->required, "" TSRMLS_CC);
|
||||
_parameter_string(&str, param->arg_info, param->offset, "" TSRMLS_CC);
|
||||
RETURN_STRINGL(str.string, str.len - 1, 0);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1643,7 +1564,7 @@ ZEND_METHOD(reflection_parameter, getClass)
|
||||
return;
|
||||
}
|
||||
free_alloca(lcname);
|
||||
zend_reflection_class_factory(*pce, return_value TSRMLS_CC);
|
||||
reflection_class_factory(*pce, return_value TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1676,81 +1597,7 @@ ZEND_METHOD(reflection_parameter, isPassedByReference)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool ReflectionParameter::isOptional()
|
||||
Returns whether this parameter is an optional parameter */
|
||||
ZEND_METHOD(reflection_parameter, isOptional)
|
||||
{
|
||||
reflection_object *intern;
|
||||
parameter_reference *param;
|
||||
|
||||
METHOD_NOTSTATIC_NUMPARAMS(0);
|
||||
GET_REFLECTION_OBJECT_PTR(param);
|
||||
|
||||
RETVAL_BOOL(param->offset >= param->required);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool ReflectionParameter::isDefaultValueAvailable()
|
||||
Returns whether the default value of this parameter is available */
|
||||
ZEND_METHOD(reflection_parameter, isDefaultValueAvailable)
|
||||
{
|
||||
reflection_object *intern;
|
||||
parameter_reference *param;
|
||||
zend_op *precv;
|
||||
|
||||
METHOD_NOTSTATIC_NUMPARAMS(0);
|
||||
GET_REFLECTION_OBJECT_PTR(param);
|
||||
|
||||
if (param->fptr->type != ZEND_USER_FUNCTION)
|
||||
{
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (param->offset < param->required) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
precv = &((zend_op_array*)param->fptr)->opcodes[param->offset*2 + 1];
|
||||
if (precv->opcode != ZEND_RECV_INIT || precv->op2.op_type == IS_UNUSED) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
RETURN_TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool ReflectionParameter::getDefaultValue()
|
||||
Returns the default value of this parameter or throws an exception */
|
||||
ZEND_METHOD(reflection_parameter, getDefaultValue)
|
||||
{
|
||||
reflection_object *intern;
|
||||
parameter_reference *param;
|
||||
zend_op *precv;
|
||||
zval *zv, zv_copy;
|
||||
|
||||
METHOD_NOTSTATIC_NUMPARAMS(0);
|
||||
GET_REFLECTION_OBJECT_PTR(param);
|
||||
|
||||
if (param->fptr->type != ZEND_USER_FUNCTION)
|
||||
{
|
||||
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Cannot determine default value for internal functions");
|
||||
return;
|
||||
}
|
||||
if (param->offset < param->required) {
|
||||
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Parameter is not optional");
|
||||
return;
|
||||
}
|
||||
precv = &((zend_op_array*)param->fptr)->opcodes[param->offset*2 + 1];
|
||||
if (precv->opcode != ZEND_RECV_INIT || precv->op2.op_type == IS_UNUSED) {
|
||||
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Internal error");
|
||||
return;
|
||||
}
|
||||
|
||||
zv_copy = precv->op2.u.constant;
|
||||
zv = &zv_copy;
|
||||
zval_update_constant(&zv, (void*)1 TSRMLS_CC);
|
||||
RETURN_ZVAL(zv, 1, 1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public static mixed ReflectionMethod::export(mixed class, string name [, bool return]) throws ReflectionException
|
||||
/* {{{ proto public static mixed ReflectionMethod::export(mixed class, string name, [, bool return]) throws ReflectionException
|
||||
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
|
||||
ZEND_METHOD(reflection_method, export)
|
||||
{
|
||||
@@ -1822,7 +1669,6 @@ ZEND_METHOD(reflection_method, __construct)
|
||||
zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL);
|
||||
intern->ptr = mptr;
|
||||
intern->free_ptr = 0;
|
||||
intern->ce = ce;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1843,7 +1689,7 @@ ZEND_METHOD(reflection_method, __toString)
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public mixed ReflectionMethod::invoke(mixed object, mixed* args)
|
||||
Invokes the method. */
|
||||
Invokes the function. Pass a */
|
||||
ZEND_METHOD(reflection_method, invoke)
|
||||
{
|
||||
zval *retval_ptr;
|
||||
@@ -1860,7 +1706,7 @@ ZEND_METHOD(reflection_method, invoke)
|
||||
METHOD_NOTSTATIC;
|
||||
|
||||
if (argc < 1) {
|
||||
zend_error(E_WARNING, "Invoke() expects at least one parameter, none given");
|
||||
zend_error(E_WARNING, "%s expects at least one parameter, none given", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -1870,11 +1716,11 @@ ZEND_METHOD(reflection_method, invoke)
|
||||
(mptr->common.fn_flags & ZEND_ACC_ABSTRACT)) {
|
||||
if (mptr->common.fn_flags & ZEND_ACC_ABSTRACT) {
|
||||
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
|
||||
"Trying to invoke abstract method %s::%s()",
|
||||
"Trying to invoke abstract method %s::%s",
|
||||
mptr->common.scope->name, mptr->common.function_name);
|
||||
} else {
|
||||
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
|
||||
"Trying to invoke %s method %s::%s() from scope %s",
|
||||
"Trying to invoke %s method %s::%s from scope %s",
|
||||
mptr->common.fn_flags & ZEND_ACC_PROTECTED ? "protected" : "private",
|
||||
mptr->common.scope->name, mptr->common.function_name,
|
||||
Z_OBJCE_P(getThis())->name);
|
||||
@@ -1935,7 +1781,7 @@ ZEND_METHOD(reflection_method, invoke)
|
||||
|
||||
if (result == FAILURE) {
|
||||
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
|
||||
"Invocation of method %s::%s() failed", mptr->common.scope->name, mptr->common.function_name);
|
||||
"Invokation of method %s::%s() failed", mptr->common.scope->name, mptr->common.function_name);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2002,10 +1848,7 @@ ZEND_METHOD(reflection_method, isConstructor)
|
||||
|
||||
METHOD_NOTSTATIC_NUMPARAMS(0);
|
||||
GET_REFLECTION_OBJECT_PTR(mptr);
|
||||
/* we need to check if the ctor is the ctor of the class level we we
|
||||
* looking at since we might be looking at an inherited old style ctor
|
||||
* defined in base class. */
|
||||
RETURN_BOOL(mptr->common.fn_flags & ZEND_ACC_CTOR && intern->ce->constructor && intern->ce->constructor->common.scope == mptr->common.scope);
|
||||
RETURN_BOOL(mptr->common.scope->constructor == mptr);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -2018,7 +1861,7 @@ ZEND_METHOD(reflection_method, isDestructor)
|
||||
|
||||
METHOD_NOTSTATIC_NUMPARAMS(0);
|
||||
GET_REFLECTION_OBJECT_PTR(mptr);
|
||||
RETURN_BOOL(mptr->common.fn_flags & ZEND_ACC_DTOR);
|
||||
RETURN_BOOL(mptr->common.scope->destructor == mptr);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -2046,11 +1889,11 @@ ZEND_METHOD(reflection_method, getDeclaringClass)
|
||||
METHOD_NOTSTATIC;
|
||||
GET_REFLECTION_OBJECT_PTR(mptr);
|
||||
|
||||
zend_reflection_class_factory(mptr->common.scope, return_value TSRMLS_CC);
|
||||
reflection_class_factory(mptr->common.scope, return_value TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public static mixed ReflectionClass::export(mixed argument [, bool return]) throws ReflectionException
|
||||
/* {{{ proto public static mixed ReflectionClass::export(mixed argument, [, bool return]) throws ReflectionException
|
||||
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
|
||||
ZEND_METHOD(reflection_class, export)
|
||||
{
|
||||
@@ -2127,9 +1970,6 @@ ZEND_METHOD(reflection_class, getStaticProperties)
|
||||
|
||||
METHOD_NOTSTATIC_NUMPARAMS(0);
|
||||
GET_REFLECTION_OBJECT_PTR(ce);
|
||||
|
||||
zend_update_class_constants(ce TSRMLS_CC);
|
||||
|
||||
array_init(return_value);
|
||||
zend_hash_copy(Z_ARRVAL_P(return_value), ce->static_members, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *));
|
||||
}
|
||||
@@ -2147,8 +1987,6 @@ ZEND_METHOD(reflection_class, getDefaultProperties)
|
||||
GET_REFLECTION_OBJECT_PTR(ce);
|
||||
array_init(return_value);
|
||||
|
||||
zend_update_class_constants(ce TSRMLS_CC);
|
||||
|
||||
count = zend_hash_num_elements(&ce->default_properties);
|
||||
if (count > 0) {
|
||||
HashPosition pos;
|
||||
@@ -2321,7 +2159,7 @@ ZEND_METHOD(reflection_class, getMethod)
|
||||
reflection_object *intern;
|
||||
zend_class_entry *ce;
|
||||
zend_function *mptr;
|
||||
char *name, *lc_name;
|
||||
char *name;
|
||||
int name_len;
|
||||
|
||||
METHOD_NOTSTATIC;
|
||||
@@ -2330,12 +2168,10 @@ ZEND_METHOD(reflection_class, getMethod)
|
||||
}
|
||||
|
||||
GET_REFLECTION_OBJECT_PTR(ce);
|
||||
lc_name = zend_str_tolower_dup(name, name_len);
|
||||
if (zend_hash_find(&ce->function_table, lc_name, name_len + 1, (void**) &mptr) == SUCCESS) {
|
||||
zend_str_tolower(name, name_len);
|
||||
if (zend_hash_find(&ce->function_table, name, name_len + 1, (void**) &mptr) == SUCCESS) {
|
||||
reflection_method_factory(ce, mptr, return_value TSRMLS_CC);
|
||||
efree(lc_name);
|
||||
} else {
|
||||
efree(lc_name);
|
||||
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
|
||||
"Method %s does not exist", name);
|
||||
return;
|
||||
@@ -2637,7 +2473,7 @@ ZEND_METHOD(reflection_class, newInstance)
|
||||
if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
|
||||
efree(params);
|
||||
zval_ptr_dtor(&retval_ptr);
|
||||
zend_error(E_WARNING, "Invocation of %s's constructor failed", ce->name);
|
||||
zend_error(E_WARNING, "Invokation of %s's constructor failed", ce->name);
|
||||
RETURN_NULL();
|
||||
}
|
||||
if (retval_ptr) {
|
||||
@@ -2667,7 +2503,7 @@ ZEND_METHOD(reflection_class, getInterfaces)
|
||||
for (i=0; i < ce->num_interfaces; i++) {
|
||||
zval *interface;
|
||||
ALLOC_ZVAL(interface);
|
||||
zend_reflection_class_factory(ce->interfaces[i], interface TSRMLS_CC);
|
||||
reflection_class_factory(ce->interfaces[i], interface TSRMLS_CC);
|
||||
add_next_index_zval(return_value, interface);
|
||||
}
|
||||
}
|
||||
@@ -2685,14 +2521,14 @@ ZEND_METHOD(reflection_class, getParentClass)
|
||||
GET_REFLECTION_OBJECT_PTR(ce);
|
||||
|
||||
if (ce->parent) {
|
||||
zend_reflection_class_factory(ce->parent, return_value TSRMLS_CC);
|
||||
reflection_class_factory(ce->parent, return_value TSRMLS_CC);
|
||||
} else {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool ReflectionClass::isSubclassOf(string|ReflectionClass class)
|
||||
/* {{{ proto public bool ReflectionClass::isSubclassOf(string|reflection_class class)
|
||||
Returns whether this class is a subclass of another class */
|
||||
ZEND_METHOD(reflection_class, isSubclassOf)
|
||||
{
|
||||
@@ -2738,7 +2574,7 @@ ZEND_METHOD(reflection_class, isSubclassOf)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public bool ReflectionClass::implementsInterface(string|ReflectionClass interface_name)
|
||||
/* {{{ proto public bool ReflectionClass::implementsInterface(string|reflection_class interface_name)
|
||||
Returns whether this class is a subclass of another class */
|
||||
ZEND_METHOD(reflection_class, implementsInterface)
|
||||
{
|
||||
@@ -2836,7 +2672,7 @@ ZEND_METHOD(reflection_class, getExtensionName)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public static mixed ReflectionObject::export(mixed argument [, bool return]) throws ReflectionException
|
||||
/* {{{ proto public static mixed ReflectionObject::export(mixed argument, [, bool return]) throws ReflectionException
|
||||
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
|
||||
ZEND_METHOD(reflection_object, export)
|
||||
{
|
||||
@@ -2852,7 +2688,7 @@ ZEND_METHOD(reflection_object, __construct)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public static mixed ReflectionProperty::export(mixed class, string name [, bool return]) throws ReflectionException
|
||||
/* {{{ proto public static mixed ReflectionProperty::export(mixed class, string name, [, bool return]) throws ReflectionException
|
||||
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
|
||||
ZEND_METHOD(reflection_property, export)
|
||||
{
|
||||
@@ -2865,7 +2701,7 @@ ZEND_METHOD(reflection_property, export)
|
||||
ZEND_METHOD(reflection_property, __construct)
|
||||
{
|
||||
zval *propname, *classname;
|
||||
char *name_str, *class_name, *prop_name;
|
||||
char *name_str;
|
||||
int name_len;
|
||||
zval *object;
|
||||
reflection_object *intern;
|
||||
@@ -2930,9 +2766,8 @@ ZEND_METHOD(reflection_property, __construct)
|
||||
ZVAL_STRINGL(classname, ce->name, ce->name_length, 1);
|
||||
zend_hash_update(Z_OBJPROP_P(object), "class", sizeof("class"), (void **) &classname, sizeof(zval *), NULL);
|
||||
|
||||
zend_unmangle_property_name(property_info->name, &class_name, &prop_name);
|
||||
MAKE_STD_ZVAL(propname);
|
||||
ZVAL_STRING(propname, prop_name, 1);
|
||||
ZVAL_STRING(propname, property_info->name, 1);
|
||||
zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &propname, sizeof(zval *), NULL);
|
||||
|
||||
reference = (property_reference*) emalloc(sizeof(property_reference));
|
||||
@@ -2940,7 +2775,6 @@ ZEND_METHOD(reflection_property, __construct)
|
||||
reference->prop = property_info;
|
||||
intern->ptr = reference;
|
||||
intern->free_ptr = 1;
|
||||
intern->ce = ce;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -3033,7 +2867,7 @@ ZEND_METHOD(reflection_property, getModifiers)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public mixed ReflectionProperty::getValue([stdclass object])
|
||||
/* {{{ proto public mixed ReflectionProperty::getValue(stdclass object)
|
||||
Returns this property's value */
|
||||
ZEND_METHOD(reflection_property, getValue)
|
||||
{
|
||||
@@ -3050,16 +2884,16 @@ ZEND_METHOD(reflection_property, getValue)
|
||||
/* Returns from this function */
|
||||
}
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &object) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((ref->prop->flags & ZEND_ACC_STATIC)) {
|
||||
zend_update_class_constants(intern->ce TSRMLS_CC);
|
||||
if (zend_hash_quick_find(intern->ce->static_members, ref->prop->name, ref->prop->name_length + 1, ref->prop->h, (void **) &member) == FAILURE) {
|
||||
if (zend_hash_quick_find(Z_OBJCE_P(object)->static_members, ref->prop->name, ref->prop->name_length + 1, ref->prop->h, (void **) &member) == FAILURE) {
|
||||
zend_error(E_ERROR, "Internal error: Could not find the property %s", ref->prop->name);
|
||||
/* Bails out */
|
||||
}
|
||||
} else {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &object) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
if (zend_hash_quick_find(Z_OBJPROP_P(object), ref->prop->name, ref->prop->name_length + 1, ref->prop->h, (void **) &member) == FAILURE) {
|
||||
zend_error(E_ERROR, "Internal error: Could not find the property %s", ref->prop->name);
|
||||
/* Bails out */
|
||||
@@ -3071,7 +2905,7 @@ ZEND_METHOD(reflection_property, getValue)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto public void ReflectionProperty::setValue([stdclass object,] mixed value)
|
||||
/* {{{ proto public void ReflectionProperty::setValue(stdclass object, mixed value)
|
||||
Sets this property's value */
|
||||
ZEND_METHOD(reflection_property, setValue)
|
||||
{
|
||||
@@ -3081,48 +2915,38 @@ ZEND_METHOD(reflection_property, setValue)
|
||||
zval *object;
|
||||
zval *value;
|
||||
int setter_done = 0;
|
||||
zval *tmp;
|
||||
HashTable *prop_table;
|
||||
|
||||
METHOD_NOTSTATIC;
|
||||
GET_REFLECTION_OBJECT_PTR(ref);
|
||||
|
||||
if (ref->prop->flags & ~(ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)) {
|
||||
if (ref->prop->flags & ~ZEND_ACC_PUBLIC) {
|
||||
_DO_THROW("Cannot access non-public member");
|
||||
/* Returns from this function */
|
||||
}
|
||||
|
||||
if ((ref->prop->flags & ZEND_ACC_STATIC)) {
|
||||
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "z", &value) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", &tmp, &value) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
prop_table = intern->ce->static_members;
|
||||
} else {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "oz", &object, &value) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
prop_table = Z_OBJPROP_P(object);
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "oz", &object, &value) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (zend_hash_quick_find(prop_table, ref->prop->name, ref->prop->name_length + 1, ref->prop->h, (void **) &variable_ptr) == FAILURE) {
|
||||
if (zend_hash_quick_find(Z_OBJPROP_P(object), ref->prop->name, ref->prop->name_length + 1, ref->prop->h, (void **) &variable_ptr) == SUCCESS) {
|
||||
if (*variable_ptr == value) {
|
||||
setter_done = 1;
|
||||
} else {
|
||||
if (PZVAL_IS_REF(*variable_ptr)) {
|
||||
zval_dtor(*variable_ptr);
|
||||
(*variable_ptr)->type = value->type;
|
||||
(*variable_ptr)->value = value->value;
|
||||
if (value->refcount > 0) {
|
||||
zval_copy_ctor(*variable_ptr);
|
||||
}
|
||||
setter_done = 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
zend_error(E_ERROR, "Internal error: Could not find the property %s", ref->prop->name);
|
||||
/* Bails out */
|
||||
}
|
||||
if (*variable_ptr == value) {
|
||||
setter_done = 1;
|
||||
} else {
|
||||
if (PZVAL_IS_REF(*variable_ptr)) {
|
||||
zval_dtor(*variable_ptr);
|
||||
(*variable_ptr)->type = value->type;
|
||||
(*variable_ptr)->value = value->value;
|
||||
if (value->refcount > 0) {
|
||||
zval_copy_ctor(*variable_ptr);
|
||||
}
|
||||
setter_done = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!setter_done) {
|
||||
zval **foo;
|
||||
|
||||
@@ -3130,7 +2954,7 @@ ZEND_METHOD(reflection_property, setValue)
|
||||
if (PZVAL_IS_REF(value)) {
|
||||
SEPARATE_ZVAL(&value);
|
||||
}
|
||||
zend_hash_quick_update(prop_table, ref->prop->name, ref->prop->name_length+1, ref->prop->h, &value, sizeof(zval *), (void **) &foo);
|
||||
zend_hash_quick_update(Z_OBJPROP_P(object), ref->prop->name, ref->prop->name_length+1, ref->prop->h, &value, sizeof(zval *), (void **) &foo);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -3145,10 +2969,10 @@ ZEND_METHOD(reflection_property, getDeclaringClass)
|
||||
METHOD_NOTSTATIC_NUMPARAMS(0);
|
||||
GET_REFLECTION_OBJECT_PTR(ref);
|
||||
|
||||
zend_reflection_class_factory(ref->ce, return_value TSRMLS_CC);
|
||||
reflection_class_factory(ref->ce, return_value TSRMLS_CC);
|
||||
}
|
||||
|
||||
/* {{{ proto public static mixed ReflectionExtension::export(string name [, bool return]) throws ReflectionException
|
||||
/* {{{ proto public static mixed ReflectionExtension::export(string name, [, bool return]) throws ReflectionException
|
||||
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
|
||||
ZEND_METHOD(reflection_extension, export)
|
||||
{
|
||||
@@ -3191,7 +3015,6 @@ ZEND_METHOD(reflection_extension, __construct)
|
||||
zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL);
|
||||
intern->ptr = module;
|
||||
intern->free_ptr = 0;
|
||||
intern->ce = NULL;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -3264,7 +3087,7 @@ ZEND_METHOD(reflection_extension, getFunctions)
|
||||
|
||||
ALLOC_ZVAL(function);
|
||||
reflection_function_factory(fptr, function TSRMLS_CC);
|
||||
add_assoc_zval_ex(return_value, func->fname, strlen(func->fname)+1, function);
|
||||
add_next_index_zval(return_value, function);
|
||||
func++;
|
||||
}
|
||||
}
|
||||
@@ -3345,10 +3168,10 @@ static int add_extension_class(zend_class_entry **pce, int num_args, va_list arg
|
||||
TSRMLS_FETCH();
|
||||
if (add_reflection_class) {
|
||||
ALLOC_ZVAL(zclass);
|
||||
zend_reflection_class_factory(*pce, zclass TSRMLS_CC);
|
||||
reflection_class_factory(*pce, zclass TSRMLS_CC);
|
||||
add_assoc_zval_ex(class_array, (*pce)->name, (*pce)->name_length + 1, zclass);
|
||||
} else {
|
||||
add_next_index_stringl(class_array, (*pce)->name, (*pce)->name_length, 1);
|
||||
add_next_index_stringl(class_array, (*pce)->name, (*pce)->name_length + 1, 1);
|
||||
}
|
||||
}
|
||||
return ZEND_HASH_APPLY_KEEP;
|
||||
@@ -3418,8 +3241,6 @@ static zend_function_entry reflection_function_functions[] = {
|
||||
ZEND_ME(reflection_function, invoke, NULL, 0)
|
||||
ZEND_ME(reflection_function, returnsReference, NULL, 0)
|
||||
ZEND_ME(reflection_function, getParameters, NULL, 0)
|
||||
ZEND_ME(reflection_function, getNumberOfParameters, NULL, 0)
|
||||
ZEND_ME(reflection_function, getNumberOfRequiredParameters, NULL, 0)
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
@@ -3512,9 +3333,6 @@ static zend_function_entry reflection_parameter_functions[] = {
|
||||
ZEND_ME(reflection_parameter, isPassedByReference, NULL, 0)
|
||||
ZEND_ME(reflection_parameter, getClass, NULL, 0)
|
||||
ZEND_ME(reflection_parameter, allowsNull, NULL, 0)
|
||||
ZEND_ME(reflection_parameter, isOptional, NULL, 0)
|
||||
ZEND_ME(reflection_parameter, isDefaultValueAvailable, NULL, 0)
|
||||
ZEND_ME(reflection_parameter, getDefaultValue, NULL, 0)
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
@@ -3534,33 +3352,12 @@ static zend_function_entry reflection_extension_functions[] = {
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
static zend_object_handlers *zend_std_obj_handlers;
|
||||
|
||||
/* {{{ _reflection_write_property */
|
||||
static void _reflection_write_property(zval *object, zval *member, zval *value TSRMLS_DC)
|
||||
{
|
||||
if (Z_TYPE_P(member) == IS_STRING
|
||||
&& zend_hash_exists(&Z_OBJCE_P(object)->default_properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1)
|
||||
&& (!strcmp(Z_STRVAL_P(member), "name") || !strcmp(Z_STRVAL_P(member), "class")))
|
||||
{
|
||||
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
|
||||
"Cannot set read-only property %s::$%s", Z_OBJCE_P(object)->name, Z_STRVAL_P(member));
|
||||
}
|
||||
else
|
||||
{
|
||||
zend_std_obj_handlers->write_property(object, member, value TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ zend_register_reflection_api */
|
||||
ZEND_API void zend_register_reflection_api(TSRMLS_D) {
|
||||
zend_class_entry _reflection_entry;
|
||||
|
||||
zend_std_obj_handlers = zend_get_std_object_handlers();
|
||||
memcpy(&reflection_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
|
||||
reflection_object_handlers.clone_obj = NULL;
|
||||
reflection_object_handlers.write_property = _reflection_write_property;
|
||||
|
||||
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionException", reflection_exception_functions);
|
||||
reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_exception_get_default(), NULL TSRMLS_CC);
|
||||
@@ -3576,25 +3373,20 @@ ZEND_API void zend_register_reflection_api(TSRMLS_D) {
|
||||
_reflection_entry.create_object = reflection_objects_new;
|
||||
reflection_function_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC);
|
||||
reflection_register_implement(reflection_function_ptr, reflector_ptr TSRMLS_CC);
|
||||
zend_declare_property_string(reflection_function_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC);
|
||||
|
||||
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionParameter", reflection_parameter_functions);
|
||||
_reflection_entry.create_object = reflection_objects_new;
|
||||
reflection_parameter_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC);
|
||||
reflection_register_implement(reflection_parameter_ptr, reflector_ptr TSRMLS_CC);
|
||||
zend_declare_property_string(reflection_parameter_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC);
|
||||
|
||||
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionMethod", reflection_method_functions);
|
||||
_reflection_entry.create_object = reflection_objects_new;
|
||||
reflection_method_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_function_ptr, NULL TSRMLS_CC);
|
||||
zend_declare_property_string(reflection_method_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC);
|
||||
zend_declare_property_string(reflection_method_ptr, "class", sizeof("class")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC);
|
||||
|
||||
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionClass", reflection_class_functions);
|
||||
_reflection_entry.create_object = reflection_objects_new;
|
||||
reflection_class_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC);
|
||||
reflection_register_implement(reflection_class_ptr, reflector_ptr TSRMLS_CC);
|
||||
zend_declare_property_string(reflection_class_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC);
|
||||
|
||||
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionObject", reflection_object_functions);
|
||||
_reflection_entry.create_object = reflection_objects_new;
|
||||
@@ -3604,14 +3396,11 @@ ZEND_API void zend_register_reflection_api(TSRMLS_D) {
|
||||
_reflection_entry.create_object = reflection_objects_new;
|
||||
reflection_property_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC);
|
||||
reflection_register_implement(reflection_property_ptr, reflector_ptr TSRMLS_CC);
|
||||
zend_declare_property_string(reflection_property_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC);
|
||||
zend_declare_property_string(reflection_property_ptr, "class", sizeof("class")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC);
|
||||
|
||||
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionExtension", reflection_extension_functions);
|
||||
_reflection_entry.create_object = reflection_objects_new;
|
||||
reflection_extension_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC);
|
||||
reflection_register_implement(reflection_extension_ptr, reflector_ptr TSRMLS_CC);
|
||||
zend_declare_property_string(reflection_extension_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC);
|
||||
|
||||
/* Property modifiers */
|
||||
REGISTER_MAIN_LONG_CONSTANT("P_STATIC", ZEND_ACC_STATIC, CONST_PERSISTENT|CONST_CS);
|
||||
|
||||
+2
-1
@@ -79,10 +79,11 @@ ZEND_API int zend_stream_fixup(zend_file_handle *file_handle TSRMLS_DC)
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
/* make compatible with stream */
|
||||
/* promote to stream */
|
||||
file_handle->handle.stream.handle = file_handle->handle.fp;
|
||||
file_handle->handle.stream.reader = zend_stream_stdio_reader;
|
||||
file_handle->handle.stream.closer = zend_stream_stdio_closer;
|
||||
file_handle->type = ZEND_HANDLE_STREAM;
|
||||
|
||||
file_handle->handle.stream.interactive = isatty(fileno((FILE *)file_handle->handle.stream.handle));
|
||||
}
|
||||
|
||||
-1780
File diff suppressed because it is too large.
Load diff
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2004 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. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Derick Rethans <derick@php.net> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* This is a header file for the strtod implementation by David M. Gay which
|
||||
* can be found in zend_strtod.c */
|
||||
#ifndef ZEND_STRTOD_H
|
||||
#define ZEND_STRTOD_H
|
||||
#include <zend.h>
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API double zend_strtod(const char *s00, char **se);
|
||||
END_EXTERN_C()
|
||||
|
||||
#endif
|
||||
+26
-175
@@ -1,4 +1,4 @@
|
||||
dnl $Id$ -*- autoconf -*-
|
||||
dnl $Id$
|
||||
dnl
|
||||
dnl This file contains local autoconf functions.
|
||||
|
||||
@@ -16,36 +16,22 @@ AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[
|
||||
sed -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments
|
||||
])
|
||||
|
||||
AC_DEFUN([PHP_PROG_RE2C],[
|
||||
AC_DEFUN(PHP_PROG_RE2C,[
|
||||
AC_CHECK_PROG(RE2C, re2c, re2c, [exit 0;])
|
||||
])
|
||||
|
||||
|
||||
dnl PHP_DEFINE(WHAT[, value[, directory]])
|
||||
dnl PHP_DEFINE(WHAT[, value])
|
||||
dnl
|
||||
dnl Creates builddir/include/what.h and in there #define WHAT value
|
||||
dnl
|
||||
AC_DEFUN([PHP_DEFINE],[
|
||||
[echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > ]ifelse([$3],,[include],[$3])[/php_]translit($1,A-Z,a-z)[.h]
|
||||
])
|
||||
|
||||
dnl PHP_CANONICAL_HOST
|
||||
dnl
|
||||
AC_DEFUN([PHP_CANONICAL_HOST],[
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
dnl Make sure we do not continue if host_alias is empty.
|
||||
if test -z "$host_alias" && test -n "$host"; then
|
||||
host_alias=$host
|
||||
fi
|
||||
if test -z "$host_alias"; then
|
||||
AC_MSG_ERROR([host_alias is not set!])
|
||||
fi
|
||||
[echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > include/php_]translit($1,A-Z,a-z)[.h]
|
||||
])
|
||||
|
||||
dnl PHP_INIT_BUILD_SYSTEM
|
||||
dnl
|
||||
AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[
|
||||
AC_REQUIRE([PHP_CANONICAL_HOST])dnl
|
||||
test -d include || mkdir include
|
||||
> Makefile.objects
|
||||
> Makefile.fragments
|
||||
@@ -287,7 +273,6 @@ int readdir_r(DIR *, struct dirent *);
|
||||
])
|
||||
|
||||
AC_DEFUN([PHP_SHLIB_SUFFIX_NAME],[
|
||||
AC_REQUIRE([PHP_CANONICAL_HOST])dnl
|
||||
PHP_SUBST(SHLIB_SUFFIX_NAME)
|
||||
SHLIB_SUFFIX_NAME=so
|
||||
case $host_alias in
|
||||
@@ -786,17 +771,12 @@ AC_DEFUN([PHP_BUILD_PROGRAM],[
|
||||
php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
|
||||
php_cxx_post=' && echo > $[@]'
|
||||
php_lo=o
|
||||
|
||||
case $with_pic in
|
||||
yes) pic_setting='-prefer-pic';;
|
||||
no) pic_setting='-prefer-non-pic';;
|
||||
esac
|
||||
|
||||
|
||||
shared_c_pre='$(LIBTOOL) --mode=compile $(CC)'
|
||||
shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
|
||||
shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -prefer-pic'
|
||||
shared_c_post=
|
||||
shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
|
||||
shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
|
||||
shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -prefer-pic'
|
||||
shared_cxx_post=
|
||||
shared_lo=lo
|
||||
|
||||
@@ -1176,26 +1156,14 @@ dnl from object_var in build-dir.
|
||||
dnl
|
||||
AC_DEFUN([PHP_SHARED_MODULE],[
|
||||
install_modules="install-modules"
|
||||
|
||||
case $host_alias in
|
||||
*darwin*[)]
|
||||
suffix=so
|
||||
link_cmd='ifelse($4,,[$(CC)],[$(CXX)]) -dynamic -flat_namespace -bundle -undefined suppress $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)'
|
||||
;;
|
||||
*[)]
|
||||
suffix=la
|
||||
link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)'
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.$suffix"
|
||||
PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.la"
|
||||
PHP_SUBST($2)
|
||||
cat >>Makefile.objects<<EOF
|
||||
\$(phplibdir)/$1.$suffix: $3/$1.$suffix
|
||||
\$(LIBTOOL) --mode=install cp $3/$1.$suffix \$(phplibdir)
|
||||
\$(phplibdir)/$1.la: $3/$1.la
|
||||
\$(LIBTOOL) --mode=install cp $3/$1.la \$(phplibdir)
|
||||
|
||||
$3/$1.$suffix: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
|
||||
$link_cmd
|
||||
$3/$1.la: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
|
||||
\$(LIBTOOL) --mode=link ifelse($4,,[\$(CC)],[\$(CXX)]) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)
|
||||
|
||||
EOF
|
||||
])
|
||||
@@ -1587,7 +1555,7 @@ AC_DEFUN([PHP_CHECK_LIBRARY], [
|
||||
],[
|
||||
LDFLAGS=$save_old_LDFLAGS
|
||||
ext_shared=$save_ext_shared
|
||||
unset ac_cv_lib_$1[]_$2
|
||||
unset ac_cv_func_$1
|
||||
$4
|
||||
])dnl
|
||||
])
|
||||
@@ -1612,64 +1580,6 @@ AC_DEFUN([PHP_CHECK_FRAMEWORK], [
|
||||
])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_SETUP_KERBEROS(shared-add [, action-found [, action-not-found]])
|
||||
dnl
|
||||
dnl Common setup macro for kerberos
|
||||
dnl
|
||||
AC_DEFUN([PHP_SETUP_KERBEROS],[
|
||||
found_kerberos=no
|
||||
unset KERBEROS_CFLAGS
|
||||
unset KERBEROS_LIBS
|
||||
|
||||
dnl First try to find krb5-config
|
||||
if test -z "$KRB5_CONFIG"; then
|
||||
AC_PATH_PROG(KRB5_CONFIG, krb5-config, no, [$PATH:/usr/kerberos/bin:/usr/local/bin])
|
||||
fi
|
||||
|
||||
dnl If krb5-config is found try using it
|
||||
if test "$PHP_KERBEROS" = "yes" && test -x "$KRB5_CONFIG"; then
|
||||
KERBEROS_LIBS=`$KRB5_CONFIG --libs gssapi`
|
||||
KERBEROS_CFLAGS=`$KRB5_CONFIG --cflags gssapi`
|
||||
|
||||
if test -n "$KERBEROS_LIBS" && test -n "$KERBEROS_CFLAGS"; then
|
||||
found_kerberos=yes
|
||||
PHP_EVAL_LIBLINE($KERBEROS_LIBS, $1)
|
||||
PHP_EVAL_INCLINE($KERBEROS_CFLAGS)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl If still not found use old skool method
|
||||
if test "$found_kerberos" = "no"; then
|
||||
|
||||
if test "$PHP_KERBEROS" = "yes"; then
|
||||
PHP_KERBEROS="/usr/kerberos /usr/local /usr"
|
||||
fi
|
||||
|
||||
for i in $PHP_KERBEROS; do
|
||||
if test -f $i/lib/libkrb5.a || test -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then
|
||||
PHP_KERBEROS_DIR=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test "$PHP_KERBEROS_DIR"; then
|
||||
found_kerberos=yes
|
||||
PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/lib, $1)
|
||||
PHP_ADD_LIBRARY(gssapi_krb5, 1, $1)
|
||||
PHP_ADD_LIBRARY(krb5, 1, $1)
|
||||
PHP_ADD_LIBRARY(k5crypto, 1, $1)
|
||||
PHP_ADD_LIBRARY(com_err, 1, $1)
|
||||
PHP_ADD_INCLUDE($PHP_KERBEROS_DIR/include)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$found_kerberos" = "yes"; then
|
||||
ifelse([$2],[],:,[$2])
|
||||
ifelse([$3],[],,[else $3])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]])
|
||||
dnl
|
||||
@@ -1680,20 +1590,13 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
|
||||
unset OPENSSL_INCDIR
|
||||
unset OPENSSL_LIBDIR
|
||||
|
||||
dnl Fallbacks for different configure options
|
||||
if test "$PHP_OPENSSL" != "no"; then
|
||||
PHP_OPENSSL_DIR=$PHP_OPENSSL
|
||||
elif test "$PHP_IMAP_SSL" != "no"; then
|
||||
PHP_OPENSSL_DIR=$PHP_IMAP_SSL
|
||||
fi
|
||||
|
||||
dnl First try to find pkg-config
|
||||
if test -z "$PKG_CONFIG"; then
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
fi
|
||||
|
||||
dnl If pkg-config is found try using it
|
||||
if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
|
||||
if test "$PHP_OPENSSL" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
|
||||
if $PKG_CONFIG --atleast-version=0.9.6 openssl; then
|
||||
found_openssl=yes
|
||||
OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
|
||||
@@ -1707,16 +1610,15 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
|
||||
PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
|
||||
PHP_EVAL_INCLINE($OPENSSL_INCS)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl If pkg-config fails for some reason, revert to the old method
|
||||
if test "$found_openssl" = "no"; then
|
||||
|
||||
if test "$PHP_OPENSSL_DIR" = "yes"; then
|
||||
PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
|
||||
else
|
||||
|
||||
dnl If pkg-config fails for some reason, revert to the old method
|
||||
if test "$PHP_OPENSSL" = "yes"; then
|
||||
PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
|
||||
fi
|
||||
|
||||
for i in $PHP_OPENSSL_DIR; do
|
||||
for i in $PHP_OPENSSL; do
|
||||
if test -r $i/include/openssl/evp.h; then
|
||||
OPENSSL_INCDIR=$i/include
|
||||
fi
|
||||
@@ -1774,11 +1676,11 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
|
||||
PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1)
|
||||
fi
|
||||
|
||||
if test "$found_openssl" = "yes"; then
|
||||
dnl For apache 1.3.x static build
|
||||
OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
|
||||
AC_SUBST(OPENSSL_INCDIR_OPT)
|
||||
|
||||
if test "$found_openssl" = "yes"; then
|
||||
ifelse([$2],[],:,[$2])
|
||||
ifelse([$3],[],,[else $3])
|
||||
fi
|
||||
@@ -1793,28 +1695,16 @@ AC_DEFUN([PHP_SETUP_ICONV], [
|
||||
found_iconv=no
|
||||
unset ICONV_DIR
|
||||
|
||||
# Create the directories for a VPATH build:
|
||||
test -d ext || mkdir ext
|
||||
test -d ext/iconv || mkdir ext/iconv
|
||||
|
||||
echo > ext/iconv/php_have_bsd_iconv.h
|
||||
echo > ext/iconv/php_have_glibc_iconv.h
|
||||
echo > ext/iconv/php_have_libiconv.h
|
||||
echo > ext/iconv/php_have_iconv.h
|
||||
echo > ext/iconv/php_php_iconv_impl.h
|
||||
echo > ext/iconv/php_php_iconv_h_path.h
|
||||
echo > ext/iconv/php_iconv_supports_errno.h
|
||||
|
||||
dnl
|
||||
dnl Check libc first if no path is provided in --with-iconv
|
||||
dnl
|
||||
if test "$PHP_ICONV" = "yes"; then
|
||||
AC_CHECK_FUNC(iconv, [
|
||||
PHP_DEFINE(HAVE_ICONV,1,[ext/iconv])
|
||||
PHP_DEFINE(HAVE_ICONV)
|
||||
found_iconv=yes
|
||||
],[
|
||||
AC_CHECK_FUNC(libiconv,[
|
||||
PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
|
||||
PHP_DEFINE(HAVE_LIBICONV)
|
||||
found_iconv=yes
|
||||
])
|
||||
])
|
||||
@@ -1847,11 +1737,11 @@ AC_DEFUN([PHP_SETUP_ICONV], [
|
||||
then
|
||||
PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [
|
||||
found_iconv=yes
|
||||
PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
|
||||
PHP_DEFINE(HAVE_LIBICONV)
|
||||
], [
|
||||
PHP_CHECK_LIBRARY($iconv_lib_name, iconv, [
|
||||
found_iconv=yes
|
||||
PHP_DEFINE(HAVE_ICONV,1,[ext/iconv])
|
||||
PHP_DEFINE(HAVE_ICONV)
|
||||
], [], [
|
||||
-L$ICONV_DIR/lib
|
||||
])
|
||||
@@ -2010,7 +1900,7 @@ dnl
|
||||
dnl PHP_TEST_BUILD(function, action-if-ok, action-if-not-ok [, extra-libs [, extra-source]])
|
||||
dnl This macro checks whether build works and given function exists.
|
||||
dnl
|
||||
AC_DEFUN([PHP_TEST_BUILD], [
|
||||
AC_DEFUN(PHP_TEST_BUILD, [
|
||||
old_LIBS=$LIBS
|
||||
LIBS="$4 $LIBS"
|
||||
AC_TRY_RUN([
|
||||
@@ -2030,42 +1920,3 @@ AC_DEFUN([PHP_TEST_BUILD], [
|
||||
LIBS=$old_LIBS
|
||||
])
|
||||
])
|
||||
|
||||
dnl This macro is currently a placeholder in the config.m4 file
|
||||
dnl it is scanned by genif.sh when it builds the internal functions
|
||||
dnl list, so that modules can be init'd in the correct order
|
||||
dnl $1 = name of extension, $2 = extension upon which it depends
|
||||
dnl $3 = optional: if true, it's ok for $2 to have not been configured
|
||||
dnl default is false and should halt the build.
|
||||
dnl See ADD_EXTENSION_DEP in win32 build
|
||||
AC_DEFUN([PHP_ADD_EXTENSION_DEP], [])
|
||||
|
||||
|
||||
dnl
|
||||
dnl PHP_C_BIGENDIAN
|
||||
dnl Replacement macro for AC_C_BIGENDIAN
|
||||
dnl
|
||||
AC_DEFUN([PHP_C_BIGENDIAN],
|
||||
[AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,
|
||||
[
|
||||
ac_cv_c_bigendian_php=unknown
|
||||
AC_TRY_RUN(
|
||||
[
|
||||
int main(void)
|
||||
{
|
||||
short one = 1;
|
||||
char *cp = (char *)&one;
|
||||
|
||||
if (*cp == 0) {
|
||||
return(0);
|
||||
} else {
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown])
|
||||
])
|
||||
if test $ac_cv_c_bigendian_php = yes; then
|
||||
AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word])
|
||||
fi
|
||||
])
|
||||
|
||||
+9
-5
@@ -32,7 +32,6 @@ acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
|
||||
|
||||
targets = $(TOUCH_FILES) configure $(config_h_in)
|
||||
|
||||
SUPPRESS_WARNINGS ?= 2>&1 | (egrep -v '(AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never used|AC_PROG_LEX invoked multiple times|AC_DECL_YYTEXT is expanded from...|the top level)'||true)
|
||||
|
||||
all: $(targets)
|
||||
|
||||
@@ -40,21 +39,26 @@ acconfig.h: $(acconfig_h_SOURCES)
|
||||
@echo rebuilding $@
|
||||
cat $(acconfig_h_SOURCES) > $@
|
||||
|
||||
SUPPRESS_WARNINGS = (egrep -v '(AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never used|AC_PROG_LEX invoked multiple times)'||true)
|
||||
|
||||
$(config_h_in): configure acconfig.h
|
||||
# explicitly remove target since autoheader does not seem to work
|
||||
# correctly otherwise (timestamps are not updated)
|
||||
@echo rebuilding $@
|
||||
@rm -f $@
|
||||
autoheader $(SUPPRESS_WARNINGS)
|
||||
@autoheader 2>&1 | $(SUPPRESS_WARNINGS)
|
||||
|
||||
$(TOUCH_FILES):
|
||||
touch $(TOUCH_FILES)
|
||||
|
||||
aclocal.m4: configure.in acinclude.m4
|
||||
@echo rebuilding $@
|
||||
cat acinclude.m4 ./build/libtool.m4 > $@
|
||||
@libtoolize=`./build/shtool path glibtoolize libtoolize`; \
|
||||
$$libtoolize --copy --automake; \
|
||||
ltpath=`dirname $$libtoolize`; \
|
||||
ltfile=`cd $$ltpath/../share/aclocal; pwd`/libtool.m4; \
|
||||
cat acinclude.m4 $$ltfile > $@
|
||||
|
||||
configure: aclocal.m4 configure.in $(config_m4_files)
|
||||
@echo rebuilding $@
|
||||
autoconf $(SUPPRESS_WARNINGS)
|
||||
|
||||
@autoconf 2>&1 | $(SUPPRESS_WARNINGS)
|
||||
+40
-1
@@ -16,7 +16,7 @@
|
||||
# | Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id: buildcheck.sh,v 1.30.2.4 2005-01-20 01:41:52 sniper Exp $
|
||||
# $Id: buildcheck.sh,v 1.30 2004-01-08 17:31:49 sniper Exp $
|
||||
#
|
||||
|
||||
echo "buildconf: checking installation..."
|
||||
@@ -41,6 +41,7 @@ else
|
||||
echo "buildconf: autoconf version $ac_version (ok)"
|
||||
fi
|
||||
|
||||
|
||||
if test "$1" = "2" && test "$2" -ge "50"; then
|
||||
echo "buildconf: Your version of autoconf likely contains buggy cache code."
|
||||
echo " Running cvsclean for you."
|
||||
@@ -49,6 +50,44 @@ if test "$1" = "2" && test "$2" -ge "50"; then
|
||||
stamp=
|
||||
fi
|
||||
|
||||
# libtoolize 1.4.3 or newer
|
||||
# Prefer glibtoolize over libtoolize for Mac OS X compatibility
|
||||
libtoolize=`./build/shtool path glibtoolize libtoolize 2> /dev/null`
|
||||
lt_pversion=`$libtoolize --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//'`
|
||||
if test "$lt_pversion" = ""; then
|
||||
echo "buildconf: libtool not found."
|
||||
echo " You need libtool version 1.4.3 or newer installed"
|
||||
echo " to build PHP from CVS."
|
||||
exit 1
|
||||
fi
|
||||
IFS=.; set $lt_pversion; IFS=' '
|
||||
|
||||
if test "$3" = ""; then
|
||||
third=0
|
||||
else
|
||||
third=$3
|
||||
fi
|
||||
|
||||
if test "$1" -gt "1" || test "$2" -ge "5" || (test "$2" -ge "4" && test "$third" -ge "3")
|
||||
then
|
||||
echo "buildconf: libtool version $lt_pversion (ok)"
|
||||
else
|
||||
echo "buildconf: libtool version $lt_pversion found."
|
||||
echo " You need libtool version 1.4.3 or newer installed"
|
||||
echo " to build PHP from CVS."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ltpath=`echo $libtoolize | sed -e 's#/[^/]*/[^/]*$##'`
|
||||
ltfile="$ltpath/share/aclocal/libtool.m4"
|
||||
if test -r "$ltfile"; then
|
||||
:
|
||||
else
|
||||
echo "buildconf: $ltfile does not exist."
|
||||
echo " Please reinstall libtool."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test -n "$stamp" && touch $stamp
|
||||
|
||||
exit 0
|
||||
Vendored
-3713
File diff suppressed because it is too large.
Load diff
@@ -12,7 +12,6 @@ case "$EXTRA_VERSION" in
|
||||
esac
|
||||
|
||||
devok=0
|
||||
debug=no
|
||||
|
||||
while test $# -gt 0; do
|
||||
if test "$1" = "--copy"; then
|
||||
@@ -24,10 +23,6 @@ while test $# -gt 0; do
|
||||
echo "Forcing buildconf"
|
||||
fi
|
||||
|
||||
if test "$1" = "--debug"; then
|
||||
debug=yes
|
||||
fi
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
@@ -53,21 +48,17 @@ if test -z "$ZENDDIR"; then
|
||||
fi
|
||||
else
|
||||
if test -r "Zend/zend_execute_globals.h"; then
|
||||
:
|
||||
:
|
||||
else
|
||||
mv Zend ZendEngine2 2>/dev/null
|
||||
mv ZendEngine1 Zend
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
ZENDDIR=Zend
|
||||
echo "using default Zend directory"
|
||||
fi
|
||||
|
||||
rm -f generated_lists
|
||||
|
||||
if test "$debug" = "yes"; then
|
||||
${MAKE:-make} -s -f build/build.mk AMFLAGS="$automake_flags" ZENDDIR="$ZENDDIR" SUPPRESS_WARNINGS=""
|
||||
else
|
||||
${MAKE:-make} -s -f build/build.mk AMFLAGS="$automake_flags" ZENDDIR="$ZENDDIR"
|
||||
fi
|
||||
${MAKE:-make} -s -f build/build.mk AMFLAGS="$automake_flags" ZENDDIR="$ZENDDIR"
|
||||
Vendored
+53
-99
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2003-01-10'
|
||||
timestamp='2002-10-21'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -98,17 +98,14 @@ trap 'exit 1' 1 2 15
|
||||
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
||||
# use `HOST_CC' if defined, but it is deprecated.
|
||||
|
||||
# Portable tmp directory creation inspired by the Autoconf team.
|
||||
# This shell variable is my proudest work .. or something. --bje
|
||||
|
||||
set_cc_for_build='
|
||||
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
||||
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
||||
: ${TMPDIR=/tmp} ;
|
||||
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
||||
dummy=$tmp/dummy ;
|
||||
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
||||
set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
|
||||
(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
|
||||
|| (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
|
||||
dummy=$tmpdir/dummy ;
|
||||
files="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
||||
trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
|
||||
case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
,,) echo "int x;" > $dummy.c ;
|
||||
for c in cc gcc c89 c99 ; do
|
||||
@@ -116,13 +113,15 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
CC_FOR_BUILD="$c"; break ;
|
||||
fi ;
|
||||
done ;
|
||||
rm -f $files ;
|
||||
if test x"$CC_FOR_BUILD" = x ; then
|
||||
CC_FOR_BUILD=no_compiler_found ;
|
||||
fi
|
||||
;;
|
||||
,,*) CC_FOR_BUILD=$CC ;;
|
||||
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
||||
esac ;'
|
||||
esac ;
|
||||
unset files'
|
||||
|
||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||
# (ghazi@noc.rutgers.edu 1994-08-24)
|
||||
@@ -179,18 +178,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
;;
|
||||
esac
|
||||
# The OS release
|
||||
# Debian GNU/NetBSD machines have a different userland, and
|
||||
# thus, need a distinct triplet. However, they do not need
|
||||
# kernel version information, so it can be replaced with a
|
||||
# suitable tag, in the style of linux-gnu.
|
||||
case "${UNAME_VERSION}" in
|
||||
Debian*)
|
||||
release='-gnu'
|
||||
;;
|
||||
*)
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
;;
|
||||
esac
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||
# contains redundant information, the shorter form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||
@@ -235,9 +223,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
*:OpenBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:MicroBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
alpha:OSF1:*:*)
|
||||
if test $UNAME_RELEASE = "V4.0"; then
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||
@@ -301,6 +286,7 @@ EOF
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -f $dummy.s $dummy && rmdir $tmpdir
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
exit 0 ;;
|
||||
Alpha\ *:Windows_NT*:*)
|
||||
@@ -453,7 +439,8 @@ EOF
|
||||
EOF
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c \
|
||||
&& $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& exit 0
|
||||
&& rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
|
||||
rm -f $dummy.c $dummy && rmdir $tmpdir
|
||||
echo mips-mips-riscos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Motorola:PowerMAX_OS:*:*)
|
||||
@@ -462,7 +449,7 @@ EOF
|
||||
Motorola:*:4.3:PL8-*)
|
||||
echo powerpc-harris-powermax
|
||||
exit 0 ;;
|
||||
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
|
||||
Night_Hawk:*:*:PowerMAX_OS)
|
||||
echo powerpc-harris-powermax
|
||||
exit 0 ;;
|
||||
Night_Hawk:Power_UNIX:*:*)
|
||||
@@ -537,7 +524,8 @@ EOF
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
|
||||
rm -f $dummy.c $dummy && rmdir $tmpdir
|
||||
echo rs6000-ibm-aix3.2.5
|
||||
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
echo rs6000-ibm-aix3.2.4
|
||||
@@ -636,20 +624,10 @@ EOF
|
||||
}
|
||||
EOF
|
||||
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
||||
test -z "$HP_ARCH" && HP_ARCH=hppa
|
||||
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
|
||||
rm -f $dummy.c $dummy && rmdir $tmpdir
|
||||
fi ;;
|
||||
esac
|
||||
if [ ${HP_ARCH} = "hppa2.0w" ]
|
||||
then
|
||||
# avoid double evaluation of $set_cc_for_build
|
||||
test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
|
||||
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
|
||||
then
|
||||
HP_ARCH="hppa2.0w"
|
||||
else
|
||||
HP_ARCH="hppa64"
|
||||
fi
|
||||
fi
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
ia64:HP-UX:*:*)
|
||||
@@ -683,7 +661,8 @@ EOF
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
|
||||
rm -f $dummy.c $dummy && rmdir $tmpdir
|
||||
echo unknown-hitachi-hiuxwe2
|
||||
exit 0 ;;
|
||||
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
|
||||
@@ -741,15 +720,15 @@ EOF
|
||||
CRAY*TS:*:*:*)
|
||||
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*T3D:*:*:*)
|
||||
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*T3E:*:*:*)
|
||||
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*SV1:*:*:*)
|
||||
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
*:UNICOS/mp:*:*)
|
||||
echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
@@ -777,6 +756,7 @@ EOF
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||
rm -f $dummy.c && rmdir $tmpdir
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
|
||||
exit 0 ;;
|
||||
i*:CYGWIN*:*)
|
||||
@@ -789,16 +769,13 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit 0 ;;
|
||||
x86:Interix*:3*)
|
||||
echo i586-pc-interix3
|
||||
exit 0 ;;
|
||||
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
||||
echo i${UNAME_MACHINE}-pc-mks
|
||||
echo i386-pc-interix3
|
||||
exit 0 ;;
|
||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||
# UNAME_MACHINE based on the output of uname instead of i386?
|
||||
echo i586-pc-interix
|
||||
echo i386-pc-interix
|
||||
exit 0 ;;
|
||||
i*:UWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-uwin
|
||||
@@ -841,26 +818,8 @@ EOF
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
|
||||
;;
|
||||
mips64:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#undef CPU
|
||||
#undef mips64
|
||||
#undef mips64el
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=mips64el
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=mips64
|
||||
#else
|
||||
CPU=
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
|
||||
rm -f $dummy.c && rmdir $tmpdir
|
||||
test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
|
||||
;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-unknown-linux-gnu
|
||||
@@ -955,6 +914,7 @@ EOF
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||
rm -f $dummy.c && rmdir $tmpdir
|
||||
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
|
||||
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
||||
;;
|
||||
@@ -972,23 +932,6 @@ EOF
|
||||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
echo ${UNAME_MACHINE}-pc-os2-emx
|
||||
exit 0 ;;
|
||||
i*86:XTS-300:*:STOP)
|
||||
echo ${UNAME_MACHINE}-unknown-stop
|
||||
exit 0 ;;
|
||||
i*86:atheos:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-atheos
|
||||
exit 0 ;;
|
||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i*86:*DOS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
|
||||
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
@@ -1023,6 +966,9 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-sysv32
|
||||
fi
|
||||
exit 0 ;;
|
||||
i*86:*DOS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
pc:*:*:*)
|
||||
# Left here for compatibility:
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
@@ -1049,12 +995,9 @@ EOF
|
||||
mc68k:UNIX:SYSTEM5:3.51m)
|
||||
echo m68k-convergent-sysv
|
||||
exit 0 ;;
|
||||
M680?0:D-NIX:5.3:*)
|
||||
echo m68k-diab-dnix
|
||||
exit 0 ;;
|
||||
M68*:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
|
||||
OS_REL=''
|
||||
test -r /etc/.relid \
|
||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||
@@ -1071,6 +1014,9 @@ EOF
|
||||
mc68030:UNIX_System_V:4.*:*)
|
||||
echo m68k-atari-sysv4
|
||||
exit 0 ;;
|
||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.*:*)
|
||||
echo sparc-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@@ -1152,11 +1098,7 @@ EOF
|
||||
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:Darwin:*:*)
|
||||
case `uname -p` in
|
||||
*86) UNAME_PROCESSOR=i686 ;;
|
||||
powerpc) UNAME_PROCESSOR=powerpc ;;
|
||||
esac
|
||||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||
echo `uname -p`-apple-darwin${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
@@ -1192,6 +1134,11 @@ EOF
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-unknown-plan9
|
||||
exit 0 ;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
echo ${UNAME_MACHINE}-pc-os2-emx
|
||||
exit 0 ;;
|
||||
*:TOPS-10:*:*)
|
||||
echo pdp10-unknown-tops10
|
||||
exit 0 ;;
|
||||
@@ -1210,6 +1157,12 @@ EOF
|
||||
*:ITS:*:*)
|
||||
echo pdp10-unknown-its
|
||||
exit 0 ;;
|
||||
i*86:XTS-300:*:STOP)
|
||||
echo ${UNAME_MACHINE}-unknown-stop
|
||||
exit 0 ;;
|
||||
i*86:atheos:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-atheos
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
@@ -1330,7 +1283,8 @@ main ()
|
||||
}
|
||||
EOF
|
||||
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
|
||||
rm -f $dummy.c $dummy && rmdir $tmpdir
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
|
||||
|
||||
Vendored
+22
-21
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2003-01-03'
|
||||
timestamp='2002-09-05'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@@ -118,7 +118,7 @@ esac
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
@@ -245,19 +245,16 @@ case $basic_machine in
|
||||
| mips64vr4300 | mips64vr4300el \
|
||||
| mips64vr5000 | mips64vr5000el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| msp430 \
|
||||
| ns16k | ns32k \
|
||||
| openrisc | or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| s390 | s390x \
|
||||
| sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
|
||||
@@ -318,19 +315,16 @@ case $basic_machine in
|
||||
| mips64vr4300-* | mips64vr4300el-* \
|
||||
| mips64vr5000-* | mips64vr5000el-* \
|
||||
| mipsisa32-* | mipsisa32el-* \
|
||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||
| mipsisa64-* | mipsisa64el-* \
|
||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| msp430-* \
|
||||
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
|
||||
| mipstx39 | mipstx39el \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| s390-* | s390x-* \
|
||||
| sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
|
||||
@@ -722,10 +716,6 @@ case $basic_machine in
|
||||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
nv1)
|
||||
basic_machine=nv1-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
nsr-tandem)
|
||||
basic_machine=nsr-tandem
|
||||
;;
|
||||
@@ -822,6 +812,12 @@ case $basic_machine in
|
||||
rtpc | rtpc-*)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
s390 | s390-*)
|
||||
basic_machine=s390-ibm
|
||||
;;
|
||||
s390x | s390x-*)
|
||||
basic_machine=s390x-ibm
|
||||
;;
|
||||
sa29200)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
@@ -905,6 +901,10 @@ case $basic_machine in
|
||||
basic_machine=i386-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
t3d)
|
||||
basic_machine=alpha-cray
|
||||
os=-unicos
|
||||
;;
|
||||
t3e)
|
||||
basic_machine=alphaev5-cray
|
||||
os=-unicos
|
||||
@@ -977,6 +977,10 @@ case $basic_machine in
|
||||
basic_machine=hppa1.1-winbond
|
||||
os=-proelf
|
||||
;;
|
||||
windows32)
|
||||
basic_machine=i386-pc
|
||||
os=-windows32-msvcrt
|
||||
;;
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
@@ -1109,12 +1113,11 @@ case $os in
|
||||
| -chorusos* | -chorusrdb* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -microbsd*)
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
@@ -1126,10 +1129,8 @@ case $os in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-nto-qnx*)
|
||||
;;
|
||||
-nto*)
|
||||
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
||||
os=-nto-qnx
|
||||
;;
|
||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
||||
|
||||
+39
-86
@@ -35,20 +35,20 @@ for arg in $0 "$@"; do
|
||||
CONFIGURE_COMMAND="$CONFIGURE_COMMAND '$arg'"
|
||||
done
|
||||
|
||||
PHP_CANONICAL_HOST
|
||||
AC_CANONICAL_HOST
|
||||
AC_CONFIG_HEADER(main/php_config.h)
|
||||
|
||||
MAJOR_VERSION=5
|
||||
MINOR_VERSION=0
|
||||
RELEASE_VERSION=4
|
||||
EXTRA_VERSION="RC2"
|
||||
RELEASE_VERSION=2
|
||||
EXTRA_VERSION="RC1"
|
||||
VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
|
||||
|
||||
dnl Define where extension directories are located in the configure context
|
||||
AC_DEFUN([PHP_EXT_BUILDDIR],[ext/$1])dnl
|
||||
AC_DEFUN([PHP_EXT_DIR],[ext/$1])dnl
|
||||
AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir/ext/$1])dnl
|
||||
AC_DEFUN([PHP_ALWAYS_SHARED],[])dnl
|
||||
AC_DEFUN(PHP_EXT_BUILDDIR,[ext/$1])dnl
|
||||
AC_DEFUN(PHP_EXT_DIR,[ext/$1])dnl
|
||||
AC_DEFUN(PHP_EXT_SRCDIR,[$abs_srcdir/ext/$1])dnl
|
||||
AC_DEFUN(PHP_ALWAYS_SHARED,[])dnl
|
||||
|
||||
dnl Setting up the PHP version based on the information above.
|
||||
dnl -------------------------------------------------------------------------
|
||||
@@ -81,11 +81,7 @@ if test -n "$with_apache" && test -n "$with_apxs"; then
|
||||
AC_MSG_ERROR([--with-apache and --with-apxs cannot be used together])
|
||||
fi
|
||||
|
||||
if test -n "$with_apxs2filter" && test -n "$with_apxs2"; then
|
||||
AC_MSG_ERROR([--with-apxs2filter and --with-apxs2 cannot be used together])
|
||||
fi
|
||||
|
||||
|
||||
dnl Settings we want to make before the checks.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
@@ -132,6 +128,7 @@ dnl check for -R, etc. switch
|
||||
PHP_RUNPATH_SWITCH
|
||||
|
||||
PHP_PROG_RE2C
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_AWK
|
||||
AC_PROG_YACC
|
||||
@@ -173,13 +170,14 @@ else
|
||||
AC_MSG_WARN(You will need flex 2.5.4 or later if you want to regenerate Zend/PHP lexical parsers.)
|
||||
fi
|
||||
|
||||
dnl Check whether byte ordering is bigendian
|
||||
PHP_C_BIGENDIAN
|
||||
|
||||
|
||||
dnl Platform-specific compile settings.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
dnl if host_alias is empty, ac_cv_host_alias may still have the info
|
||||
if test -z "$host_alias"; then
|
||||
host_alias=$ac_cv_host_alias
|
||||
fi
|
||||
|
||||
case $host_alias in
|
||||
*solaris*)
|
||||
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
|
||||
@@ -198,34 +196,6 @@ case $host_alias in
|
||||
LIBS="$LIBS -lbe -lroot";;
|
||||
*mips*)
|
||||
CPPFLAGS="$CPPFLAGS -D_XPG_IV";;
|
||||
*hpux*)
|
||||
if test "$GCC" = "yes"; then
|
||||
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
|
||||
fi
|
||||
;;
|
||||
*netware*)
|
||||
PHP_OS="NetWare"
|
||||
PHP_UNAME="NetWare"
|
||||
AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[hardcode for each of the cross compiler host])
|
||||
AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[hardcode for each of the cross compiler host])
|
||||
PHP_BUILD_PROGRAM
|
||||
PHP_ADD_SOURCES(win32, sendmail.c, -I$CFLAGS,php)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Disable PIC mode by default where it is known to be safe to do so,
|
||||
# to avoid the performance hit from the lost register
|
||||
AC_MSG_CHECKING([whether to force non-PIC code in shared modules])
|
||||
case $host_alias in
|
||||
i?86-*-linux*|i?86-*-freebsd*)
|
||||
if test "${with_pic+set}" != "set" || test "$with_pic" = "no"; then
|
||||
with_pic=no
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
;;
|
||||
*) AC_MSG_RESULT(no) ;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -308,6 +278,7 @@ if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
|
||||
CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
|
||||
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
|
||||
fi
|
||||
INCLUDES="$INCLUDES -I\$(top_builddir)/Zend"
|
||||
test -d /usr/ucblib && PHP_ADD_LIBPATH(/usr/ucblib)
|
||||
|
||||
|
||||
@@ -352,8 +323,6 @@ AC_HEADER_DIRENT
|
||||
PHP_MISSING_FCLOSE_DECL
|
||||
dnl QNX requires unix.h to allow functions in libunix to work properly
|
||||
AC_CHECK_HEADERS([ \
|
||||
inttypes.h \
|
||||
stdint.h \
|
||||
dirent.h \
|
||||
ApplicationServices/ApplicationServices.h \
|
||||
sys/param.h \
|
||||
@@ -576,20 +545,17 @@ AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo,
|
||||
AC_TRY_RUN([
|
||||
#include <netdb.h>
|
||||
#include <sys/types.h>
|
||||
#ifndef AF_INET
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
int main(void) {
|
||||
struct addrinfo *ai, *pai, hints;
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_flags = AI_NUMERICHOST;
|
||||
|
||||
if (getaddrinfo("127.0.0.1", 0, &hints, &ai) < 0) {
|
||||
if (getaddrinfo("127.0.0.1", NULL, &hints, &ai) < 0) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (ai == 0) {
|
||||
if (ai == NULL) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -618,8 +584,8 @@ fi
|
||||
AC_REPLACE_FUNCS(strlcat strlcpy getopt)
|
||||
AC_FUNC_UTIME_NULL
|
||||
AC_FUNC_ALLOCA
|
||||
dnl PHP_AC_BROKEN_SPRINTF
|
||||
dnl PHP_AC_BROKEN_SNPRINTF
|
||||
PHP_AC_BROKEN_SPRINTF
|
||||
PHP_AC_BROKEN_SNPRINTF
|
||||
PHP_DECLARED_TIMEZONE
|
||||
PHP_TIME_R_TYPE
|
||||
PHP_READDIR_R_TYPE
|
||||
@@ -799,19 +765,6 @@ if test "$PHP_IPV6" != "no" && test "$ac_cv_ipv6_support" = yes; then
|
||||
AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([how big to make fd sets])
|
||||
AC_ARG_ENABLE(fd-setsize,
|
||||
[ --enable-fd-setsize Set size of descriptor sets],[
|
||||
if test "x$enableval" != "xyes"; then
|
||||
CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=$enableval"
|
||||
AC_MSG_RESULT(using $enableval)
|
||||
else
|
||||
AC_MSG_RESULT(using system default)
|
||||
fi
|
||||
],[
|
||||
AC_MSG_RESULT(using system default)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([whether to enable versioning])
|
||||
AC_ARG_ENABLE(versioning,
|
||||
[ --enable-versioning Export only required symbols.
|
||||
@@ -873,6 +826,7 @@ fi
|
||||
|
||||
enable_shared=yes
|
||||
enable_static=yes
|
||||
unset with_pic
|
||||
|
||||
case $php_build_target in
|
||||
program|static)
|
||||
@@ -883,10 +837,7 @@ program|static)
|
||||
;;
|
||||
shared)
|
||||
enable_static=no
|
||||
case $with_pic in
|
||||
yes) standard_libtool_flag='-prefer-pic';;
|
||||
no) standard_libtool_flag='-prefer-non-pic';;
|
||||
esac
|
||||
standard_libtool_flag=-prefer-pic
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -avoid-version -module"
|
||||
;;
|
||||
esac
|
||||
@@ -912,11 +863,6 @@ if test -z "$with_pear" && test "$enable_pear" = "no"; then
|
||||
with_pear=no
|
||||
fi
|
||||
|
||||
# If CLI is disabled -> disable PEAR
|
||||
if test "$PHP_SAPI_CLI" = "no"; then
|
||||
with_pear=no
|
||||
fi
|
||||
|
||||
PHP_ARG_WITH(pear, [whether to install PEAR],
|
||||
[ --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php)
|
||||
--without-pear Do not install PEAR], DEFAULT, yes)
|
||||
@@ -926,13 +872,17 @@ if test "$PHP_PEAR" != "no"; then
|
||||
dnl
|
||||
dnl PEAR dependancies
|
||||
dnl
|
||||
if test "$PHP_SAPI_CLI" = "no"; then
|
||||
pear_error_msg="$pear_error_msg
|
||||
PEAR requires CLI to be enabled. Add --enable-cli to the configure line. (or --disable-pear)"
|
||||
fi
|
||||
if test "$PHP_PCRE_REGEX" = "no"; then
|
||||
pear_error_msg="$pear_error_msg
|
||||
PEAR requires PCRE to be enabled. Add --with-pcre-regex to the configure line. (or --without-pear)"
|
||||
PEAR requires PCRE to be enabled. Add --with-pcre-regex to the configure line. (or --disable-pear)"
|
||||
fi
|
||||
if test "$PHP_XML" = "no"; then
|
||||
pear_error_msg="$pear_error_msg
|
||||
PEAR requires XML to be enabled. Add --enable-xml to the configure line. (or --without-pear)"
|
||||
PEAR requires XML to be enabled. Add --enable-xml to the configure line. (or --disable-pear)"
|
||||
fi
|
||||
|
||||
dnl
|
||||
@@ -940,7 +890,7 @@ dnl ext/xmlrpc is not really there yet to be a requirement..
|
||||
dnl
|
||||
dnl if test "$PHP_XMLRPC" = "no"; then
|
||||
dnl pear_error_msg="$pear_error_msg
|
||||
dnl PEAR requires XML-RPC to be enabled. Add --with-xmlrpc to the configure line. (or --without-pear)"
|
||||
dnl PEAR requires XML-RPC to be enabled. Add --with-xmlrpc to the configure line. (or --disable-pear)"
|
||||
dnl fi
|
||||
dnl
|
||||
|
||||
@@ -957,8 +907,6 @@ dnl
|
||||
*) PEAR_INSTALLDIR=$libdir/php;;
|
||||
esac
|
||||
fi
|
||||
|
||||
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/pear/Makefile.frag,$abs_srcdir/pear,pear)
|
||||
fi
|
||||
|
||||
|
||||
@@ -972,6 +920,10 @@ LIBZEND_BASIC_CHECKS
|
||||
LIBZEND_DLSYM_CHECK
|
||||
LIBZEND_OTHER_CHECKS
|
||||
|
||||
TSRM_LIB='TSRM/libtsrm.la'
|
||||
TSRM_DIR=TSRM
|
||||
CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/TSRM"
|
||||
|
||||
if test "$ZEND_MAINTAINER_ZTS" = "yes"; then
|
||||
AC_DEFINE(ZTS,1,[ ])
|
||||
PHP_THREAD_SAFETY=yes
|
||||
@@ -979,12 +931,9 @@ else
|
||||
PHP_THREAD_SAFETY=no
|
||||
fi
|
||||
|
||||
INCLUDES="$INCLUDES -I\$(top_builddir)/TSRM"
|
||||
INCLUDES="$INCLUDES -I\$(top_builddir)/Zend"
|
||||
|
||||
if test "$abs_srcdir" != "$abs_builddir"; then
|
||||
INCLUDES="$INCLUDES -I\$(top_srcdir)/main -I\$(top_srcdir)/Zend"
|
||||
INCLUDES="$INCLUDES -I\$(top_srcdir)/TSRM -I\$(top_builddir)/"
|
||||
INCLUDES="$INCLUDES -I\$(top_srcdir)/TSRM"
|
||||
fi
|
||||
|
||||
ZEND_EXTRA_LIBS="$LIBS"
|
||||
@@ -1154,6 +1103,7 @@ PHP_SUBST(CXXFLAGS)
|
||||
PHP_SUBST(CXXFLAGS_CLEAN)
|
||||
PHP_SUBST(CXX_PHP_COMPILE)
|
||||
PHP_SUBST_OLD(DEBUG_CFLAGS)
|
||||
PHP_SUBST(DEFS)
|
||||
PHP_SUBST_OLD(EXTENSION_DIR)
|
||||
PHP_SUBST_OLD(EXTRA_LDFLAGS)
|
||||
PHP_SUBST_OLD(EXTRA_LDFLAGS_PROGRAM)
|
||||
@@ -1182,6 +1132,8 @@ PHP_SUBST(PROG_SENDMAIL)
|
||||
PHP_SUBST(RE2C)
|
||||
PHP_SUBST(SHELL)
|
||||
PHP_SUBST(SHARED_LIBTOOL)
|
||||
PHP_SUBST(TSRM_DIR)
|
||||
PHP_SUBST(TSRM_LIB)
|
||||
PHP_SUBST(WARNING_LEVEL)
|
||||
PHP_SUBST(PHP_FRAMEWORKS)
|
||||
PHP_SUBST(PHP_FRAMEWORKPATH)
|
||||
@@ -1280,7 +1232,7 @@ PHP_ADD_SOURCES(Zend, \
|
||||
zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
|
||||
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
|
||||
zend_ini.c zend_qsort.c zend_multibyte.c zend_ts_hash.c zend_stream.c \
|
||||
zend_iterators.c zend_interfaces.c zend_exceptions.c zend_strtod.c)
|
||||
zend_iterators.c zend_interfaces.c zend_exceptions.c)
|
||||
|
||||
if test -r "$abs_srcdir/Zend/zend_objects.c"; then
|
||||
PHP_ADD_SOURCES(Zend, zend_objects.c zend_object_handlers.c zend_objects_API.c zend_mm.c \
|
||||
@@ -1304,6 +1256,7 @@ PHP_ADD_BUILD_DIR(TSRM)
|
||||
PHP_ADD_BUILD_DIR(Zend)
|
||||
|
||||
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/scripts/Makefile.frag,$abs_srcdir/scripts,scripts)
|
||||
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/pear/Makefile.frag,$abs_srcdir/pear,pear)
|
||||
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.frag,$abs_srcdir/Zend,Zend)
|
||||
|
||||
PHP_GEN_BUILD_DIRS
|
||||
@@ -1329,12 +1282,12 @@ fi
|
||||
#
|
||||
|
||||
test -d TSRM || $php_shtool mkdir TSRM
|
||||
echo '#include <../main/php_config.h>' > TSRM/tsrm_config.h
|
||||
echo '#include "../main/php_config.h"' > TSRM/tsrm_config.h
|
||||
|
||||
test -d Zend || $php_shtool mkdir Zend
|
||||
|
||||
cat >Zend/zend_config.h <<FEO
|
||||
#include <../main/php_config.h>
|
||||
#include "../main/php_config.h"
|
||||
#if defined(APACHE) && defined(PHP_API_VERSION)
|
||||
#undef HAVE_DLFCN_H
|
||||
#endif
|
||||
|
||||
Vendored
+4
-4
@@ -19,7 +19,7 @@ dnl PARTICULAR PURPOSE.
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
@@ -47,7 +47,7 @@ AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN([AM_SANITY_CHECK],
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
@@ -88,7 +88,7 @@ AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN([AM_MISSING_PROG],
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
@@ -104,7 +104,7 @@ AC_SUBST($1)])
|
||||
|
||||
# Like AC_CONFIG_HEADER, but automatically create stamp file.
|
||||
|
||||
AC_DEFUN([AM_CONFIG_HEADER],
|
||||
AC_DEFUN(AM_CONFIG_HEADER,
|
||||
[AC_PREREQ([2.12])
|
||||
AC_CONFIG_HEADER([$1])
|
||||
dnl When config.status generates a header, we must update the stamp-h file.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#elif defined(NETWARE)
|
||||
#include "config.nw.h"
|
||||
#else
|
||||
#include <php_config.h>
|
||||
#include "php_config.h"
|
||||
#endif
|
||||
|
||||
#include "php.h"
|
||||
|
||||
@@ -92,7 +92,6 @@ bc_raisemod (bc_num base, bc_num expo, bc_num mod, bc_num *result, int scale TSR
|
||||
bc_free_num (&power);
|
||||
bc_free_num (&exponent);
|
||||
bc_free_num (result);
|
||||
bc_free_num (&parity);
|
||||
*result = temp;
|
||||
return 0; /* Everything is OK. */
|
||||
}
|
||||
+2
-2
@@ -185,7 +185,7 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
|
||||
|
||||
if (bz_file == NULL) {
|
||||
/* that didn't work, so try and get something from the network/wrapper */
|
||||
stream = php_stream_open_wrapper(path, mode, options | STREAM_WILL_CAST, opened_path);
|
||||
stream = php_stream_open_wrapper(path, mode, options, opened_path);
|
||||
|
||||
if (stream) {
|
||||
int fd;
|
||||
@@ -196,7 +196,7 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
|
||||
/* remove the file created by php_stream_open_wrapper(), it is not needed since BZ2 functions
|
||||
* failed.
|
||||
*/
|
||||
if (opened_path && !bz_file && mode[0] == 'w') {
|
||||
if (!bz_file && mode[0] == 'w') {
|
||||
VCWD_UNLINK(*opened_path);
|
||||
}
|
||||
}
|
||||
|
||||
+19
-42
@@ -163,14 +163,26 @@ PHP_MINFO_FUNCTION(calendar)
|
||||
php_info_print_table_end();
|
||||
}
|
||||
|
||||
static void _php_cal_info(int cal, zval **ret)
|
||||
/* {{{ proto array cal_info(int calendar)
|
||||
Returns information about a particular calendar */
|
||||
PHP_FUNCTION(cal_info)
|
||||
{
|
||||
long cal;
|
||||
zval *months, *smonths;
|
||||
int i;
|
||||
struct cal_entry_t *calendar;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &cal) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (cal < 0 || cal >= CAL_NUM_CALS) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld.", cal);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
calendar = &cal_conversion_table[cal];
|
||||
array_init(*ret);
|
||||
array_init(return_value);
|
||||
|
||||
MAKE_STD_ZVAL(months);
|
||||
MAKE_STD_ZVAL(smonths);
|
||||
@@ -181,46 +193,11 @@ static void _php_cal_info(int cal, zval **ret)
|
||||
add_index_string(months, i, calendar->month_name_long[i], 1);
|
||||
add_index_string(smonths, i, calendar->month_name_short[i], 1);
|
||||
}
|
||||
add_assoc_zval(*ret, "months", months);
|
||||
add_assoc_zval(*ret, "abbrevmonths", smonths);
|
||||
add_assoc_long(*ret, "maxdaysinmonth", calendar->max_days_in_month);
|
||||
add_assoc_string(*ret, "calname", calendar->name, 1);
|
||||
add_assoc_string(*ret, "calsymbol", calendar->symbol, 1);
|
||||
|
||||
}
|
||||
|
||||
/* {{{ proto array cal_info(int calendar)
|
||||
Returns information about a particular calendar */
|
||||
PHP_FUNCTION(cal_info)
|
||||
{
|
||||
long cal = -1;
|
||||
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &cal) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (cal == -1) {
|
||||
int i;
|
||||
zval *val;
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
for (i = 0; i < CAL_NUM_CALS; i++) {
|
||||
MAKE_STD_ZVAL(val);
|
||||
_php_cal_info(i, &val);
|
||||
add_index_zval(return_value, i, val);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (cal != -1 && (cal < 0 || cal >= CAL_NUM_CALS)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld.", cal);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
_php_cal_info(cal, &return_value);
|
||||
add_assoc_zval(return_value, "months", months);
|
||||
add_assoc_zval(return_value, "abbrevmonths", smonths);
|
||||
add_assoc_long(return_value, "maxdaysinmonth", calendar->max_days_in_month);
|
||||
add_assoc_string(return_value, "calname", calendar->name, 1);
|
||||
add_assoc_string(return_value, "calsymbol", calendar->symbol, 1);
|
||||
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
+72
-173
@@ -32,139 +32,53 @@
|
||||
# include "Zend/zend_exceptions.h"
|
||||
# include <mscoree.h>
|
||||
|
||||
/* Since there is no official public mscorlib.h header file, and since
|
||||
* generating your own version from the elusive binary .tlb file takes a lot of
|
||||
* hacking and results in a 3MB header file (!), we opt for this slightly
|
||||
* voodoo approach. The following is just enough definition to be able to
|
||||
* reach the _AppDomain::CreateInstance method that we need to use to be able
|
||||
* to fire up .Net objects. We used to use IDispatch for this, but it would
|
||||
* not always work.
|
||||
*
|
||||
* The following info was obtained using OleView to export the IDL from
|
||||
* mscorlib.tlb. Note that OleView is unable to generate C headers for this
|
||||
* particular tlb... hence this mess.
|
||||
*/
|
||||
|
||||
const GUID IID_mscorlib_System_AppDomain = {
|
||||
0x05F696DC, 0x2B29, 0x3663, {0xAD, 0x8B, 0xC4, 0x38, 0x9C, 0xF2, 0xA7, 0x13 }};
|
||||
|
||||
typedef struct _Imscorlib_System_AppDomain IAppDomain;
|
||||
|
||||
struct _Imscorlib_System_AppDomainVtbl {
|
||||
BEGIN_INTERFACE
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
IAppDomain * This,
|
||||
/* [in] */ REFIID riid,
|
||||
/* [iid_is][out] */ void **ppvObject);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
IAppDomain * This);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
IAppDomain * This);
|
||||
|
||||
/* this is padding to get CreateInstance into the correct position */
|
||||
#define DUMMY_METHOD(x) HRESULT ( STDMETHODCALLTYPE *dummy_##x )(IAppDomain *This)
|
||||
|
||||
DUMMY_METHOD(GetTypeInfoCount);
|
||||
DUMMY_METHOD(GetTypeInfo);
|
||||
DUMMY_METHOD(GetIDsOfNames);
|
||||
DUMMY_METHOD(Invoke);
|
||||
DUMMY_METHOD(ToString);
|
||||
DUMMY_METHOD(Equals);
|
||||
DUMMY_METHOD(GetHashCode);
|
||||
DUMMY_METHOD(GetType);
|
||||
DUMMY_METHOD(InitializeLifetimeService);
|
||||
DUMMY_METHOD(GetLifetimeService);
|
||||
DUMMY_METHOD(Evidence);
|
||||
DUMMY_METHOD(add_DomainUnload);
|
||||
DUMMY_METHOD(remove_DomainUnload);
|
||||
DUMMY_METHOD(add_AssemblyLoad);
|
||||
DUMMY_METHOD(remove_AssemblyLoad);
|
||||
DUMMY_METHOD(add_ProcessExit);
|
||||
DUMMY_METHOD(remove_ProcessExit);
|
||||
DUMMY_METHOD(add_TypeResolve);
|
||||
DUMMY_METHOD(remove_TypeResolve);
|
||||
DUMMY_METHOD(add_ResourceResolve);
|
||||
DUMMY_METHOD(remove_ResourceResolve);
|
||||
DUMMY_METHOD(add_AssemblyResolve);
|
||||
DUMMY_METHOD(remove_AssemblyResolve);
|
||||
DUMMY_METHOD(add_UnhandledException);
|
||||
DUMMY_METHOD(remove_UnhandledException);
|
||||
DUMMY_METHOD(DefineDynamicAssembly);
|
||||
DUMMY_METHOD(DefineDynamicAssembly_2);
|
||||
DUMMY_METHOD(DefineDynamicAssembly_3);
|
||||
DUMMY_METHOD(DefineDynamicAssembly_4);
|
||||
DUMMY_METHOD(DefineDynamicAssembly_5);
|
||||
DUMMY_METHOD(DefineDynamicAssembly_6);
|
||||
DUMMY_METHOD(DefineDynamicAssembly_7);
|
||||
DUMMY_METHOD(DefineDynamicAssembly_8);
|
||||
DUMMY_METHOD(DefineDynamicAssembly_9);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *CreateInstance )(IAppDomain * This, BSTR AssemblyName, BSTR typeName, IUnknown **pRetVal);
|
||||
HRESULT ( STDMETHODCALLTYPE *CreateInstanceFrom )(IAppDomain * This, BSTR AssemblyFile, BSTR typeName, IUnknown **pRetVal);
|
||||
|
||||
/* more methods live here */
|
||||
|
||||
END_INTERFACE
|
||||
};
|
||||
|
||||
struct _Imscorlib_System_AppDomain {
|
||||
struct _Imscorlib_System_AppDomainVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
struct dotnet_runtime_stuff {
|
||||
ICorRuntimeHost *dotnet_host;
|
||||
IAppDomain *dotnet_domain;
|
||||
IDispatch *dotnet_domain;
|
||||
DISPID create_instance;
|
||||
};
|
||||
|
||||
static HRESULT dotnet_init(char **p_where TSRMLS_DC)
|
||||
/* Since there is no official public mscorlib.h header file, and since
|
||||
* generating your own version from the binary .tlb file results in a 3MB
|
||||
* header file (!), we opt for the Dispatch-able approach. This is slightly
|
||||
* slower for creating new objects, but not too bad */
|
||||
static int dotnet_init(TSRMLS_D)
|
||||
{
|
||||
HRESULT hr;
|
||||
struct dotnet_runtime_stuff *stuff;
|
||||
IUnknown *unk = NULL;
|
||||
OLECHAR *olename, *oletmp;
|
||||
char *where = "";
|
||||
OLECHAR *olename;
|
||||
|
||||
stuff = malloc(sizeof(*stuff));
|
||||
memset(stuff, 0, sizeof(*stuff));
|
||||
|
||||
where = "CoCreateInstance";
|
||||
hr = CoCreateInstance(&CLSID_CorRuntimeHost, NULL, CLSCTX_ALL,
|
||||
&IID_ICorRuntimeHost, (LPVOID*)&stuff->dotnet_host);
|
||||
if (SUCCEEDED(CoCreateInstance(&CLSID_CorRuntimeHost, NULL, CLSCTX_ALL,
|
||||
&IID_ICorRuntimeHost, (LPVOID*)&stuff->dotnet_host))) {
|
||||
|
||||
if (FAILED(hr))
|
||||
goto out;
|
||||
/* fire up the host and get the domain object */
|
||||
if (SUCCEEDED(ICorRuntimeHost_Start(stuff->dotnet_host)) &&
|
||||
SUCCEEDED(ICorRuntimeHost_GetDefaultDomain(stuff->dotnet_host, &unk)) &&
|
||||
SUCCEEDED(IUnknown_QueryInterface(unk, &IID_IDispatch, (LPVOID*)&stuff->dotnet_domain))) {
|
||||
|
||||
/* fire up the host and get the domain object */
|
||||
where = "ICorRuntimeHost_Start\n";
|
||||
hr = ICorRuntimeHost_Start(stuff->dotnet_host);
|
||||
if (FAILED(hr))
|
||||
goto out;
|
||||
|
||||
where = "ICorRuntimeHost_GetDefaultDomain";
|
||||
hr = ICorRuntimeHost_GetDefaultDomain(stuff->dotnet_host, &unk);
|
||||
if (FAILED(hr))
|
||||
goto out;
|
||||
/* locate the create-instance member */
|
||||
olename = php_com_string_to_olestring("CreateInstance", sizeof("CreateInstance")-1, CP_ACP TSRMLS_CC);
|
||||
hr = IDispatch_GetIDsOfNames(stuff->dotnet_domain, &IID_NULL, &olename, 1, LOCALE_SYSTEM_DEFAULT, &stuff->create_instance);
|
||||
efree(olename);
|
||||
|
||||
where = "QI: System._AppDomain";
|
||||
hr = IUnknown_QueryInterface(unk, &IID_mscorlib_System_AppDomain, (LPVOID*)&stuff->dotnet_domain);
|
||||
if (FAILED(hr))
|
||||
goto out;
|
||||
|
||||
COMG(dotnet_runtime_stuff) = stuff;
|
||||
if (SUCCEEDED(hr)) {
|
||||
COMG(dotnet_runtime_stuff) = stuff;
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
if (unk) {
|
||||
IUnknown_Release(unk);
|
||||
if (unk) {
|
||||
IUnknown_Release(unk);
|
||||
}
|
||||
}
|
||||
|
||||
if (COMG(dotnet_runtime_stuff) == NULL) {
|
||||
/* clean up */
|
||||
if (stuff->dotnet_domain) {
|
||||
IUnknown_Release(stuff->dotnet_domain);
|
||||
IDispatch_Release(stuff->dotnet_domain);
|
||||
}
|
||||
if (stuff->dotnet_host) {
|
||||
ICorRuntimeHost_Stop(stuff->dotnet_host);
|
||||
@@ -172,12 +86,10 @@ out:
|
||||
}
|
||||
free(stuff);
|
||||
|
||||
*p_where = where;
|
||||
|
||||
return hr;
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/* {{{ com_dotnet_create_instance - ctor for DOTNET class */
|
||||
@@ -188,21 +100,17 @@ PHP_FUNCTION(com_dotnet_create_instance)
|
||||
char *assembly_name, *datatype_name;
|
||||
int assembly_name_len, datatype_name_len;
|
||||
struct dotnet_runtime_stuff *stuff;
|
||||
OLECHAR *olestring, *oleassembly, *oletype;
|
||||
IObjectHandle *handle;
|
||||
DISPPARAMS params;
|
||||
OLECHAR *olestring;
|
||||
VARIANT vargs[2];
|
||||
VARIANT retval;
|
||||
HRESULT hr;
|
||||
int ret = FAILURE;
|
||||
char *where = "";
|
||||
IUnknown *unk = NULL;
|
||||
|
||||
if (COMG(dotnet_runtime_stuff) == NULL) {
|
||||
hr = dotnet_init(&where TSRMLS_CC);
|
||||
if (FAILED(hr)) {
|
||||
char buf[1024];
|
||||
char *err = php_win_err(hr);
|
||||
snprintf(buf, sizeof(buf), "Failed to init .Net runtime [%s] %s", where, err);
|
||||
if (err)
|
||||
LocalFree(err);
|
||||
php_com_throw_exception(hr, buf TSRMLS_CC);
|
||||
if (FAILURE == dotnet_init(TSRMLS_C)) {
|
||||
php_com_throw_exception(E_ERROR, "Failed to initialize .Net runtime" TSRMLS_CC);
|
||||
ZVAL_NULL(object);
|
||||
return;
|
||||
}
|
||||
@@ -221,63 +129,54 @@ PHP_FUNCTION(com_dotnet_create_instance)
|
||||
return;
|
||||
}
|
||||
|
||||
oletype = php_com_string_to_olestring(datatype_name, datatype_name_len, obj->code_page TSRMLS_CC);
|
||||
oleassembly = php_com_string_to_olestring(assembly_name, assembly_name_len, obj->code_page TSRMLS_CC);
|
||||
where = "CreateInstance";
|
||||
hr = stuff->dotnet_domain->lpVtbl->CreateInstance(stuff->dotnet_domain, oleassembly, oletype, &unk);
|
||||
efree(oletype);
|
||||
efree(oleassembly);
|
||||
params.cArgs = 2;
|
||||
params.cNamedArgs = 0;
|
||||
params.rgdispidNamedArgs = NULL;
|
||||
params.rgvarg = vargs;
|
||||
|
||||
VariantInit(&vargs[0]);
|
||||
VariantInit(&vargs[1]);
|
||||
VariantInit(&retval);
|
||||
|
||||
V_VT(&vargs[0]) = VT_BSTR;
|
||||
olestring = php_com_string_to_olestring(datatype_name, datatype_name_len, obj->code_page TSRMLS_CC);
|
||||
V_BSTR(&vargs[0]) = SysAllocStringByteLen((char*)olestring, datatype_name_len * sizeof(OLECHAR));
|
||||
efree(olestring);
|
||||
|
||||
V_VT(&vargs[1]) = VT_BSTR;
|
||||
olestring = php_com_string_to_olestring(assembly_name, assembly_name_len, obj->code_page TSRMLS_CC);
|
||||
V_BSTR(&vargs[1]) = SysAllocStringByteLen((char*)olestring, assembly_name_len * sizeof(OLECHAR));
|
||||
efree(olestring);
|
||||
|
||||
hr = IDispatch_Invoke(stuff->dotnet_domain, stuff->create_instance, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
|
||||
DISPATCH_METHOD, ¶ms, &retval, NULL, NULL);
|
||||
|
||||
if (SUCCEEDED(hr)) {
|
||||
VARIANT unwrapped;
|
||||
IObjectHandle *handle = NULL;
|
||||
/* retval should now be an IUnknown/IDispatch representation of an IObjectHandle interface */
|
||||
if ((V_VT(&retval) == VT_UNKNOWN || V_VT(&retval) == VT_DISPATCH) &&
|
||||
SUCCEEDED(IUnknown_QueryInterface(V_UNKNOWN(&retval), &IID_IObjectHandle, &handle))) {
|
||||
VARIANT unwrapped;
|
||||
|
||||
where = "QI: IObjectHandle";
|
||||
hr = IUnknown_QueryInterface(unk, &IID_IObjectHandle, &handle);
|
||||
if (SUCCEEDED(IObjectHandle_Unwrap(handle, &unwrapped))) {
|
||||
/* unwrapped is now the dispatch pointer we want */
|
||||
V_DISPATCH(&obj->v) = V_DISPATCH(&unwrapped);
|
||||
V_VT(&obj->v) = VT_DISPATCH;
|
||||
|
||||
if (SUCCEEDED(hr)) {
|
||||
where = "IObjectHandle_Unwrap";
|
||||
hr = IObjectHandle_Unwrap(handle, &unwrapped);
|
||||
if (SUCCEEDED(hr)) {
|
||||
/* get its type-info */
|
||||
IDispatch_GetTypeInfo(V_DISPATCH(&obj->v), 0, LANG_NEUTRAL, &obj->typeinfo);
|
||||
|
||||
if (V_VT(&unwrapped) == VT_UNKNOWN) {
|
||||
where = "Unwrapped, QI for IDispatch";
|
||||
hr = IUnknown_QueryInterface(V_UNKNOWN(&unwrapped), &IID_IDispatch, &V_DISPATCH(&obj->v));
|
||||
|
||||
if (SUCCEEDED(hr)) {
|
||||
V_VT(&obj->v) = VT_DISPATCH;
|
||||
|
||||
/* get its type-info */
|
||||
IDispatch_GetTypeInfo(V_DISPATCH(&obj->v), 0, LANG_NEUTRAL, &obj->typeinfo);
|
||||
ret = SUCCESS;
|
||||
}
|
||||
} else if (V_VT(&unwrapped) == VT_DISPATCH) {
|
||||
/* unwrapped is now the dispatch pointer we want */
|
||||
V_DISPATCH(&obj->v) = V_DISPATCH(&unwrapped);
|
||||
V_VT(&obj->v) = VT_DISPATCH;
|
||||
|
||||
/* get its type-info */
|
||||
IDispatch_GetTypeInfo(V_DISPATCH(&obj->v), 0, LANG_NEUTRAL, &obj->typeinfo);
|
||||
|
||||
ret = SUCCESS;
|
||||
} else {
|
||||
/* shouldn't happen, but let's be ready for it */
|
||||
VariantClear(&unwrapped);
|
||||
hr = E_INVALIDARG;
|
||||
}
|
||||
ret = SUCCESS;
|
||||
}
|
||||
IObjectHandle_Release(handle);
|
||||
}
|
||||
IUnknown_Release(unk);
|
||||
VariantClear(&retval);
|
||||
}
|
||||
|
||||
VariantClear(&vargs[0]);
|
||||
VariantClear(&vargs[1]);
|
||||
|
||||
if (ret == FAILURE) {
|
||||
char buf[1024];
|
||||
char *err = php_win_err(hr);
|
||||
snprintf(buf, sizeof(buf), "Failed to instantiate .Net object [%s] [0x%08x] %s", where, hr, err);
|
||||
if (err)
|
||||
LocalFree(err);
|
||||
php_com_throw_exception(hr, buf TSRMLS_CC);
|
||||
php_com_throw_exception(hr, "Failed to instantiate .Net object" TSRMLS_CC);
|
||||
ZVAL_NULL(object);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -227,35 +227,34 @@ void php_com_typelibrary_dtor(void *pDest)
|
||||
PHPAPI ITypeLib *php_com_load_typelib_via_cache(char *search_string,
|
||||
int codepage, int *cached TSRMLS_DC)
|
||||
{
|
||||
ITypeLib **TLp;
|
||||
ITypeLib *TL;
|
||||
ITypeLib **TL;
|
||||
char *name_dup;
|
||||
int l;
|
||||
|
||||
l = strlen(search_string);
|
||||
|
||||
if (zend_ts_hash_find(&php_com_typelibraries, search_string, l+1,
|
||||
(void**)&TLp) == SUCCESS) {
|
||||
(void**)&TL) == SUCCESS) {
|
||||
*cached = 1;
|
||||
/* add a reference for the caller */
|
||||
ITypeLib_AddRef(*TLp);
|
||||
return *TLp;
|
||||
ITypeLib_AddRef(*TL);
|
||||
return *TL;
|
||||
}
|
||||
|
||||
*cached = 0;
|
||||
name_dup = estrndup(search_string, l);
|
||||
TL = php_com_load_typelib(name_dup, codepage TSRMLS_CC);
|
||||
*TL = php_com_load_typelib(name_dup, codepage TSRMLS_CC);
|
||||
efree(name_dup);
|
||||
|
||||
if (TL) {
|
||||
if (*TL) {
|
||||
if (SUCCESS == zend_ts_hash_update(&php_com_typelibraries,
|
||||
search_string, l+1, (void*)TL, sizeof(ITypeLib*), NULL)) {
|
||||
search_string, l+1, (void*)*TL, sizeof(ITypeLib*), NULL)) {
|
||||
/* add a reference for the hash table */
|
||||
ITypeLib_AddRef(TL);
|
||||
ITypeLib_AddRef(*TL);
|
||||
}
|
||||
}
|
||||
|
||||
return TL;
|
||||
return *TL;
|
||||
}
|
||||
|
||||
ITypeInfo *php_com_locate_typeinfo(char *typelibname, php_com_dotnet_object *obj, char *dispname, int sink TSRMLS_DC)
|
||||
|
||||
+6
-14
@@ -1,6 +1,6 @@
|
||||
dnl $Id$
|
||||
|
||||
AC_DEFUN([CPDF_JPEG_TEST],[
|
||||
AC_DEFUN(CPDF_JPEG_TEST,[
|
||||
AC_ARG_WITH(jpeg-dir,
|
||||
[ --with-jpeg-dir[=DIR] CPDF: Set the path to libjpeg install prefix.],[
|
||||
for i in $withval /usr/local /usr; do
|
||||
@@ -22,7 +22,7 @@ AC_DEFUN([CPDF_JPEG_TEST],[
|
||||
],)
|
||||
])
|
||||
|
||||
AC_DEFUN([CPDF_TIFF_TEST],[
|
||||
AC_DEFUN(CPDF_TIFF_TEST,[
|
||||
AC_ARG_WITH(tiff-dir,
|
||||
[ --with-tiff-dir[=DIR] CPDF: Set the path to libtiff install prefix.],[
|
||||
for i in $withval /usr/local /usr; do
|
||||
@@ -58,22 +58,14 @@ if test "$PHP_CPDFLIB" != "no"; then
|
||||
CPDFLIB_INCLUDE=$i/include
|
||||
|
||||
PHP_CHECK_LIBRARY(cpdf, cpdf_open, [
|
||||
cpdf_libname=cpdf
|
||||
PHP_ADD_INCLUDE($CPDFLIB_INCLUDE)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(cpdf, $i/lib, CPDF_SHARED_LIBADD)
|
||||
AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])
|
||||
], [
|
||||
PHP_CHECK_LIBRARY(cpdfm, cpdf_open, [
|
||||
cpdf_libname=cpdfm
|
||||
], [
|
||||
AC_MSG_ERROR([Cpdflib module requires cpdflib >= 2.])
|
||||
], [
|
||||
-L$i/lib $CPDF_SHARED_LIBADD
|
||||
])
|
||||
AC_MSG_ERROR([Cpdflib module requires cpdflib >= 2.])
|
||||
], [
|
||||
-L$i/lib $CPDF_SHARED_LIBADD
|
||||
])
|
||||
|
||||
PHP_ADD_LIBRARY_WITH_PATH($cpdf_libname, $i/lib, CPDF_SHARED_LIBADD)
|
||||
PHP_ADD_INCLUDE($CPDFLIB_INCLUDE)
|
||||
AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -1286,10 +1286,6 @@ PHP_FUNCTION(cpdf_setdash)
|
||||
convert_to_long_ex(arg2);
|
||||
convert_to_long_ex(arg3);
|
||||
|
||||
if (!pdf->currentMemStream) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
snprintf(buffer, BUFFERLEN, "[%d %d] 0", (int) Z_LVAL_PP(arg2), (int) Z_LVAL_PP(arg3));
|
||||
cpdf_setdash(pdf, buffer);
|
||||
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ PHP_MINFO_FUNCTION(ctype)
|
||||
case IS_LONG: \
|
||||
if (Z_LVAL_P(c) <= 255 && Z_LVAL_P(c) >= 0) { \
|
||||
RETURN_BOOL(iswhat(Z_LVAL_P(c))); \
|
||||
} else if (Z_LVAL_P(c) >= -128 && Z_LVAL_P(c) < 0) { \
|
||||
} else if (Z_LVAL_P(c) >= -128) { \
|
||||
RETURN_BOOL(iswhat(Z_LVAL_P(c) + 256)); \
|
||||
} \
|
||||
SEPARATE_ZVAL(&c); \
|
||||
|
||||
+2
-2
@@ -32,10 +32,10 @@ if test "$PHP_CURL" != "no"; then
|
||||
CURL_CONFIG="curl-config"
|
||||
AC_MSG_CHECKING(for cURL 7.10.5 or greater)
|
||||
|
||||
if ${CURL_DIR}/bin/curl-config --libs > /dev/null 2>&1; then
|
||||
if ${CURL_DIR}/bin/curl-config --libs print > /dev/null 2>&1; then
|
||||
CURL_CONFIG=${CURL_DIR}/bin/curl-config
|
||||
else
|
||||
if ${CURL_DIR}/curl-config --libs > /dev/null 2>&1; then
|
||||
if ${CURL_DIR}/curl-config --libs print > /dev/null 2>&1; then
|
||||
CURL_CONFIG=${CURL_DIR}/curl-config
|
||||
fi
|
||||
fi
|
||||
|
||||
+15
-59
@@ -49,7 +49,6 @@
|
||||
#include "ext/standard/php_smart_str.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "ext/standard/file.h"
|
||||
#include "ext/standard/url.h"
|
||||
#include "php_curl.h"
|
||||
|
||||
static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
|
||||
@@ -61,26 +60,6 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
|
||||
#define CAAS(s, v) add_assoc_string_ex(return_value, s, sizeof(s), (char *) v, 1);
|
||||
#define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v);
|
||||
|
||||
#define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \
|
||||
if (PG(open_basedir) && *PG(open_basedir) && \
|
||||
strncasecmp(str, "file://", sizeof("file://") - 1) == 0) \
|
||||
{ \
|
||||
php_url *tmp_url; \
|
||||
\
|
||||
if (!(tmp_url = php_url_parse_ex(str, len))) { \
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid url '%s'", str); \
|
||||
RETURN_FALSE; \
|
||||
} \
|
||||
\
|
||||
if (php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
|
||||
(PG(safe_mode) && !php_checkuid(tmp_url->path, "rb+", CHECKUID_CHECK_MODE_PARAM)) \
|
||||
) { \
|
||||
php_url_free(tmp_url); \
|
||||
RETURN_FALSE; \
|
||||
} \
|
||||
php_url_free(tmp_url); \
|
||||
}
|
||||
|
||||
/* {{{ curl_functions[]
|
||||
*/
|
||||
function_entry curl_functions[] = {
|
||||
@@ -452,7 +431,6 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
|
||||
PHPWRITE(data, length);
|
||||
break;
|
||||
case PHP_CURL_FILE:
|
||||
fflush(t->fp);
|
||||
return fwrite(data, size, nmemb, t->fp);
|
||||
case PHP_CURL_RETURN:
|
||||
smart_str_appendl(&t->buf, data, (int) length);
|
||||
@@ -794,11 +772,6 @@ PHP_FUNCTION(curl_init)
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
if (argc > 0) {
|
||||
convert_to_string_ex(url);
|
||||
PHP_CURL_CHECK_OPEN_BASEDIR(Z_STRVAL_PP(url), Z_STRLEN_PP(url));
|
||||
}
|
||||
|
||||
cp = curl_easy_init();
|
||||
if (!cp) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not initialize a new cURL handle");
|
||||
@@ -828,13 +801,13 @@ PHP_FUNCTION(curl_init)
|
||||
curl_easy_setopt(ch->cp, CURLOPT_WRITEHEADER, (void *) ch);
|
||||
curl_easy_setopt(ch->cp, CURLOPT_DNS_USE_GLOBAL_CACHE, 1);
|
||||
curl_easy_setopt(ch->cp, CURLOPT_DNS_CACHE_TIMEOUT, 120);
|
||||
curl_easy_setopt(ch->cp, CURLOPT_MAXREDIRS, 20); /* prevent infinite redirects */
|
||||
#if defined(ZTS)
|
||||
curl_easy_setopt(ch->cp, CURLOPT_NOSIGNAL, 1);
|
||||
#endif
|
||||
|
||||
if (argc > 0) {
|
||||
char *urlcopy;
|
||||
convert_to_string_ex(url);
|
||||
|
||||
urlcopy = estrndup(Z_STRVAL_PP(url), Z_STRLEN_PP(url));
|
||||
curl_easy_setopt(ch->cp, CURLOPT_URL, urlcopy);
|
||||
@@ -880,7 +853,7 @@ PHP_FUNCTION(curl_copy_handle)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool curl_setopt(resource ch, int option, mixed value)
|
||||
/* {{{ proto bool curl_setopt(resource ch, string option, mixed value)
|
||||
Set an option for a CURL transfer */
|
||||
PHP_FUNCTION(curl_setopt)
|
||||
{
|
||||
@@ -981,12 +954,8 @@ PHP_FUNCTION(curl_setopt)
|
||||
char *copystr = NULL;
|
||||
|
||||
convert_to_string_ex(zvalue);
|
||||
|
||||
if (option == CURLOPT_URL) {
|
||||
PHP_CURL_CHECK_OPEN_BASEDIR(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
|
||||
}
|
||||
|
||||
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
|
||||
|
||||
error = curl_easy_setopt(ch->cp, option, copystr);
|
||||
zend_llist_add_element(&ch->to_free.str, ©str);
|
||||
|
||||
@@ -1115,22 +1084,18 @@ PHP_FUNCTION(curl_setopt)
|
||||
zend_hash_get_current_key_ex(postfields, &string_key, &string_key_len, &num_key, 0, NULL);
|
||||
|
||||
postval = Z_STRVAL_PP(current);
|
||||
|
||||
/* The arguments after _NAMELENGTH and _CONTENTSLENGTH
|
||||
* must be explicitly cast to long in curl_formadd
|
||||
* use since curl needs a long not an int. */
|
||||
if (*postval == '@') {
|
||||
error = curl_formadd(&first, &last,
|
||||
CURLFORM_COPYNAME, string_key,
|
||||
CURLFORM_NAMELENGTH, (long)string_key_len - 1,
|
||||
CURLFORM_NAMELENGTH, string_key_len - 1,
|
||||
CURLFORM_FILE, ++postval,
|
||||
CURLFORM_END);
|
||||
} else {
|
||||
error = curl_formadd(&first, &last,
|
||||
CURLFORM_COPYNAME, string_key,
|
||||
CURLFORM_NAMELENGTH, (long)string_key_len - 1,
|
||||
CURLFORM_NAMELENGTH, string_key_len - 1,
|
||||
CURLFORM_COPYCONTENTS, postval,
|
||||
CURLFORM_CONTENTSLENGTH, (long)Z_STRLEN_PP(current),
|
||||
CURLFORM_CONTENTSLENGTH, Z_STRLEN_PP(current),
|
||||
CURLFORM_END);
|
||||
}
|
||||
}
|
||||
@@ -1371,13 +1336,10 @@ PHP_FUNCTION(curl_getinfo)
|
||||
switch (option) {
|
||||
case CURLINFO_EFFECTIVE_URL:
|
||||
case CURLINFO_CONTENT_TYPE: {
|
||||
char *s_code = NULL;
|
||||
char *s_code;
|
||||
|
||||
if (curl_easy_getinfo(ch->cp, option, &s_code) == CURLE_OK && s_code) {
|
||||
RETURN_STRING(s_code, 1);
|
||||
} else {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
curl_easy_getinfo(ch->cp, option, &s_code);
|
||||
RETURN_STRING(s_code, 1);
|
||||
break;
|
||||
}
|
||||
case CURLINFO_HTTP_CODE:
|
||||
@@ -1386,13 +1348,10 @@ PHP_FUNCTION(curl_getinfo)
|
||||
case CURLINFO_FILETIME:
|
||||
case CURLINFO_SSL_VERIFYRESULT:
|
||||
case CURLINFO_REDIRECT_COUNT: {
|
||||
long code = 0;
|
||||
long code;
|
||||
|
||||
if (curl_easy_getinfo(ch->cp, option, &code) == CURLE_OK) {
|
||||
RETURN_LONG(code);
|
||||
} else {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
curl_easy_getinfo(ch->cp, option, &code);
|
||||
RETURN_LONG(code);
|
||||
break;
|
||||
}
|
||||
case CURLINFO_TOTAL_TIME:
|
||||
@@ -1407,13 +1366,10 @@ PHP_FUNCTION(curl_getinfo)
|
||||
case CURLINFO_CONTENT_LENGTH_UPLOAD:
|
||||
case CURLINFO_STARTTRANSFER_TIME:
|
||||
case CURLINFO_REDIRECT_TIME: {
|
||||
double code = 0.0;
|
||||
double code;
|
||||
|
||||
if (curl_easy_getinfo(ch->cp, option, &code) == CURLE_OK) {
|
||||
RETURN_DOUBLE(code);
|
||||
} else {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
curl_easy_getinfo(ch->cp, option, &code);
|
||||
RETURN_DOUBLE(code);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+13
-15
@@ -4,29 +4,26 @@ dnl
|
||||
|
||||
dnl Suppose we need FlatFile if no support or only CDB is used.
|
||||
|
||||
AC_DEFUN([PHP_DBA_STD_BEGIN],[
|
||||
AC_DEFUN(PHP_DBA_STD_BEGIN,[
|
||||
unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
|
||||
])
|
||||
|
||||
AC_DEFUN([PHP_TEMP_LDFLAGS],[
|
||||
AC_DEFUN(PHP_TEMP_LDFLAGS,[
|
||||
old_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$1 $LDFLAGS"
|
||||
old_LIBS=$LIBS
|
||||
LIBS="$2 $LIBS"
|
||||
$3
|
||||
$2
|
||||
LDFLAGS=$old_LDFLAGS
|
||||
LIBS=$old_LIBS
|
||||
])
|
||||
|
||||
dnl Assign INCLUDE/LFLAGS from PREFIX
|
||||
AC_DEFUN([PHP_DBA_STD_ASSIGN],[
|
||||
AC_DEFUN(PHP_DBA_STD_ASSIGN,[
|
||||
if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then
|
||||
THIS_LFLAGS=$THIS_PREFIX/lib
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Standard check
|
||||
AC_DEFUN([PHP_DBA_STD_CHECK],[
|
||||
AC_DEFUN(PHP_DBA_STD_CHECK,[
|
||||
THIS_RESULT="yes"
|
||||
if test -z "$THIS_INCLUDE"; then
|
||||
AC_MSG_ERROR([DBA: Could not find necessary header file(s).])
|
||||
@@ -37,14 +34,14 @@ AC_DEFUN([PHP_DBA_STD_CHECK],[
|
||||
])
|
||||
|
||||
dnl Attach THIS_x to DBA_x
|
||||
AC_DEFUN([PHP_DBA_STD_ATTACH],[
|
||||
AC_DEFUN(PHP_DBA_STD_ATTACH,[
|
||||
PHP_ADD_LIBRARY_WITH_PATH($THIS_LIBS, $THIS_LFLAGS, DBA_SHARED_LIBADD)
|
||||
unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX
|
||||
])
|
||||
|
||||
dnl Print the result message
|
||||
dnl parameters(name [, full name [, empty or error message]])
|
||||
AC_DEFUN([AC_DBA_STD_RESULT],[
|
||||
AC_DEFUN(AC_DBA_STD_RESULT,[
|
||||
THIS_NAME=[]translit($1,a-z0-9-,A-Z0-9_)
|
||||
if test -n "$2"; then
|
||||
THIS_FULL_NAME="$2"
|
||||
@@ -116,6 +113,7 @@ AC_ARG_WITH(gdbm,
|
||||
done
|
||||
|
||||
if test -n "$THIS_INCLUDE"; then
|
||||
unset ac_cv_lib_gdbm_gdbm_open
|
||||
PHP_CHECK_LIBRARY(gdbm, gdbm_open, [
|
||||
AC_DEFINE_UNQUOTED(GDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
|
||||
AC_DEFINE(DBA_GDBM, 1, [ ])
|
||||
@@ -168,10 +166,10 @@ AC_DBA_STD_RESULT(ndbm)
|
||||
|
||||
dnl Berkeley specific (library and version test)
|
||||
dnl parameters(version, library list, function)
|
||||
AC_DEFUN([PHP_DBA_DB_CHECK],[
|
||||
AC_DEFUN(PHP_DBA_DB_CHECK,[
|
||||
for LIB in $2; do
|
||||
if test -f $THIS_PREFIX/lib/lib$LIB.a -o -f $THIS_PREFIX/lib/lib$LIB.$SHLIB_SUFFIX_NAME; then
|
||||
PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib, -l$LIB,[
|
||||
PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib -l$LIB,[
|
||||
AC_TRY_LINK([
|
||||
#include "$THIS_INCLUDE"
|
||||
],[
|
||||
@@ -380,7 +378,7 @@ AC_ARG_WITH(dbm,
|
||||
])
|
||||
AC_DBA_STD_RESULT(dbm)
|
||||
|
||||
AC_DEFUN([PHP_DBA_BUILTIN_CDB],[
|
||||
AC_DEFUN(PHP_DBA_BUILTIN_CDB,[
|
||||
AC_DEFINE(DBA_CDB_BUILTIN, 1, [ ])
|
||||
AC_DEFINE(DBA_CDB_MAKE, 1, [ ])
|
||||
AC_DEFINE(DBA_CDB, 1, [ ])
|
||||
@@ -426,7 +424,7 @@ AC_ARG_WITH(cdb,
|
||||
])
|
||||
AC_DBA_STD_RESULT(cdb)
|
||||
|
||||
AC_DEFUN([PHP_DBA_BUILTIN_INI],[
|
||||
AC_DEFUN(PHP_DBA_BUILTIN_INI,[
|
||||
AC_DEFINE(DBA_INIFILE, 1, [ ])
|
||||
ini_sources="libinifile/inifile.c"
|
||||
THIS_RESULT="builtin"
|
||||
@@ -444,7 +442,7 @@ AC_ARG_WITH(inifile,
|
||||
])
|
||||
AC_DBA_STD_RESULT(inifile,INI File)
|
||||
|
||||
AC_DEFUN([PHP_DBA_BUILTIN_FLATFILE],[
|
||||
AC_DEFUN(PHP_DBA_BUILTIN_FLATFILE,[
|
||||
AC_DEFINE(DBA_FLATFILE, 1, [ ])
|
||||
flat_sources="libflatfile/flatfile.c"
|
||||
THIS_RESULT="builtin"
|
||||
|
||||
@@ -129,11 +129,6 @@ PHP_FUNCTION(dbase_open)
|
||||
convert_to_string_ex(dbf_name);
|
||||
convert_to_long_ex(options);
|
||||
|
||||
if (Z_LVAL_PP(options) == 1) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot open %s in write-only mode", Z_STRVAL_PP(dbf_name));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(dbf_name), NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
--TEST--
|
||||
Bug #31754: (dbase_open() fails for mode = 1)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('dbase')) {
|
||||
die('skip dbase extension not available');
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
// database "definition"
|
||||
$def = array(
|
||||
array("foo", "L")
|
||||
);
|
||||
|
||||
// creation
|
||||
$dbh = dbase_create('/tmp/bug31754.dbf', array(array('foo', 'L')));
|
||||
dbase_close($dbh);
|
||||
|
||||
$dbh = dbase_open('/tmp/bug31754.dbf', 1);
|
||||
unlink('/tmp/bug31754.dbf');
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: dbase_open(): Cannot open /tmp/bug31754.dbf in write-only mode in %sbug31754.php on line %d
|
||||
+6
-18
@@ -88,10 +88,8 @@ ZEND_GET_MODULE(dio)
|
||||
static void _dio_close_fd(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
{
|
||||
php_fd_t *f = (php_fd_t *) rsrc->ptr;
|
||||
if (f) {
|
||||
close(f->fd);
|
||||
free(f);
|
||||
}
|
||||
close(f->fd);
|
||||
free(f);
|
||||
}
|
||||
|
||||
#define RDIOC(c) REGISTER_LONG_CONSTANT(#c, c, CONST_CS | CONST_PERSISTENT)
|
||||
@@ -160,13 +158,10 @@ PHP_MINFO_FUNCTION(dio)
|
||||
php_info_print_table_end();
|
||||
}
|
||||
|
||||
static int new_php_fd(php_fd_t **f, int fd)
|
||||
static void new_php_fd(php_fd_t **f, int fd)
|
||||
{
|
||||
if (!(*f = malloc(sizeof(php_fd_t)))) {
|
||||
return 0;
|
||||
}
|
||||
*f = malloc(sizeof(php_fd_t));
|
||||
(*f)->fd = fd;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* {{{ proto resource dio_open(string filename, int flags[, int mode])
|
||||
@@ -199,10 +194,7 @@ PHP_FUNCTION(dio_open)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (!new_php_fd(&f, fd)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
new_php_fd(&f, fd);
|
||||
ZEND_REGISTER_RESOURCE(return_value, f, le_fd);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -444,9 +436,7 @@ PHP_FUNCTION(dio_fcntl)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (!new_php_fd(&new_f, fcntl(f->fd, cmd, Z_LVAL_P(arg)))) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
new_php_fd(&new_f, fcntl(f->fd, cmd, Z_LVAL_P(arg)));
|
||||
ZEND_REGISTER_RESOURCE(return_value, new_f, le_fd);
|
||||
break;
|
||||
}
|
||||
@@ -611,8 +601,6 @@ PHP_FUNCTION(dio_tcsetattr)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
memset(&newtio, 0, sizeof(newtio));
|
||||
tcgetattr(f->fd, &newtio);
|
||||
newtio.c_cflag = BAUD | CRTSCTS | DATABITS | STOPBITS | PARITYON | PARITY | CLOCAL | CREAD;
|
||||
newtio.c_iflag = IGNPAR;
|
||||
newtio.c_oflag = 0;
|
||||
|
||||
+5
-5
@@ -88,7 +88,7 @@ PHP_METHOD(domattr, __construct)
|
||||
/* }}} end DOMAttr::__construct */
|
||||
|
||||
|
||||
/* {{{ name string
|
||||
/* {{{ proto name string
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-1112119403
|
||||
Since:
|
||||
@@ -114,7 +114,7 @@ int dom_attr_name_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ specified boolean
|
||||
/* {{{ proto specified boolean
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-862529273
|
||||
Since:
|
||||
@@ -131,7 +131,7 @@ int dom_attr_specified_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ value string
|
||||
/* {{{ proto value string
|
||||
readonly=no
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-221662474
|
||||
Since:
|
||||
@@ -200,7 +200,7 @@ int dom_attr_value_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ ownerElement DOMElement
|
||||
/* {{{ proto ownerElement DOMElement
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Attr-ownerElement
|
||||
Since: DOM Level 2
|
||||
@@ -236,7 +236,7 @@ int dom_attr_owner_element_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ schemaTypeInfo DOMTypeInfo
|
||||
/* {{{ proto schemaTypeInfo DOMTypeInfo
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Attr-schemaTypeInfo
|
||||
Since: DOM Level 3
|
||||
|
||||
@@ -44,7 +44,7 @@ zend_function_entry php_dom_characterdata_class_functions[] = {
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/* {{{ data string
|
||||
/* {{{ proto data string
|
||||
readonly=no
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-72AB8359
|
||||
Since:
|
||||
@@ -105,7 +105,7 @@ int dom_characterdata_data_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ length long
|
||||
/* {{{ proto length long
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-7D61178C
|
||||
Since:
|
||||
@@ -140,7 +140,7 @@ int dom_characterdata_length_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto string dom_characterdata_substring_data(int offset, int count);
|
||||
/* {{{ proto string dom_characterdata_substring_data(long offset, long count);
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-6531BCCF
|
||||
Since:
|
||||
*/
|
||||
@@ -215,7 +215,7 @@ PHP_FUNCTION(dom_characterdata_append_data)
|
||||
/* }}} end dom_characterdata_append_data */
|
||||
|
||||
|
||||
/* {{{ proto void dom_characterdata_insert_data(int offset, string arg);
|
||||
/* {{{ proto void dom_characterdata_insert_data(long offset, string arg);
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-3EDB695F
|
||||
Since:
|
||||
*/
|
||||
@@ -264,7 +264,7 @@ PHP_FUNCTION(dom_characterdata_insert_data)
|
||||
/* }}} end dom_characterdata_insert_data */
|
||||
|
||||
|
||||
/* {{{ proto void dom_characterdata_delete_data(int offset, int count);
|
||||
/* {{{ proto void dom_characterdata_delete_data(long offset, long count);
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-7C603781
|
||||
Since:
|
||||
*/
|
||||
@@ -320,7 +320,7 @@ PHP_FUNCTION(dom_characterdata_delete_data)
|
||||
/* }}} end dom_characterdata_delete_data */
|
||||
|
||||
|
||||
/* {{{ proto void dom_characterdata_replace_data(int offset, int count, string arg);
|
||||
/* {{{ proto void dom_characterdata_replace_data(long offset, long count, string arg);
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-E5CBA7FB
|
||||
Since:
|
||||
*/
|
||||
|
||||
+21
-21
@@ -88,7 +88,7 @@ zend_function_entry php_dom_document_class_functions[] = {
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/* {{{ docType DOMDocumentType
|
||||
/* {{{ proto docType DOMDocumentType
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-B63ED1A31
|
||||
Since:
|
||||
@@ -124,7 +124,7 @@ int dom_document_doctype_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ implementation DOMImplementation
|
||||
/* {{{ proto implementation DOMImplementation
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1B793EBA
|
||||
Since:
|
||||
@@ -140,7 +140,7 @@ int dom_document_implementation_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ documentElement DOMElement
|
||||
/* {{{ proto documentElement DOMElement
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-87CD092
|
||||
Since:
|
||||
@@ -174,7 +174,7 @@ int dom_document_document_element_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ actualEncoding string
|
||||
/* {{{ proto actualEncoding string
|
||||
readonly=no
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-actualEncoding
|
||||
Since: DOM Level 3
|
||||
@@ -195,7 +195,7 @@ int dom_document_actual_encoding_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ encoding string
|
||||
/* {{{ proto encoding string
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-encoding
|
||||
Since: DOM Level 3
|
||||
*/
|
||||
@@ -268,7 +268,7 @@ int dom_document_encoding_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ standalone boolean
|
||||
/* {{{ proto standalone boolean
|
||||
readonly=no
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-standalone
|
||||
Since: DOM Level 3
|
||||
@@ -334,7 +334,7 @@ int dom_document_standalone_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ version string
|
||||
/* {{{ proto version string
|
||||
readonly=no
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-version
|
||||
Since: DOM Level 3
|
||||
@@ -399,7 +399,7 @@ int dom_document_version_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ strictErrorChecking boolean
|
||||
/* {{{ proto strictErrorChecking boolean
|
||||
readonly=no
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-strictErrorChecking
|
||||
Since: DOM Level 3
|
||||
@@ -444,7 +444,7 @@ int dom_document_strict_error_checking_write(dom_object *obj, zval *newval TSRML
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ formatOutput boolean
|
||||
/* {{{ proto formatOutput boolean
|
||||
readonly=no
|
||||
*/
|
||||
int dom_document_format_output_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
@@ -486,7 +486,7 @@ int dom_document_format_output_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ validateOnParse boolean
|
||||
/* {{{ proto validateOnParse boolean
|
||||
readonly=no
|
||||
*/
|
||||
int dom_document_validate_on_parse_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
@@ -529,7 +529,7 @@ int dom_document_validate_on_parse_write(dom_object *obj, zval *newval TSRMLS_DC
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ resolveExternals boolean
|
||||
/* {{{ proto resolveExternals boolean
|
||||
readonly=no
|
||||
*/
|
||||
int dom_document_resolve_externals_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
@@ -572,7 +572,7 @@ int dom_document_resolve_externals_write(dom_object *obj, zval *newval TSRMLS_DC
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ preserveWhiteSpace boolean
|
||||
/* {{{ proto preserveWhiteSpace boolean
|
||||
readonly=no
|
||||
*/
|
||||
int dom_document_preserve_whitespace_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
@@ -615,7 +615,7 @@ int dom_document_preserve_whitespace_write(dom_object *obj, zval *newval TSRMLS_
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ substituteEntities boolean
|
||||
/* {{{ proto substituteEntities boolean
|
||||
readonly=no
|
||||
*/
|
||||
int dom_document_substitue_entities_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
@@ -658,7 +658,7 @@ int dom_document_substitue_entities_write(dom_object *obj, zval *newval TSRMLS_D
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ documentURI string
|
||||
/* {{{ proto documentURI string
|
||||
readonly=no
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-documentURI
|
||||
Since: DOM Level 3
|
||||
@@ -724,7 +724,7 @@ int dom_document_document_uri_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ config DOMConfiguration
|
||||
/* {{{ proto config DOMConfiguration
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-config
|
||||
Since: DOM Level 3
|
||||
@@ -1544,7 +1544,7 @@ static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) {
|
||||
}
|
||||
/* }}} end dom_parser_document */
|
||||
|
||||
/* {{{ proto DOMNode dom_document_load(string source);
|
||||
/* {{{ proto boolean|DOMNode dom_document_load(string source);
|
||||
URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-load
|
||||
Since: DOM Level 3
|
||||
*/
|
||||
@@ -1554,7 +1554,7 @@ PHP_METHOD(domdocument, load)
|
||||
}
|
||||
/* }}} end dom_document_load */
|
||||
|
||||
/* {{{ proto DOMNode dom_document_loadxml(string source);
|
||||
/* {{{ proto boolean|DOMNode dom_document_loadxml(string source);
|
||||
URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-loadXML
|
||||
Since: DOM Level 3
|
||||
*/
|
||||
@@ -1564,7 +1564,7 @@ PHP_METHOD(domdocument, loadXML)
|
||||
}
|
||||
/* }}} end dom_document_loadxml */
|
||||
|
||||
/* {{{ proto int dom_document_save(string file);
|
||||
/* {{{ proto long dom_document_save(string file);
|
||||
Convenience method to save to file
|
||||
*/
|
||||
PHP_FUNCTION(dom_document_save)
|
||||
@@ -2022,7 +2022,7 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode)
|
||||
}
|
||||
}
|
||||
|
||||
/* {{{ proto DOMNode dom_document_load_html_file(string source);
|
||||
/* {{{ proto boolean|DOMNode dom_document_load_html_file(string source);
|
||||
Since: DOM extended
|
||||
*/
|
||||
PHP_METHOD(domdocument, loadHTMLFile)
|
||||
@@ -2031,7 +2031,7 @@ PHP_METHOD(domdocument, loadHTMLFile)
|
||||
}
|
||||
/* }}} end dom_document_load_html_file */
|
||||
|
||||
/* {{{ proto DOMNode dom_document_load_html(string source);
|
||||
/* {{{ proto boolean|DOMNode dom_document_load_html(string source);
|
||||
Since: DOM extended
|
||||
*/
|
||||
PHP_METHOD(domdocument, loadHTML)
|
||||
@@ -2040,7 +2040,7 @@ PHP_METHOD(domdocument, loadHTML)
|
||||
}
|
||||
/* }}} end dom_document_load_html */
|
||||
|
||||
/* {{{ proto int dom_document_save_html_file(string file);
|
||||
/* {{{ proto long dom_document_save_html_file(string file);
|
||||
Convenience method to save to file as html
|
||||
*/
|
||||
PHP_FUNCTION(dom_document_save_html_file)
|
||||
|
||||
@@ -38,7 +38,7 @@ zend_function_entry php_dom_documenttype_class_functions[] = {
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/* {{{ name string
|
||||
/* {{{ proto name string
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1844763134
|
||||
Since:
|
||||
@@ -64,7 +64,7 @@ int dom_documenttype_name_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ entities DOMNamedNodeMap
|
||||
/* {{{ proto entities DOMNamedNodeMap
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1788794630
|
||||
Since:
|
||||
@@ -97,7 +97,7 @@ int dom_documenttype_entities_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ notations DOMNamedNodeMap
|
||||
/* {{{ proto notations DOMNamedNodeMap
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D46829EF
|
||||
Since:
|
||||
@@ -130,7 +130,7 @@ int dom_documenttype_notations_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ publicId string
|
||||
/* {{{ proto publicId string
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-Core-DocType-publicId
|
||||
Since: DOM Level 2
|
||||
@@ -160,7 +160,7 @@ int dom_documenttype_public_id_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ systemId string
|
||||
/* {{{ proto systemId string
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-Core-DocType-systemId
|
||||
Since: DOM Level 2
|
||||
@@ -189,7 +189,7 @@ int dom_documenttype_system_id_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ internalSubset string
|
||||
/* {{{ proto internalSubset string
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-Core-DocType-internalSubset
|
||||
Since: DOM Level 2
|
||||
|
||||
+6
-6
@@ -41,7 +41,7 @@ zend_function_entry php_dom_domerror_class_functions[] = {
|
||||
|
||||
/* {{{ attribute protos, not implemented yet */
|
||||
|
||||
/* {{{ severity unsigned short
|
||||
/* {{{ proto severity unsigned short
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ERROR-DOMError-severity
|
||||
Since:
|
||||
@@ -57,7 +57,7 @@ int dom_domerror_severity_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ message string
|
||||
/* {{{ proto message string
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ERROR-DOMError-message
|
||||
Since:
|
||||
@@ -73,7 +73,7 @@ int dom_domerror_message_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ type string
|
||||
/* {{{ proto type string
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ERROR-DOMError-type
|
||||
Since:
|
||||
@@ -89,7 +89,7 @@ int dom_domerror_type_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ relatedException object
|
||||
/* {{{ proto relatedException object
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ERROR-DOMError-relatedException
|
||||
Since:
|
||||
@@ -105,7 +105,7 @@ int dom_domerror_related_exception_read(dom_object *obj, zval **retval TSRMLS_DC
|
||||
|
||||
|
||||
|
||||
/* {{{ relatedData domobject
|
||||
/* {{{ proto relatedData domobject
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ERROR-DOMError-relatedData
|
||||
Since:
|
||||
@@ -121,7 +121,7 @@ int dom_domerror_related_data_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ location domlocator
|
||||
/* {{{ proto location domlocator
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ERROR-DOMError-location
|
||||
Since:
|
||||
|
||||
@@ -42,7 +42,7 @@ zend_function_entry php_dom_domimplementationlist_class_functions[] = {
|
||||
|
||||
/* {{{ attribute protos, not implemented yet */
|
||||
|
||||
/* {{{ length unsigned long
|
||||
/* {{{ proto length unsigned long
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementationList-length
|
||||
Since:
|
||||
@@ -59,7 +59,7 @@ int dom_domimplementationlist_length_read(dom_object *obj, zval **retval TSRMLS_
|
||||
|
||||
|
||||
|
||||
/* {{{ proto domdomimplementation dom_domimplementationlist_item(int index);
|
||||
/* {{{ proto domdomimplementation dom_domimplementationlist_item(unsigned long index);
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementationList-item
|
||||
Since:
|
||||
*/
|
||||
|
||||
@@ -41,7 +41,7 @@ zend_function_entry php_dom_domlocator_class_functions[] = {
|
||||
|
||||
/* {{{ attribute protos, not implemented yet */
|
||||
|
||||
/* {{{ line_number long
|
||||
/* {{{ proto line_number long
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMLocator-line-number
|
||||
Since:
|
||||
@@ -57,7 +57,7 @@ int dom_domlocator_line_number_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ column_number long
|
||||
/* {{{ proto column_number long
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMLocator-column-number
|
||||
Since:
|
||||
@@ -73,7 +73,7 @@ int dom_domlocator_column_number_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ offset long
|
||||
/* {{{ proto offset long
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMLocator-offset
|
||||
Since:
|
||||
@@ -89,7 +89,7 @@ int dom_domlocator_offset_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ related_node node
|
||||
/* {{{ proto related_node node
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMLocator-node
|
||||
Since:
|
||||
@@ -105,7 +105,7 @@ int dom_domlocator_related_node_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ uri string
|
||||
/* {{{ proto uri string
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMLocator-uri
|
||||
Since:
|
||||
|
||||
@@ -42,7 +42,7 @@ zend_function_entry php_dom_domstringlist_class_functions[] = {
|
||||
|
||||
/* {{{ attribute protos, not implemented yet */
|
||||
|
||||
/* {{{ length unsigned long
|
||||
/* {{{ proto length unsigned long
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMStringList-length
|
||||
Since:
|
||||
@@ -59,7 +59,7 @@ int dom_domstringlist_length_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ proto domstring dom_domstringlist_item(int index);
|
||||
/* {{{ proto domstring dom_domstringlist_item(unsigned long index);
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMStringList-item
|
||||
Since:
|
||||
*/
|
||||
|
||||
+2
-2
@@ -137,7 +137,7 @@ PHP_METHOD(domelement, __construct)
|
||||
}
|
||||
/* }}} end DOMElement::__construct */
|
||||
|
||||
/* {{{ tagName string
|
||||
/* {{{ proto tagName string
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-104682815
|
||||
Since:
|
||||
@@ -174,7 +174,7 @@ int dom_element_tag_name_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ schemaTypeInfo typeinfo
|
||||
/* {{{ proto schemaTypeInfo typeinfo
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Element-schemaTypeInfo
|
||||
Since: DOM Level 3
|
||||
|
||||
+6
-6
@@ -39,7 +39,7 @@ zend_function_entry php_dom_entity_class_functions[] = {
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/* {{{ publicId string
|
||||
/* {{{ proto publicId string
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-D7303025
|
||||
Since:
|
||||
@@ -69,7 +69,7 @@ int dom_entity_public_id_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ systemId string
|
||||
/* {{{ proto systemId string
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-D7C29F3E
|
||||
Since:
|
||||
@@ -99,7 +99,7 @@ int dom_entity_system_id_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ notationName string
|
||||
/* {{{ proto notationName string
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-6ABAEB38
|
||||
Since:
|
||||
@@ -132,7 +132,7 @@ int dom_entity_notation_name_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ actualEncoding string
|
||||
/* {{{ proto actualEncoding string
|
||||
readonly=no
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Entity3-actualEncoding
|
||||
Since: DOM Level 3
|
||||
@@ -153,7 +153,7 @@ int dom_entity_actual_encoding_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ encoding string
|
||||
/* {{{ proto encoding string
|
||||
readonly=no
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Entity3-encoding
|
||||
Since: DOM Level 3
|
||||
@@ -174,7 +174,7 @@ int dom_entity_encoding_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ version string
|
||||
/* {{{ proto version string
|
||||
readonly=no
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Entity3-version
|
||||
Since: DOM Level 3
|
||||
|
||||
@@ -46,7 +46,7 @@ zend_function_entry php_dom_namednodemap_class_functions[] = {
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/* {{{ length int
|
||||
/* {{{ proto length int
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-6D0FB19E
|
||||
Since:
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ zend_function_entry php_dom_namelist_class_functions[] = {
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/* {{{ length int
|
||||
/* {{{ proto length int
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#NameList-length
|
||||
Since:
|
||||
|
||||
+19
-64
@@ -72,7 +72,7 @@ static void dom_reconcile_ns(xmlDocPtr doc, xmlNodePtr nodep) {
|
||||
}
|
||||
}
|
||||
|
||||
/* {{{ nodeName string
|
||||
/* {{{ proto nodeName string
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-F68D095
|
||||
Since:
|
||||
@@ -164,7 +164,7 @@ int dom_node_node_name_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ nodeValue string
|
||||
/* {{{ proto nodeValue string
|
||||
readonly=no
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-F68D080
|
||||
Since:
|
||||
@@ -260,7 +260,7 @@ int dom_node_node_value_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ nodeType int
|
||||
/* {{{ proto nodeType int
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-111237558
|
||||
Since:
|
||||
@@ -292,7 +292,7 @@ int dom_node_node_type_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ parentNode DomNode
|
||||
/* {{{ proto parentNode DomNode
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1060184317
|
||||
Since:
|
||||
@@ -327,7 +327,7 @@ int dom_node_parent_node_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ childNodes DomNodeList
|
||||
/* {{{ proto childNodes DomNodeList
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1451460987
|
||||
Since:
|
||||
@@ -361,7 +361,7 @@ int dom_node_child_nodes_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ firstChild DomNode
|
||||
/* {{{ proto firstChild DomNode
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-169727388
|
||||
Since:
|
||||
@@ -399,7 +399,7 @@ int dom_node_first_child_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ lastChild DomNode
|
||||
/* {{{ proto lastChild DomNode
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-61AD09FB
|
||||
Since:
|
||||
@@ -437,7 +437,7 @@ int dom_node_last_child_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ previousSibling DomNode
|
||||
/* {{{ proto previousSibling DomNode
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-640FB3C8
|
||||
Since:
|
||||
@@ -472,7 +472,7 @@ int dom_node_previous_sibling_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ nextSibling DomNode
|
||||
/* {{{ proto nextSibling DomNode
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-6AC54C2F
|
||||
Since:
|
||||
@@ -507,7 +507,7 @@ int dom_node_next_sibling_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ attributes DomNamedNodeMap
|
||||
/* {{{ proto attributes DomNamedNodeMap
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-84CF096
|
||||
Since:
|
||||
@@ -541,7 +541,7 @@ int dom_node_attributes_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ ownerDocument DomDocument
|
||||
/* {{{ proto ownerDocument DomDocument
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-node-ownerDoc
|
||||
Since:
|
||||
@@ -583,7 +583,7 @@ int dom_node_owner_document_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ namespaceUri string
|
||||
/* {{{ proto namespaceUri string
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-NodeNSname
|
||||
Since: DOM Level 2
|
||||
@@ -628,7 +628,7 @@ int dom_node_namespace_uri_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ prefix string
|
||||
/* {{{ proto prefix string
|
||||
readonly=no
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-NodeNSPrefix
|
||||
Since: DOM Level 2
|
||||
@@ -752,7 +752,7 @@ int dom_node_prefix_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ localName string
|
||||
/* {{{ proto localName string
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-NodeNSLocalN
|
||||
Since: DOM Level 2
|
||||
@@ -783,7 +783,7 @@ int dom_node_local_name_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ baseURI string
|
||||
/* {{{ proto baseURI string
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-baseURI
|
||||
Since: DOM Level 3
|
||||
@@ -817,7 +817,7 @@ int dom_node_base_uri_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
|
||||
|
||||
/* {{{ textContent string
|
||||
/* {{{ proto textContent string
|
||||
readonly=no
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-textContent
|
||||
Since: DOM Level 3
|
||||
@@ -1129,55 +1129,9 @@ PHP_FUNCTION(dom_node_replace_child)
|
||||
}
|
||||
|
||||
if (foundoldchild) {
|
||||
xmlNodePtr node;
|
||||
zval *rv = NULL;
|
||||
|
||||
if (newchild->type == XML_DOCUMENT_FRAG_NODE) {
|
||||
xmlNodePtr fragment, prevsib, nextsib;
|
||||
fragment = newchild;
|
||||
prevsib = oldchild->prev;
|
||||
nextsib = oldchild->next;
|
||||
|
||||
newchild = fragment->children;
|
||||
|
||||
xmlUnlinkNode(oldchild);
|
||||
|
||||
if (prevsib == NULL && nextsib == NULL) {
|
||||
nodep->children = newchild;
|
||||
nodep->last = fragment->last;
|
||||
} else {
|
||||
if (newchild) {
|
||||
prevsib->next = newchild;
|
||||
newchild->prev = prevsib;
|
||||
|
||||
fragment->last->next = nextsib;
|
||||
if (nextsib) {
|
||||
nextsib->prev = fragment->last;
|
||||
} else {
|
||||
nodep->last = fragment->last;
|
||||
}
|
||||
}
|
||||
}
|
||||
node = newchild;
|
||||
while (node != NULL) {
|
||||
node->parent = nodep;
|
||||
if (node->doc != nodep->doc) {
|
||||
xmlSetTreeDoc(node, nodep->doc);
|
||||
if (node->_private != NULL) {
|
||||
newchildobj = node->_private;
|
||||
newchildobj->document = intern->document;
|
||||
php_libxml_increment_doc_ref((php_libxml_node_object *)newchildobj, NULL TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
if (node == fragment->last) {
|
||||
break;
|
||||
}
|
||||
node = node->next;
|
||||
}
|
||||
|
||||
fragment->children = NULL;
|
||||
fragment->last = NULL;
|
||||
} else if (oldchild != newchild) {
|
||||
if (oldchild != newchild) {
|
||||
xmlNodePtr node;
|
||||
if (newchild->doc == NULL && nodep->doc != NULL) {
|
||||
xmlSetTreeDoc(newchild, nodep->doc);
|
||||
newchildobj->document = intern->document;
|
||||
@@ -1192,6 +1146,7 @@ PHP_FUNCTION(dom_node_replace_child)
|
||||
php_dom_throw_error(NOT_FOUND_ERR, dom_get_strict_error(intern->document) TSRMLS_CC);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
/* }}} end dom_node_replace_child */
|
||||
|
||||
|
||||
Loaded 100 of 652 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user