mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Trim trailing whitespace in source code files
This commit is contained in:
@@ -14,7 +14,7 @@ cache:
|
||||
- c:\build-cache
|
||||
|
||||
environment:
|
||||
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
|
||||
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
|
||||
PHP_BUILD_OBJ_DIR: c:\obj
|
||||
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.1.9beta1
|
||||
|
||||
20
.gdbinit
20
.gdbinit
@@ -5,7 +5,7 @@ end
|
||||
document set_ts
|
||||
set the ts resource, it is impossible for gdb to
|
||||
call ts_resource_ex while no process is running,
|
||||
but we could get the resource from the argument
|
||||
but we could get the resource from the argument
|
||||
of frame info.
|
||||
end
|
||||
|
||||
@@ -153,7 +153,7 @@ end
|
||||
|
||||
define printzv
|
||||
set $ind = 1
|
||||
____printzv $arg0 0
|
||||
____printzv $arg0 0
|
||||
end
|
||||
|
||||
document printzv
|
||||
@@ -190,7 +190,7 @@ define ____printzv_contents
|
||||
if $type == 6
|
||||
printf "string: %s", $zvalue->value.str->val
|
||||
end
|
||||
if $type == 7
|
||||
if $type == 7
|
||||
printf "array: "
|
||||
if ! $arg1
|
||||
set $ind = $ind + 1
|
||||
@@ -287,7 +287,7 @@ define ____printzv
|
||||
if $arg1
|
||||
____printzv_contents $zcontents $arg1
|
||||
else
|
||||
____printzv_contents $zcontents 0
|
||||
____printzv_contents $zcontents 0
|
||||
end
|
||||
end
|
||||
|
||||
@@ -340,7 +340,7 @@ define ____print_ht
|
||||
set $n = $n - 1
|
||||
end
|
||||
printf "[%d] ", $i
|
||||
if $p->key
|
||||
if $p->key
|
||||
printf "%s => ", $p->key->val
|
||||
else
|
||||
printf "%d => ", $p->h
|
||||
@@ -389,7 +389,7 @@ document print_htptr
|
||||
end
|
||||
|
||||
define print_htstr
|
||||
set $ind = 0
|
||||
set $ind = 0
|
||||
____print_ht $arg0 2
|
||||
end
|
||||
|
||||
@@ -543,10 +543,10 @@ define printzn
|
||||
if $znode->op_type == 1
|
||||
set $optype = "IS_CONST"
|
||||
end
|
||||
if $znode->op_type == 2
|
||||
if $znode->op_type == 2
|
||||
set $optype = "IS_TMP_VAR"
|
||||
end
|
||||
if $znode->op_type == 4
|
||||
if $znode->op_type == 4
|
||||
set $optype = "IS_VAR"
|
||||
end
|
||||
if $znode->op_type == 8
|
||||
@@ -576,11 +576,11 @@ end
|
||||
|
||||
document printzn
|
||||
print type and content of znode.
|
||||
usage: printzn &opline->op1
|
||||
usage: printzn &opline->op1
|
||||
end
|
||||
|
||||
define printzops
|
||||
printf "op1 => "
|
||||
printf "op1 => "
|
||||
printzn &execute_data->opline.op1
|
||||
printf "op2 => "
|
||||
printzn &execute_data->opline.op2
|
||||
|
||||
@@ -19,7 +19,7 @@ addons:
|
||||
- libt1-dev
|
||||
|
||||
notifications:
|
||||
email:
|
||||
email:
|
||||
on_failure: change
|
||||
irc:
|
||||
template:
|
||||
@@ -61,7 +61,7 @@ before_script:
|
||||
- . ./travis/ext/pgsql/setup.sh
|
||||
- . ./travis/ext/pdo_pgsql/setup.sh
|
||||
|
||||
# Run PHPs run-tests.php
|
||||
# Run PHPs run-tests.php
|
||||
script:
|
||||
- ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 --set-timeout 120
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ User Functions/Methods Naming Conventions
|
||||
of ``parent_*``::
|
||||
|
||||
A family of 'foo' functions, for example:
|
||||
|
||||
|
||||
Good:
|
||||
'foo_select_bar'
|
||||
'foo_insert_baz'
|
||||
|
||||
26
LICENSE
26
LICENSE
@@ -1,7 +1,7 @@
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
The PHP License, version 3.01
|
||||
Copyright (c) 1999 - 2018 The PHP Group. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, is permitted provided that the following conditions
|
||||
@@ -9,22 +9,22 @@ are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
|
||||
3. The name "PHP" must not be used to endorse or promote products
|
||||
derived from this software without prior written permission. For
|
||||
written permission, please contact group@php.net.
|
||||
|
||||
|
||||
4. Products derived from this software may not be called "PHP", nor
|
||||
may "PHP" appear in their name, without prior written permission
|
||||
from group@php.net. You may indicate that your software works in
|
||||
conjunction with PHP by saying "Foo for PHP" instead of calling
|
||||
it "PHP Foo" or "phpfoo"
|
||||
|
||||
|
||||
5. The PHP Group may publish revised and/or new versions of the
|
||||
license from time to time. Each version will be given a
|
||||
distinguishing version number.
|
||||
@@ -41,27 +41,27 @@ are met:
|
||||
"This product includes PHP software, freely available from
|
||||
<http://www.php.net/software/>".
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
|
||||
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
|
||||
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
|
||||
DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals on behalf of the PHP Group.
|
||||
|
||||
The PHP Group can be contacted via Email at group@php.net.
|
||||
|
||||
For more information on the PHP Group and the PHP project,
|
||||
For more information on the PHP Group and the PHP project,
|
||||
please see <http://www.php.net>.
|
||||
|
||||
PHP includes the Zend Engine, freely available at
|
||||
|
||||
@@ -62,7 +62,7 @@ php_lcov.info: lcov-test
|
||||
rm -rf lcov_data/$$dir ; \
|
||||
fi; \
|
||||
done
|
||||
@echo
|
||||
@echo
|
||||
@echo "Generating $@"
|
||||
@$(LTP) --directory lcov_data/ --capture --base-directory=lcov_data --output-file $@
|
||||
|
||||
|
||||
62
NEWS
62
NEWS
@@ -71,7 +71,7 @@ PHP NEWS
|
||||
- Standard:
|
||||
. Fixed bug #73457 (Wrong error message when fopen FTP wrapped fails to open
|
||||
data connection). (Ville Hukkamäki)
|
||||
. Fixed bug #74764 (Bindto IPv6 works with file_get_contents but fails with
|
||||
. Fixed bug #74764 (Bindto IPv6 works with file_get_contents but fails with
|
||||
stream_socket_client). (Ville Hukkamäki)
|
||||
. Fixed bug #75533 (array_reduce is slow when $carry is large array).
|
||||
(Manabu Matsui)
|
||||
@@ -102,7 +102,7 @@ PHP NEWS
|
||||
. Fixed bug #76517 (incorrect restoring of LDFLAGS). (sji)
|
||||
|
||||
- iconv:
|
||||
. Fixed bug #68180 (iconv_mime_decode can return extra characters in a
|
||||
. Fixed bug #68180 (iconv_mime_decode can return extra characters in a
|
||||
header). (cmb)
|
||||
. Fixed bug #63839 (iconv_mime_decode_headers function is skipping headers).
|
||||
(cmb)
|
||||
@@ -346,7 +346,7 @@ PHP NEWS
|
||||
. Fixed bug #76143 (Memory corruption: arbitrary NUL overwrite). (Laruence)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #76131 (mismatch arginfo for splarray constructor).
|
||||
. Fixed bug #76131 (mismatch arginfo for splarray constructor).
|
||||
(carusogabriel)
|
||||
|
||||
- standard:
|
||||
@@ -428,7 +428,7 @@ PHP NEWS
|
||||
- Phar:
|
||||
. Fixed bug #54289 (Phar::extractTo() does not accept specific directories to
|
||||
be extracted). (bishop)
|
||||
. Fixed bug #65414 (deal with leading slash while adding files correctly).
|
||||
. Fixed bug #65414 (deal with leading slash while adding files correctly).
|
||||
(bishopb)
|
||||
. Fixed bug #65414 (deal with leading slash when adding files correctly).
|
||||
(bishopb)
|
||||
@@ -504,7 +504,7 @@ PHP NEWS
|
||||
. Fixed bug #75502 (Segmentation fault in zend_string_release). (Nikita)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #75717 (RecursiveArrayIterator does not traverse arrays by
|
||||
. Fixed bug #75717 (RecursiveArrayIterator does not traverse arrays by
|
||||
reference). (Nikita)
|
||||
. Fixed bug #75242 (RecursiveArrayIterator doesn't have constants from parent
|
||||
class). (Nikita)
|
||||
@@ -568,7 +568,7 @@ PHP NEWS
|
||||
(Remi)
|
||||
. Fixed bug #75535 (Inappropriately parsing HTTP response leads to PHP
|
||||
segment fault). (Nikita)
|
||||
. Fixed bug #75409 (accept EFAULT in addition to ENOSYS as indicator
|
||||
. Fixed bug #75409 (accept EFAULT in addition to ENOSYS as indicator
|
||||
that getrandom() is missing). (sarciszewski)
|
||||
. Fixed bug #73124 (php_ini_scanned_files() not reporting correctly).
|
||||
(John Stevenson)
|
||||
@@ -623,7 +623,7 @@ PHP NEWS
|
||||
(Anatol)
|
||||
. Implemented minor optimization in array_keys/array_values(). (Sara)
|
||||
. Added PHP_OS_FAMILY constant to determine on which OS we are. (Jan Altensen)
|
||||
. Fixed bug #73987 (Method compatibility check looks to original
|
||||
. Fixed bug #73987 (Method compatibility check looks to original
|
||||
definition and not parent). (pmmaga)
|
||||
. Fixed bug #73991 (JSON_OBJECT_AS_ARRAY not respected). (Sara)
|
||||
. Fixed bug #74053 (Corrupted class entries on shutdown when a destructor
|
||||
@@ -653,7 +653,7 @@ PHP NEWS
|
||||
. Added new VM instuctions ISSET_ISEMPTY_CV and UNSET_CV. Previously they
|
||||
were implemented as ISSET_ISEMPTY_VAR and UNSET_VAR variants with
|
||||
ZEND_QUICK_SET flag. (Nikita, Dmitry)
|
||||
. Fixed bug #49649 (unserialize() doesn't handle changes in property
|
||||
. Fixed bug #49649 (unserialize() doesn't handle changes in property
|
||||
visibility). (pmmaga)
|
||||
. Fixed #74866 (extension_dir = "./ext" now use current directory for base).
|
||||
(Francois Laupretre)
|
||||
@@ -686,7 +686,7 @@ PHP NEWS
|
||||
|
||||
- EXIF:
|
||||
. Added support for vendor specific tags for the following formats:
|
||||
Samsung, DJI, Panasonic, Sony, Pentax, Minolta, Sigma/Foveon, AGFA,
|
||||
Samsung, DJI, Panasonic, Sony, Pentax, Minolta, Sigma/Foveon, AGFA,
|
||||
Kyocera, Ricoh & Epson. (Kalle)
|
||||
. Fixed bug #72682 (exif_read_data() fails to read all data for some
|
||||
images). (Kalle)
|
||||
@@ -698,15 +698,15 @@ PHP NEWS
|
||||
reached for some cameras). (Kalle)
|
||||
. Fixed Redhat bug #1362571 (PHP not returning full results for
|
||||
exif_read_data function). (Kalle)
|
||||
. Implemented #65187 (exif_read_data/thumbnail: add support for stream
|
||||
. Implemented #65187 (exif_read_data/thumbnail: add support for stream
|
||||
resource). (Kalle)
|
||||
. Deprecated the read_exif_data() alias. (Kalle)
|
||||
. Fixed bug #74428 (exif_read_data(): "Illegal IFD size" warning occurs with
|
||||
. Fixed bug #74428 (exif_read_data(): "Illegal IFD size" warning occurs with
|
||||
correct exif format). (bradpiccho at gmail dot com, Kalle)
|
||||
. Fixed bug #72819 (EXIF thumbnails not read anymore). (Kalle)
|
||||
. Fixed bug #62523 (php crashes with segfault when exif_read_data called).
|
||||
. Fixed bug #62523 (php crashes with segfault when exif_read_data called).
|
||||
(Kalle)
|
||||
. Fixed bug #50660 (exif_read_data(): Illegal IFD offset (works fine with
|
||||
. Fixed bug #50660 (exif_read_data(): Illegal IFD offset (works fine with
|
||||
other exif readers). (skinny dot bravo at gmail dot com, Kalle)
|
||||
|
||||
- Fileinfo:
|
||||
@@ -736,7 +736,7 @@ PHP NEWS
|
||||
. Fixed Bug #75284 (sha3 is not supported on bigendian machine). (Remi)
|
||||
|
||||
- IMAP:
|
||||
. Fixed bug #72324 (imap_mailboxmsginfo() return wrong size).
|
||||
. Fixed bug #72324 (imap_mailboxmsginfo() return wrong size).
|
||||
(ronaldpoon at udomain dot com dot hk, Kalle)
|
||||
|
||||
- Intl:
|
||||
@@ -841,7 +841,7 @@ PHP NEWS
|
||||
read-only/getter mode). (Yasuo)
|
||||
. Fixed bug #74936 (session_cache_expire/cache_limiter/save_path() trigger a
|
||||
warning in read mode). (morozov)
|
||||
. Fixed bug #74941 (session fails to start after having headers sent).
|
||||
. Fixed bug #74941 (session fails to start after having headers sent).
|
||||
(morozov)
|
||||
|
||||
- Sodium:
|
||||
@@ -924,7 +924,7 @@ PHP NEWS
|
||||
. Fixed bug #75437 (Wrong reflection on imagewebp). (Fabien Villepinte)
|
||||
|
||||
- intl:
|
||||
. Fixed bug #75317 (UConverter::setDestinationEncoding changes source instead
|
||||
. Fixed bug #75317 (UConverter::setDestinationEncoding changes source instead
|
||||
of destination). (andrewnester)
|
||||
|
||||
- interbase:
|
||||
@@ -962,7 +962,7 @@ PHP NEWS
|
||||
. Fixed bug #75236 (infinite loop when printing an error-message). (Andrea)
|
||||
. Fixed bug #75252 (Incorrect token formatting on two parse errors in one
|
||||
request). (Nikita)
|
||||
. Fixed bug #75220 (Segfault when calling is_callable on parent).
|
||||
. Fixed bug #75220 (Segfault when calling is_callable on parent).
|
||||
(andrewnester)
|
||||
. Fixed bug #75290 (debug info of Closures of internal functions contain
|
||||
garbage argument names). (Andrea)
|
||||
@@ -982,7 +982,7 @@ PHP NEWS
|
||||
optional). (cmb)
|
||||
|
||||
- litespeed:
|
||||
. Fixed bug #75248 (Binary directory doesn't get created when building
|
||||
. Fixed bug #75248 (Binary directory doesn't get created when building
|
||||
only litespeed SAPI). (petk)
|
||||
. Fixed bug #75251 (Missing program prefix and suffix). (petk)
|
||||
|
||||
@@ -1109,7 +1109,7 @@ PHP NEWS
|
||||
. Fixed bug #75049 (spl_autoload_unregister can't handle
|
||||
spl_autoload_functions results). (Laruence)
|
||||
. Fixed bug #74669 (Unserialize ArrayIterator broken). (Andrew Nester)
|
||||
. Fixed bug #74977 (Appending AppendIterator leads to segfault).
|
||||
. Fixed bug #74977 (Appending AppendIterator leads to segfault).
|
||||
(Andrew Nester)
|
||||
. Fixed bug #75015 (Crash in recursive iterator destructors). (Julien)
|
||||
|
||||
@@ -1130,9 +1130,9 @@ PHP NEWS
|
||||
03 Aug 2017, PHP 7.1.8
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74832 (Loading PHP extension with already registered function
|
||||
. Fixed bug #74832 (Loading PHP extension with already registered function
|
||||
name leads to a crash). (jpauli)
|
||||
. Fixed bug #74780 (parse_url() broken when query string contains colon).
|
||||
. Fixed bug #74780 (parse_url() broken when query string contains colon).
|
||||
(jhdxr)
|
||||
. Fixed bug #74761 (Unary operator expected error on some systems). (petk)
|
||||
. Fixed bug #73900 (Use After Free in unserialize() SplFixedArray). (nikic)
|
||||
@@ -1141,7 +1141,7 @@ PHP NEWS
|
||||
. Fixed bug #74906 (fixed incorrect errno.h include). (petk)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #74852 (property_exists returns true on unknown DateInterval
|
||||
. Fixed bug #74852 (property_exists returns true on unknown DateInterval
|
||||
property). (jhdxr)
|
||||
|
||||
- OCI8:
|
||||
@@ -1352,7 +1352,7 @@ PHP NEWS
|
||||
(Jakub Zelenka)
|
||||
|
||||
- phar:
|
||||
. Fixed bug #74383 (phar method parameters reflection correction).
|
||||
. Fixed bug #74383 (phar method parameters reflection correction).
|
||||
(mhagstrand)
|
||||
|
||||
- Readline:
|
||||
@@ -1524,7 +1524,7 @@ PHP NEWS
|
||||
. Fixed bug #72898 (PHP_FCGI_CHILDREN is not included in phpinfo()). (Anatol)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #69865 (php-fpm does not close stderr when using syslog).
|
||||
. Fixed bug #69865 (php-fpm does not close stderr when using syslog).
|
||||
(m6w6)
|
||||
|
||||
- GD:
|
||||
@@ -1532,7 +1532,7 @@ PHP NEWS
|
||||
|
||||
- GMP:
|
||||
. Fixed bug #69993 (test for gmp.h needs to test machine includes).
|
||||
(Jordan Gigov)
|
||||
(Jordan Gigov)
|
||||
|
||||
- Hash:
|
||||
. Added hash_hkdf() function. (Andrey Andreev)
|
||||
@@ -1566,7 +1566,7 @@ PHP NEWS
|
||||
. Implemented FR #72583 (All data are fetched as strings). (Dorin Marcoci)
|
||||
|
||||
- PDO_PgSQL:
|
||||
. Fixed bug #73959 (lastInsertId fails to throw an exception for wrong
|
||||
. Fixed bug #73959 (lastInsertId fails to throw an exception for wrong
|
||||
sequence name). (andrewnester)
|
||||
|
||||
- Phar:
|
||||
@@ -1630,7 +1630,7 @@ PHP NEWS
|
||||
- Mysqlnd:
|
||||
. Optimized handling of BIT fields - less memory copies and lower memory
|
||||
usage. (Andrey)
|
||||
. Fixed bug #73800 (sporadic segfault with MYSQLI_OPT_INT_AND_FLOAT_NATIVE).
|
||||
. Fixed bug #73800 (sporadic segfault with MYSQLI_OPT_INT_AND_FLOAT_NATIVE).
|
||||
(vanviegen)
|
||||
|
||||
- Opcache:
|
||||
@@ -2136,7 +2136,7 @@ PHP NEWS
|
||||
- PCRE:
|
||||
. Fixed bug #73483 (Segmentation fault on pcre_replace_callback). (Laruence)
|
||||
. Fixed bug #73612 (preg_*() may leak memory). (cmb)
|
||||
. Fixed bug #73392 (A use-after-free in zend allocator management).
|
||||
. Fixed bug #73392 (A use-after-free in zend allocator management).
|
||||
(Laruence)
|
||||
. Fixed bug #73121 (Bundled PCRE doesn't compile because JIT isn't supported
|
||||
on s390). (Anatol)
|
||||
@@ -2232,7 +2232,7 @@ PHP NEWS
|
||||
. Implemented RFC: Session ID without hashing. (Yasuo)
|
||||
https://wiki.php.net/rfc/session-id-without-hashing
|
||||
. Fixed bug #72531 (ps_files_cleanup_dir Buffer overflow). (Laruence)
|
||||
. Custom session handlers that do not return strings for session IDs will
|
||||
. Custom session handlers that do not return strings for session IDs will
|
||||
now throw an instance of Error instead of resulting in a fatal error
|
||||
when a function is called that must generate a session ID.
|
||||
(Aaron Piotrowski)
|
||||
@@ -2268,7 +2268,7 @@ PHP NEWS
|
||||
unserialize()). (Stas)
|
||||
|
||||
- Soap:
|
||||
. Fixed bug #73538 (SoapClient::__setSoapHeaders doesn't overwrite SOAP
|
||||
. Fixed bug #73538 (SoapClient::__setSoapHeaders doesn't overwrite SOAP
|
||||
headers). (duncan3dc)
|
||||
. Fixed bug #73452 (Segfault (Regression for #69152)). (Dmitry)
|
||||
. Fixed bug #73037 (SoapServer reports Bad Request when gzipped). (Anatol)
|
||||
@@ -2276,7 +2276,7 @@ PHP NEWS
|
||||
(Keith Smiley)
|
||||
. Fixed bug #69137 (Peer verification fails when using a proxy with SoapClient)
|
||||
(Keith Smiley)
|
||||
. Fixed bug #71711 (Soap Server Member variables reference bug). (Nikita)
|
||||
. Fixed bug #71711 (Soap Server Member variables reference bug). (Nikita)
|
||||
. Fixed bug #71996 (Using references in arrays doesn't work like expected).
|
||||
(Nikita)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
(NOTE: you may also want to take a look at the pear package
|
||||
PECL_Gen, a PHP-only alternative for this script that
|
||||
supports way more extension writing tasks and is
|
||||
supports way more extension writing tasks and is
|
||||
supposed to replace ext_skel completely in the long run ...)
|
||||
|
||||
WHAT IT IS
|
||||
@@ -17,16 +17,16 @@ HOW TO USE IT
|
||||
|
||||
./ext_skel --extname=module_name
|
||||
|
||||
and everything you need is placed in directory module_name.
|
||||
and everything you need is placed in directory module_name.
|
||||
|
||||
[ Note that GNU awk is likely required for this script to work. Debian
|
||||
systems seem to default to using mawk, so you may need to change the
|
||||
[ Note that GNU awk is likely required for this script to work. Debian
|
||||
systems seem to default to using mawk, so you may need to change the
|
||||
#! line in skeleton/create_stubs and the cat $proto | awk line in
|
||||
ext_skel to use gawk explicitly. ]
|
||||
|
||||
If you don't need to test the existence of any external header files,
|
||||
libraries or functions in them, the module is already almost ready to be
|
||||
compiled in PHP. Just remove 3 comments in your_module_name/config.m4,
|
||||
If you don't need to test the existence of any external header files,
|
||||
libraries or functions in them, the module is already almost ready to be
|
||||
compiled in PHP. Just remove 3 comments in your_module_name/config.m4,
|
||||
change back up to PHP sources top directory, and do
|
||||
|
||||
./buildconf; ./configure --enable-module_name; make
|
||||
@@ -83,7 +83,7 @@ FORMAT OF FUNCTION DEFINITIONS FILE
|
||||
']'s as there where '['s. Currently, it does not harm if you forget to do it
|
||||
or there is a wrong amount of ']'s, but this may change in the future.
|
||||
|
||||
An additional short description may be added after the parameters.
|
||||
An additional short description may be added after the parameters.
|
||||
If present it will be filled into the 'proto' header comments in the stubs
|
||||
code and the <refpurpose> tag in the XML documentation.
|
||||
|
||||
@@ -135,7 +135,7 @@ CURRENT LIMITATIONS, BUGS AND OTHER ODDITIES
|
||||
handled. For other types you must write the code yourself. And for type
|
||||
mixed, it wouldn't even be possible to write anything, because only you
|
||||
know what to expect.
|
||||
|
||||
|
||||
It can't handle correctly, and probably never will, variable list of
|
||||
of arguments. (void foo(int bar [, ...])
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ Having said that, here are the organizational rules::
|
||||
|
||||
Currently we have the following branches in use::
|
||||
|
||||
master The active development branch.
|
||||
master The active development branch.
|
||||
|
||||
PHP-7.1 Is used to release the PHP 7.1.x series. This is a prerelease
|
||||
version.
|
||||
@@ -110,7 +110,7 @@ The format of the commit messages is pretty simple.
|
||||
An Example from the git project (commit 2b34e486bc):
|
||||
|
||||
pack-objects: Fix compilation with NO_PTHREDS
|
||||
|
||||
|
||||
It looks like commit 99fb6e04 (pack-objects: convert to use
|
||||
parse_options(), 2012-02-01) moved the #ifdef NO_PTHREDS around but
|
||||
hasn't noticed that the 'arg' variable no longer is available.
|
||||
|
||||
@@ -3,7 +3,7 @@ $Id: README.NEW-OUTPUT-API 219039 2006-08-30 07:39:09Z mike $
|
||||
|
||||
API adjustment to the old output control code:
|
||||
|
||||
Everything now resides beneath the php_output namespace,
|
||||
Everything now resides beneath the php_output namespace,
|
||||
and there's an API call for every output handler op.
|
||||
|
||||
Checking output control layers status:
|
||||
@@ -134,7 +134,7 @@ Output handler hooks
|
||||
Open questions
|
||||
|
||||
Should the userland API be adjusted and unified?
|
||||
|
||||
|
||||
Many bits of the manual (and very first implementation) do not comply
|
||||
with the behaviour of the current (to be obsoleted) code, thus should
|
||||
the manual or the behaviour be adjusted?
|
||||
|
||||
@@ -42,11 +42,11 @@ See also https://wiki.php.net/rfc/zpp_improv#expose_zend_parse_arg_as_zend_parse
|
||||
|
||||
Type specifiers
|
||||
---------------
|
||||
The following list shows the type specifier, its meaning and the parameter
|
||||
The following list shows the type specifier, its meaning and the parameter
|
||||
types that need to be passed by address. All passed parameters are set
|
||||
if the PHP parameter is non optional and untouched if optional and the
|
||||
if the PHP parameter is non optional and untouched if optional and the
|
||||
parameter is not present. The only exception is O where the zend_class_entry*
|
||||
has to be provided on input and is used to verify the PHP parameter is an
|
||||
has to be provided on input and is used to verify the PHP parameter is an
|
||||
instance of that class.
|
||||
|
||||
a - array (zval*)
|
||||
@@ -54,7 +54,7 @@ Type specifiers
|
||||
b - boolean (zend_bool)
|
||||
C - class (zend_class_entry*)
|
||||
d - double (double)
|
||||
f - function or array containing php method call info (returned as
|
||||
f - function or array containing php method call info (returned as
|
||||
zend_fcall_info and zend_fcall_info_cache)
|
||||
h - array (returned as HashTable*)
|
||||
H - array or HASH_OF(object) (returned as HashTable*)
|
||||
@@ -88,9 +88,9 @@ Type specifiers
|
||||
|
||||
Note on 64bit compatibility
|
||||
---------------------------
|
||||
Please note that since version 7 PHP uses zend_long as integer type and
|
||||
zend_string with size_t as length, so make sure you pass zend_longs to "l"
|
||||
and size_t to strings length (i.e. for "s" you need to pass char * and size_t),
|
||||
Please note that since version 7 PHP uses zend_long as integer type and
|
||||
zend_string with size_t as length, so make sure you pass zend_longs to "l"
|
||||
and size_t to strings length (i.e. for "s" you need to pass char * and size_t),
|
||||
not the other way round!
|
||||
|
||||
Both mistakes might cause memory corruptions and segfaults:
|
||||
@@ -103,7 +103,7 @@ Both mistakes might cause memory corruptions and segfaults:
|
||||
int num; /* XXX THIS IS WRONG!! Use zend_long instead. */
|
||||
zend_parse_parameters(ZEND_NUM_ARGS(), "l", &num)
|
||||
|
||||
If you're in doubt, use check_parameters.php script to the parameters
|
||||
If you're in doubt, use check_parameters.php script to the parameters
|
||||
and their types (it can be found in ./scripts/dev/ directory of PHP sources):
|
||||
|
||||
# php ./scripts/dev/check_parameters.php /path/to/your/sources/
|
||||
@@ -152,7 +152,7 @@ if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/!",
|
||||
/* Get either a set of 3 longs or a string. */
|
||||
zend_long l1, l2, l3;
|
||||
char *s;
|
||||
/*
|
||||
/*
|
||||
* The function expects a pointer to a size_t in this case, not a long
|
||||
* or any other type. If you specify a type which is larger
|
||||
* than a 'size_t', the upper bits might not be initialized
|
||||
|
||||
@@ -46,7 +46,7 @@ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
|
||||
|
||||
6. ext/standard crypt's blowfish implementation
|
||||
|
||||
@@ -92,7 +92,7 @@ http://www.usenix.org/events/usenix99/provos.html
|
||||
Some of the tricks in BF_ROUND might be inspired by Eric Young's
|
||||
Blowfish library (I can't be sure if I would think of something if I
|
||||
hadn't seen his code).
|
||||
|
||||
|
||||
|
||||
7. Sqlite/Sqlite3 ext/sqlite3 ext/sqlite
|
||||
|
||||
@@ -126,7 +126,7 @@ Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3-30.
|
||||
|
||||
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
|
||||
Copyright (C) 2000 - 2003, Richard J. Wagner
|
||||
All rights reserved.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
@@ -139,8 +139,8 @@ are met:
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The names of its contributors may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
3. The names of its contributors may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
@@ -261,26 +261,26 @@ SUCH DAMAGE.
|
||||
|
||||
12. libxmlrpc ext/xmlrpc
|
||||
|
||||
Copyright 2000 Epinions, Inc.
|
||||
Copyright 2000 Epinions, Inc.
|
||||
|
||||
Subject to the following 3 conditions, Epinions, Inc. permits you, free
|
||||
of charge, to (a) use, copy, distribute, modify, perform and display this
|
||||
software and associated documentation files (the "Software"), and (b)
|
||||
permit others to whom the Software is furnished to do so as well.
|
||||
Subject to the following 3 conditions, Epinions, Inc. permits you, free
|
||||
of charge, to (a) use, copy, distribute, modify, perform and display this
|
||||
software and associated documentation files (the "Software"), and (b)
|
||||
permit others to whom the Software is furnished to do so as well.
|
||||
|
||||
1) The above copyright notice and this permission notice shall be included
|
||||
without modification in all copies or substantial portions of the
|
||||
Software.
|
||||
1) The above copyright notice and this permission notice shall be included
|
||||
without modification in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
2) THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OR CONDITION OF
|
||||
ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION ANY
|
||||
IMPLIED WARRANTIES OF ACCURACY, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE OR NONINFRINGEMENT.
|
||||
2) THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OR CONDITION OF
|
||||
ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION ANY
|
||||
IMPLIED WARRANTIES OF ACCURACY, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE OR NONINFRINGEMENT.
|
||||
|
||||
3) IN NO EVENT SHALL EPINIONS, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
|
||||
OF OR IN CONNECTION WITH THE SOFTWARE (HOWEVER ARISING, INCLUDING
|
||||
NEGLIGENCE), EVEN IF EPINIONS, INC. IS AWARE OF THE POSSIBILITY OF SUCH
|
||||
3) IN NO EVENT SHALL EPINIONS, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
|
||||
OF OR IN CONNECTION WITH THE SOFTWARE (HOWEVER ARISING, INCLUDING
|
||||
NEGLIGENCE), EVEN IF EPINIONS, INC. IS AWARE OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
13. libzip ext/zip
|
||||
|
||||
@@ -32,7 +32,7 @@ team (Bjori) on hand.
|
||||
6. Verify the tags to be extra sure everything was tagged properly.
|
||||
|
||||
7. Moving extensions from/to PECL requires write access to the destination.
|
||||
Most developers should have this.
|
||||
Most developers should have this.
|
||||
|
||||
Moving extensions from php-src to PECL
|
||||
- Checkout the pecl directory, most likely you want a sparse-root checkout
|
||||
@@ -125,7 +125,7 @@ Getting the non stable release (alpha/beta/RC) announced
|
||||
|
||||
b. ``$PHP_x_RC_DATE`` = "06 September 2007"
|
||||
|
||||
3. Add a short notice to phpweb stating that there is a new release, and
|
||||
3. Add a short notice to phpweb stating that there is a new release, and
|
||||
highlight the major important things (security fixes) and when it is important
|
||||
to upgrade.
|
||||
|
||||
@@ -140,7 +140,7 @@ to upgrade.
|
||||
|
||||
*Wait for web and qa sites to update with new information before sending announce*
|
||||
|
||||
5. Send an email **To** ``internals@lists.php.net`` and ``php-general@lists.php.net``
|
||||
5. Send an email **To** ``internals@lists.php.net`` and ``php-general@lists.php.net``
|
||||
lists pointing out "the location of the release" and "the possible release date of
|
||||
either the next RC, or the final release". Include in this information the verification
|
||||
information output by ``gen_verify_stub``.
|
||||
@@ -193,7 +193,7 @@ Check if the pear files are updated (phar).
|
||||
``gpg -u YOUREMAIL --armor --detach-sign php-X.Y.Z.tar.xxx``
|
||||
|
||||
11. Commit and push all the tarballs and signature files to web/php-distributions.git,
|
||||
then update the git submodule reference in web/php.git:
|
||||
then update the git submodule reference in web/php.git:
|
||||
``git submodule init;
|
||||
git submodule update;
|
||||
cd distributions;
|
||||
@@ -263,7 +263,7 @@ f.e. ``ChangeLog-5.php`` from the NEWS file
|
||||
IV. ``s/Fixed PECL bug #\([0-9]\+\)/<?php peclbugfix(\1); ?>/``
|
||||
|
||||
V. ``s/FR #\([0-9]\+\)/FR <?php bugl(\1); ?>/``
|
||||
|
||||
|
||||
e. You may want to try php-web/bin/news2html to automate this task
|
||||
|
||||
6. Add a short notice to phpweb stating that there is a new release, and
|
||||
@@ -338,7 +338,7 @@ New Release Manager Checklist
|
||||
one or more of the previous RMs sign your key. Publish your public key to pgp.mit.edu with:
|
||||
`gpg --keyserver pgp.mit.edu --send-keys $KEYID`
|
||||
|
||||
3. Request karma to eding main/php_version.h. Possibly karma for other restricted parts of
|
||||
3. Request karma to eding main/php_version.h. Possibly karma for other restricted parts of
|
||||
php-src might come in question.
|
||||
|
||||
4. Request karma for web/qa.git and web/php.git for publishing release announcements.
|
||||
|
||||
@@ -23,7 +23,7 @@ PREPARING YOUR SYSTEM
|
||||
GNU libtool
|
||||
GNU m4
|
||||
|
||||
All of these are available from
|
||||
All of these are available from
|
||||
|
||||
ftp://ftp.gnu.org/pub/gnu/
|
||||
|
||||
@@ -33,7 +33,7 @@ CONVERTING AN EXISTING EXTENSION
|
||||
extension, we will convert an embedded extension into a
|
||||
self-contained one. Install PHP and execute the following
|
||||
commands.
|
||||
|
||||
|
||||
$ mkdir /tmp/newext
|
||||
$ cd /tmp/newext
|
||||
|
||||
@@ -56,7 +56,7 @@ CONVERTING AN EXISTING EXTENSION
|
||||
[--with-mysql=MYSQL-DIR]
|
||||
$ make install
|
||||
|
||||
The MySQL module will either use the embedded MySQL client
|
||||
The MySQL module will either use the embedded MySQL client
|
||||
library or the MySQL installation in MYSQL-DIR.
|
||||
|
||||
|
||||
@@ -67,8 +67,8 @@ DEFINING THE NEW EXTENSION
|
||||
It consists of two source files "foo.c" and "bar.c"
|
||||
(and any arbitrary amount of header files, but that is not
|
||||
important here).
|
||||
|
||||
The demo extension does not reference any external
|
||||
|
||||
The demo extension does not reference any external
|
||||
libraries (that is important, because the user does not
|
||||
need to specify anything).
|
||||
|
||||
@@ -78,7 +78,7 @@ DEFINING THE NEW EXTENSION
|
||||
|
||||
CREATING THE M4 CONFIGURATION FILE
|
||||
|
||||
The m4 configuration can perform additional checks. For a
|
||||
The m4 configuration can perform additional checks. For a
|
||||
self-contained extension, you do not need more than a few
|
||||
macro calls.
|
||||
|
||||
@@ -97,7 +97,7 @@ fi
|
||||
The first argument of PHP_NEW_EXTENSION describes the name of the
|
||||
extension. The second names the source-code files. The third passes
|
||||
$ext_shared which is set by PHP_ARG_ENABLE/WITH to PHP_NEW_EXTENSION.
|
||||
|
||||
|
||||
Please use always PHP_ARG_ENABLE or PHP_ARG_WITH. Even if you do not
|
||||
plan to distribute your module with PHP, these facilities allow you
|
||||
to integrate your module easily into the main PHP module framework.
|
||||
@@ -138,7 +138,7 @@ INSTALLING A SELF-CONTAINED EXTENSION
|
||||
ADDING SHARED MODULE SUPPORT TO A MODULE
|
||||
|
||||
In order to be useful, a self-contained extension must be loadable
|
||||
as a shared module. I will explain now how you can add shared module
|
||||
as a shared module. I will explain now how you can add shared module
|
||||
support to an existing module called foo.
|
||||
|
||||
1. In config.m4, use PHP_ARG_WITH/PHP_ARG_ENABLE. Then you will
|
||||
|
||||
@@ -28,7 +28,7 @@ The main functions are:
|
||||
PHPAPI size_t php_stream_read(php_stream * stream, char * buf, size_t count);
|
||||
PHPAPI size_t php_stream_write(php_stream * stream, const char * buf, size_t
|
||||
count);
|
||||
PHPAPI size_t php_stream_printf(php_stream * stream,
|
||||
PHPAPI size_t php_stream_printf(php_stream * stream,
|
||||
const char * fmt, ...);
|
||||
PHPAPI int php_stream_eof(php_stream * stream);
|
||||
PHPAPI int php_stream_getc(php_stream * stream);
|
||||
@@ -63,7 +63,7 @@ Where:
|
||||
file/URL, use this option to arrange for the stream
|
||||
to be copied (if needed) into a stream that can
|
||||
be seek()ed.
|
||||
|
||||
|
||||
opened_path is used to return the path of the actual file opened,
|
||||
but if you used STREAM_MUST_SEEK, may not be valid. You are
|
||||
responsible for efree()ing opened_path. opened_path may be (and usually
|
||||
@@ -95,7 +95,7 @@ PHPAPI php_stream *php_stream_sock_open_host(const char *host, unsigned short po
|
||||
PHPAPI php_stream *php_stream_sock_open_unix(const char *path, int persistent,
|
||||
struct timeval *timeout);
|
||||
Open a UNIX domain socket.
|
||||
|
||||
|
||||
|
||||
Stream Utilities
|
||||
================
|
||||
@@ -246,7 +246,7 @@ PHPAPI php_stream * php_stream_fopen(const char * filename, const char * mode)
|
||||
{
|
||||
FILE * fp = fopen(filename, mode);
|
||||
php_stream * ret;
|
||||
|
||||
|
||||
if (fp) {
|
||||
ret = php_stream_alloc(&php_stream_stdio_ops, fp, 0, 0, mode);
|
||||
if (ret)
|
||||
@@ -347,7 +347,7 @@ static size_t php_mysqlop_read(php_stream * stream, char * buf, size_t count)
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* pull out some data from the stream and put it in buf */
|
||||
... mysql_fetch_row(state->result) ...
|
||||
/* we could do something strange, like format the data as XML here,
|
||||
|
||||
@@ -128,7 +128,7 @@ How to create your PHP, PHP Documentation or PECL patch
|
||||
-------------------------------------------------------
|
||||
PHP and most PECL packages use Git for revision control. Some PECL
|
||||
packages use Subversion (SVN) Read http://www.php.net/git.php for help
|
||||
on using Git to get and build PHP source code. We recommend to look
|
||||
on using Git to get and build PHP source code. We recommend to look
|
||||
at our workflow on https://wiki.php.net/vcs/gitworkflow and our FAQ
|
||||
https://wiki.php.net/vcs/gitfaq.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ it failed on your system without providing substantial backup information
|
||||
on *why* the test failed on your special setup. Thank you :-)
|
||||
|
||||
|
||||
[Testing Basics]
|
||||
[Testing Basics]
|
||||
----------------
|
||||
The easiest way to test your PHP build is to run "make test" from the
|
||||
command line after successfully compiling. This will run the complete
|
||||
@@ -36,7 +36,7 @@ If you are running the run-tests.php script from the command line (as above)
|
||||
you must set the TEST_PHP_EXECUTABLE environment variable to explicitly
|
||||
select the PHP executable that is to be tested, that is, used to run the test scripts.
|
||||
|
||||
If you run the tests using make test, the PHP CLI and CGI executables are
|
||||
If you run the tests using make test, the PHP CLI and CGI executables are
|
||||
automatically set for you. "make test" executes "run-tests.php" script with the CLI binary. Some
|
||||
test scripts such as session must be executed by CGI SAPI. Therefore,
|
||||
you must build PHP with CGI SAPI to perform all tests.
|
||||
@@ -62,7 +62,7 @@ from the source root and any subdirectories below. If there are files,
|
||||
which have a "phpt" extension, "run-tests.php" looks at the sections
|
||||
in these files, determines whether it should run it, by evaluating
|
||||
the 'SKIP' section. If the test is eligible for execution, the 'FILE'
|
||||
section is extracted into a ".php" file (with the same name besides
|
||||
section is extracted into a ".php" file (with the same name besides
|
||||
the extension) and gets executed.
|
||||
When an argument is given or TESTS environment variable is set, the
|
||||
GLOB is expanded by the shell and any file with extension "*.phpt" is
|
||||
@@ -77,9 +77,9 @@ Examples:
|
||||
|
||||
[Test results]
|
||||
--------------
|
||||
Test results are printed to standard output. If there is a failed test,
|
||||
Test results are printed to standard output. If there is a failed test,
|
||||
the "run-tests.php" script saves the result, the expected result and the
|
||||
code executed to the test script directory. For example, if
|
||||
code executed to the test script directory. For example, if
|
||||
ext/myext/tests/myext.phpt fails to pass, the following files are created:
|
||||
|
||||
ext/myext/tests/myext.php - actual test file executed
|
||||
@@ -151,20 +151,20 @@ advised to test for non-zero, rather then a specific value.
|
||||
|
||||
[Creating new test files]
|
||||
-------------------------
|
||||
Writing test file is very easy if you are used to PHP.
|
||||
Writing test file is very easy if you are used to PHP.
|
||||
See the HOWTO at http://qa.php.net/write-test.php
|
||||
|
||||
|
||||
[How to help us]
|
||||
----------------
|
||||
If you find bug in PHP, you can submit bug report AND test script
|
||||
If you find bug in PHP, you can submit bug report AND test script
|
||||
for us. You don't have to write complete script, just give us test
|
||||
script with following format. Please test the script and make sure
|
||||
you write the correct ACTUAL OUTPUT and EXPECTED OUTPUT before you
|
||||
submit.
|
||||
|
||||
<?php
|
||||
/*
|
||||
/*
|
||||
Bug #12345
|
||||
substr() bug. Do not return expected string.
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
[IMPORTANT NOTICE]
|
||||
------------------
|
||||
This is an addendum to README.TESTING with additional information
|
||||
This is an addendum to README.TESTING with additional information
|
||||
specific to server-tests.php.
|
||||
|
||||
server-tests.php is backward compatible with tests developed for
|
||||
the original run-tests.php script. server-tests is *not* used by
|
||||
'make test'. server-tests was developed to provide support for
|
||||
testing PHP under it's primary environment, HTTP, and can run the
|
||||
PHP tests under any of the SAPI modules that are direct executables,
|
||||
PHP tests under any of the SAPI modules that are direct executables,
|
||||
or are accessible via HTTP.
|
||||
|
||||
[New features]
|
||||
@@ -25,7 +25,7 @@ or are accessible via HTTP.
|
||||
can be configured to run test scripts through an HTTP server running
|
||||
on localhost. localhost is required since either the web server must
|
||||
alias a directory to the php source directory, or the test scripts
|
||||
must be copied to a directory under the web server
|
||||
must be copied to a directory under the web server
|
||||
(see config options TEST_WEB_BASE_URL, TEST_BASE_PATH, and TEST_WEB_EXT)
|
||||
* New sections supported for test files (see below)
|
||||
|
||||
@@ -49,7 +49,7 @@ Some (but not all!) examples of usage:
|
||||
|
||||
4. run tests over http, php sources have been aliased in web server
|
||||
php server-tests.php -w -u http://localhost/test
|
||||
|
||||
|
||||
5. run tests using configuration file
|
||||
php server-tests.php -c /path/to/server-tests-config.php
|
||||
|
||||
@@ -59,10 +59,10 @@ Some (but not all!) examples of usage:
|
||||
|
||||
NOTE: configuration as described in README.TESTING still works.
|
||||
|
||||
[New Test Sections]
|
||||
[New Test Sections]
|
||||
----------------
|
||||
In addition to the traditional test sections
|
||||
(see http://qa.php.net/write-test.php), several new sections are available
|
||||
In addition to the traditional test sections
|
||||
(see http://qa.php.net/write-test.php), several new sections are available
|
||||
under server-tests.
|
||||
|
||||
--POST--
|
||||
@@ -78,7 +78,7 @@ in the test file.
|
||||
Not used for anything, just a section for documenting the test
|
||||
|
||||
--ENV--
|
||||
This section get's eval()'d to help build an environment for the
|
||||
This section get's eval()'d to help build an environment for the
|
||||
execution of the test. This can be used to change environment
|
||||
vars that are used for CGI emulation, or simply to set env vars
|
||||
for cli testing. A full example looks like:
|
||||
|
||||
@@ -12,7 +12,7 @@ enforced. It is implemented as a SAPI hook and is called from the
|
||||
treat_data and post handler functions. To implement your own security
|
||||
policy you will need to write a standard PHP extension. There is also
|
||||
a powerful standard implementation in ext/filter that should suit most
|
||||
peoples' needs. However, if you want to implement your own security
|
||||
peoples' needs. However, if you want to implement your own security
|
||||
policy, read on.
|
||||
|
||||
A simple implementation might look like the following. This stores the
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# Written by Sascha Schumann
|
||||
#
|
||||
# $Id$
|
||||
# $Id$
|
||||
|
||||
|
||||
LT_TARGETS = ltmain.sh ltconfig
|
||||
@@ -34,7 +34,7 @@ aclocal.m4: configure.ac acinclude.m4
|
||||
aclocal
|
||||
|
||||
$(config_h_in): configure.ac
|
||||
# explicitly remove target since autoheader does not seem to work
|
||||
# explicitly remove target since autoheader does not seem to work
|
||||
# correctly otherwise (timestamps are not updated)
|
||||
@rm -f $@
|
||||
autoheader
|
||||
|
||||
@@ -12,10 +12,10 @@ AH_TOP([
|
||||
])
|
||||
|
||||
sinclude(tsrm.m4)
|
||||
|
||||
|
||||
TSRM_BASIC_CHECKS
|
||||
TSRM_THREADS_CHECKS
|
||||
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
if test "$enable_debug" != "yes"; then
|
||||
AM_SET_LIBTOOL_VARIABLE([--silent])
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
dnl Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
|
||||
dnl
|
||||
dnl
|
||||
dnl Redistribution and use in source and binary forms, with or without
|
||||
dnl modification, are permitted provided that the following conditions
|
||||
dnl are met:
|
||||
dnl
|
||||
dnl
|
||||
dnl 1. Redistributions of source code must retain the above copyright
|
||||
dnl notice, this list of conditions and the following disclaimer.
|
||||
dnl
|
||||
dnl
|
||||
dnl 2. Redistributions in binary form must reproduce the above copyright
|
||||
dnl notice, this list of conditions and the following disclaimer in
|
||||
dnl the documentation and/or other materials provided with the
|
||||
dnl distribution.
|
||||
dnl
|
||||
dnl
|
||||
dnl THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY
|
||||
dnl EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
@@ -97,7 +97,7 @@ dnl -Kthread UDK cc (UnixWare)
|
||||
dnl -mt WorkShop cc (Solaris)
|
||||
dnl -mthreads gcc (AIX)
|
||||
dnl -pthread gcc (Linux, FreeBSD, NetBSD, OpenBSD)
|
||||
dnl -pthreads gcc (Solaris)
|
||||
dnl -pthreads gcc (Solaris)
|
||||
dnl -qthreaded AIX cc V5
|
||||
dnl -threads gcc (HP-UX)
|
||||
dnl
|
||||
@@ -117,7 +117,7 @@ else
|
||||
AC_CACHE_CHECK(for pthreads_cflags,ac_cv_pthreads_cflags,[
|
||||
ac_cv_pthreads_cflags=
|
||||
if test "$pthreads_working" != "yes"; then
|
||||
for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt -qthreaded; do
|
||||
for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt -qthreaded; do
|
||||
ac_save=$CFLAGS
|
||||
CFLAGS="$CFLAGS $flag"
|
||||
PTHREADS_CHECK_COMPILE
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
m4_include([TSRM/m4/gethostbyname.m4])
|
||||
|
||||
dnl TSRM_CHECK_GCC_ARG(ARG, ACTION-IF-FOUND, ACTION-IF-NOT_FOUND)
|
||||
dnl TSRM_CHECK_GCC_ARG(ARG, ACTION-IF-FOUND, ACTION-IF-NOT_FOUND)
|
||||
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_), [
|
||||
@@ -75,12 +75,12 @@ AC_DEFUN([TSRM_CHECK_ST],[
|
||||
sinclude(threads.m4)
|
||||
|
||||
AC_DEFUN([TSRM_CHECK_PTHREADS],[
|
||||
|
||||
|
||||
PTHREADS_CHECK
|
||||
|
||||
if test "$beos_threads" = "1"; then
|
||||
if test "$beos_threads" = "1"; then
|
||||
AC_DEFINE(BETHREADS, 1, Whether to use native BeOS threads)
|
||||
else
|
||||
else
|
||||
if test "$pthreads_working" != "yes"; then
|
||||
AC_MSG_ERROR(Your system seems to lack POSIX threads.)
|
||||
fi
|
||||
|
||||
16
UPGRADING
16
UPGRADING
@@ -180,7 +180,7 @@ PHP 8.0.
|
||||
. The each() function has been deprecated, use a foreach loop instead.
|
||||
. The $errcontext error handler argument has been deprecated. However, using
|
||||
it does not trigger a deprecation warning for technical reasons.
|
||||
|
||||
|
||||
- EXIF:
|
||||
. The read_exif_data() alias has been deprecated, use exif_read_data() instead.
|
||||
|
||||
@@ -210,14 +210,14 @@ See also: https://wiki.php.net/rfc/deprecations_php_7_2
|
||||
========================================
|
||||
|
||||
- Standard:
|
||||
. password_hash() can generate Argon2i hashes when the algorithm is set to PASSWORD_ARGON2I.
|
||||
When using PASSWORD_ARGON2I, the following cost factors may be set: 'memory_cost', 'time_cost',
|
||||
and 'threads'. These cost factors will default to 'PASSWORD_ARGON2_DEFAULT_MEMORY_COST',
|
||||
. password_hash() can generate Argon2i hashes when the algorithm is set to PASSWORD_ARGON2I.
|
||||
When using PASSWORD_ARGON2I, the following cost factors may be set: 'memory_cost', 'time_cost',
|
||||
and 'threads'. These cost factors will default to 'PASSWORD_ARGON2_DEFAULT_MEMORY_COST',
|
||||
'PASSWORD_ARGON2_DEFAULT_TIME_COST', and 'PASSWORD_ARGON2_DEFAULT_THREADS' respectively if not set.
|
||||
. password_verify() can verify Argon2i hashes.
|
||||
. password_get_info() and password_needs_rehash() can accept Argon2i hashes.
|
||||
. mail()/mb_send_mail() accept array $extra_header. Array parameter is checked against RFC 2822.
|
||||
Array format is
|
||||
Array format is
|
||||
$extra_headers = [
|
||||
'Header-Name' => 'Header value',
|
||||
'Multiple' => ['One header', 'Another header'],
|
||||
@@ -290,10 +290,10 @@ See also: https://wiki.php.net/rfc/deprecations_php_7_2
|
||||
========================================
|
||||
|
||||
- EXIF:
|
||||
. Added extended exif tag support for the following formats:
|
||||
Samsung, DJI, Panasonic, Sony, Pentax, Minolta, Sigma/Foveon,
|
||||
. Added extended exif tag support for the following formats:
|
||||
Samsung, DJI, Panasonic, Sony, Pentax, Minolta, Sigma/Foveon,
|
||||
AGFA, Kyocera, Ricoh & Epson.
|
||||
. exif_read_data() and exif_thumbnail() now supports a passed streams as their
|
||||
. exif_read_data() and exif_thumbnail() now supports a passed streams as their
|
||||
first parameter.
|
||||
|
||||
- GD:
|
||||
|
||||
@@ -31,7 +31,7 @@ PHP 7.2 INTERNALS UPGRADE NOTES
|
||||
The internal randomness source on Windows switched to use CNG API.
|
||||
|
||||
c. nice() now have a Windows alternative that is implemented in win32/nice.c, using
|
||||
SetPriorityClass(). See the implementation for more in-depth details. This also
|
||||
SetPriorityClass(). See the implementation for more in-depth details. This also
|
||||
defines HAVE_NICE.
|
||||
|
||||
d. ZEND_ACC_CLONE is removed, but was not used in previous versions
|
||||
|
||||
24
Zend/LICENSE
24
Zend/LICENSE
@@ -1,25 +1,25 @@
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
The Zend Engine License, Version 2.00
|
||||
Copyright (c) 1999-2006 Zend Technologies Ltd. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, is permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
|
||||
|
||||
3. The names "Zend" and "Zend Engine" must not be used to endorse
|
||||
or promote products derived from this software without prior
|
||||
permission from Zend Technologies Ltd. For written permission,
|
||||
please contact license@zend.com.
|
||||
|
||||
please contact license@zend.com.
|
||||
|
||||
4. Zend Technologies Ltd. may publish revised and/or new versions
|
||||
of the license from time to time. Each version will be given a
|
||||
distinguishing version number.
|
||||
@@ -40,9 +40,9 @@ are met:
|
||||
software must display the following acknowledgment:
|
||||
"The Zend Engine is freely available at http://www.zend.com"
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY ZEND TECHNOLOGIES LTD. ``AS IS'' AND
|
||||
THIS SOFTWARE IS PROVIDED BY ZEND TECHNOLOGIES LTD. ``AS IS'' AND
|
||||
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ZEND
|
||||
TECHNOLOGIES LTD. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
@@ -53,4 +53,4 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
|
||||
@@ -21,7 +21,7 @@ ZEND_VM_HANDLER(<OPCODE-NUMBER>, <OPCODE>, <OP1_TYPES>, <OP2_TYPES>)
|
||||
<OPCODE-NUMBER> is a opcode number (0, 1, ...)
|
||||
<OPCODE> is an opcode name (ZEN_NOP, ZEND_ADD, :)
|
||||
<OP1_TYPES> & <OP2_TYPES> are masks for allowed operand op_types. Specializer
|
||||
will generate code only for defined combination of types. You can use any
|
||||
will generate code only for defined combination of types. You can use any
|
||||
combination of the following op_types UNUSED, CONST, VAR, TMP and CV also
|
||||
you can use ANY mask to disable specialization according operand's op_type.
|
||||
<HANDLER'S CODE> is a handler's code itself. For most handlers it stills the
|
||||
@@ -34,9 +34,9 @@ EXECUTE_DATA
|
||||
execute_data
|
||||
ZEND_VM_DISPATCH_TO_HANDLER(<OP>)
|
||||
return <OP>_helper(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)
|
||||
ZEND_VM_DISPATCH_TO_HELPER(<NAME>)
|
||||
ZEND_VM_DISPATCH_TO_HELPER(<NAME>)
|
||||
return <NAME>(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)
|
||||
ZEND_VM_DISPATCH_TO_HELPER_EX(<NAME>,<PARAM>,<VAL>)
|
||||
ZEND_VM_DISPATCH_TO_HELPER_EX(<NAME>,<PARAM>,<VAL>)
|
||||
return <NAME>(<VAL>, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)
|
||||
ZEND_VM_CONTINUE()
|
||||
return 0
|
||||
@@ -72,7 +72,7 @@ FREE_OP<X>_VAR_PTR()
|
||||
FREE_VAR_PTR(free_op<X>)
|
||||
|
||||
|
||||
Executor's helpers can be defined without parameters or with one parameter.
|
||||
Executor's helpers can be defined without parameters or with one parameter.
|
||||
This is done with the following constructs:
|
||||
|
||||
ZEND_VM_HELPER(<HELPER-NAME>, <OP1_TYPES>, <OP2_TYPES>)
|
||||
@@ -86,13 +86,13 @@ ZEND_VM_HELPER_EX(<HELPER-NAME>, <OP1_TYPES>, <OP2_TYPES>, <PARAM_SPEC>)
|
||||
}
|
||||
|
||||
Executor's code is generated by PHP script zend_vm_gen.php it uses zend_vm_def.h
|
||||
and zend_vm_execute.skl as input and produces zend_vm_opcodes.h and
|
||||
zend_vm_execute.h. The first file is a list of opcode definitions. It is
|
||||
and zend_vm_execute.skl as input and produces zend_vm_opcodes.h and
|
||||
zend_vm_execute.h. The first file is a list of opcode definitions. It is
|
||||
included from zend_compile.h. The second one is an executor code itself. It is
|
||||
included from zend_execute.c.
|
||||
|
||||
zend_vm_gen.php can produce different kind of executors. You can select
|
||||
different opcode threading model using --with-vm-kind=CALL|SWITCH|GOTO. You can
|
||||
zend_vm_gen.php can produce different kind of executors. You can select
|
||||
different opcode threading model using --with-vm-kind=CALL|SWITCH|GOTO. You can
|
||||
disable opcode specialization using --without-specializer. You can include or
|
||||
exclude old executor together with specialized one using --without-old-executor.
|
||||
At last you can debug executor using original zend_vm_def.h or generated file
|
||||
|
||||
44
Zend/Zend.m4
44
Zend/Zend.m4
@@ -7,10 +7,10 @@ dnl
|
||||
AC_DEFUN([LIBZEND_CHECK_INT_TYPE],[
|
||||
AC_MSG_CHECKING(for $1)
|
||||
AC_TRY_COMPILE([
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_INTTYPES_H
|
||||
#if HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#elif HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
@@ -137,7 +137,7 @@ int main()
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBZEND_ENABLE_DEBUG],[
|
||||
@@ -147,7 +147,7 @@ AC_ARG_ENABLE(debug,
|
||||
ZEND_DEBUG=$enableval
|
||||
],[
|
||||
ZEND_DEBUG=no
|
||||
])
|
||||
])
|
||||
|
||||
])
|
||||
|
||||
@@ -158,10 +158,10 @@ AC_ARG_ENABLE(maintainer-zts,
|
||||
ZEND_MAINTAINER_ZTS=$enableval
|
||||
],[
|
||||
ZEND_MAINTAINER_ZTS=no
|
||||
])
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE(inline-optimization,
|
||||
[ --disable-inline-optimization
|
||||
[ --disable-inline-optimization
|
||||
If building zend_execute.lo fails, try this switch],[
|
||||
ZEND_INLINE_OPTIMIZATION=$enableval
|
||||
],[
|
||||
@@ -196,7 +196,7 @@ if test "$ZEND_MAINTAINER_ZTS" = "yes"; then
|
||||
AC_DEFINE(ZTS,1,[ ])
|
||||
CFLAGS="$CFLAGS -DZTS"
|
||||
LIBZEND_CPLUSPLUS_CHECKS
|
||||
fi
|
||||
fi
|
||||
|
||||
changequote({,})
|
||||
if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
|
||||
@@ -249,7 +249,7 @@ int main()
|
||||
}
|
||||
|
||||
fp = fopen("conftest.zend", "w");
|
||||
fprintf(fp, "%d %d\n", ZEND_MM_ALIGNMENT, zeros);
|
||||
fprintf(fp, "%d %d\n", ZEND_MM_ALIGNMENT, zeros);
|
||||
fclose(fp);
|
||||
|
||||
exit(0);
|
||||
@@ -258,7 +258,7 @@ int main()
|
||||
LIBZEND_MM_ALIGN=`cat conftest.zend | cut -d ' ' -f 1`
|
||||
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, [ ])
|
||||
AC_DEFINE_UNQUOTED(ZEND_MM_ALIGNMENT_LOG2, $LIBZEND_MM_ALIGN_LOG2, [ ])
|
||||
], [], [
|
||||
dnl cross-compile needs something here
|
||||
LIBZEND_MM_ALIGN=8
|
||||
@@ -374,7 +374,7 @@ AC_ARG_ENABLE(zend-signals,
|
||||
ZEND_SIGNALS=$enableval
|
||||
],[
|
||||
ZEND_SIGNALS=yes
|
||||
])
|
||||
])
|
||||
|
||||
AC_CHECK_FUNC(sigaction, [
|
||||
AC_DEFINE(HAVE_SIGACTION, 1, [Whether sigaction() is available])
|
||||
@@ -395,24 +395,24 @@ AC_DEFUN([LIBZEND_CPLUSPLUS_CHECKS],[
|
||||
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(whether /dev/urandom exists)
|
||||
if test -r "/dev/urandom" && test -c "/dev/urandom"; then
|
||||
AC_MSG_CHECKING(whether /dev/urandom exists)
|
||||
if test -r "/dev/urandom" && test -c "/dev/urandom"; then
|
||||
AC_DEFINE([HAVE_DEV_URANDOM], 1, [Define if the target system has /dev/urandom device])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(whether /dev/arandom exists)
|
||||
if test -r "/dev/arandom" && test -c "/dev/arandom"; then
|
||||
AC_MSG_CHECKING(whether /dev/arandom exists)
|
||||
if test -r "/dev/arandom" && test -c "/dev/arandom"; then
|
||||
AC_DEFINE([HAVE_DEV_ARANDOM], 1, [Define if the target system has /dev/arandom device])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(gcc-global-regs,
|
||||
[ --disable-gcc-global-regs
|
||||
[ --disable-gcc-global-regs
|
||||
whether to enable GCC global register variables],[
|
||||
ZEND_GCC_GLOBAL_REGS=$enableval
|
||||
],[
|
||||
|
||||
@@ -7,7 +7,7 @@ AC_DEFUN([LIBZEND_BISON_CHECK],[
|
||||
# min: 2.4 (i.e. 204, major * 100 + minor for easier comparison)
|
||||
bison_version_min="204"
|
||||
# non-working versions, e.g. "3.0 3.2";
|
||||
# remove "none" when introducing the first incompatible bison version an
|
||||
# remove "none" when introducing the first incompatible bison version an
|
||||
# separate any following additions by spaces
|
||||
bison_version_exclude=""
|
||||
|
||||
@@ -139,7 +139,7 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
|
||||
AC_MSG_CHECKING([for usable fpsetprec])
|
||||
AC_TRY_LINK([
|
||||
#include <machine/ieeefp.h>
|
||||
|
||||
@@ -5,18 +5,18 @@ if (function_exists("date_default_timezone_set")) {
|
||||
|
||||
function simple() {
|
||||
$a = 0;
|
||||
for ($i = 0; $i < 1000000; $i++)
|
||||
for ($i = 0; $i < 1000000; $i++)
|
||||
$a++;
|
||||
|
||||
$thisisanotherlongname = 0;
|
||||
for ($thisisalongname = 0; $thisisalongname < 1000000; $thisisalongname++)
|
||||
for ($thisisalongname = 0; $thisisalongname < 1000000; $thisisalongname++)
|
||||
$thisisanotherlongname++;
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function simplecall() {
|
||||
for ($i = 0; $i < 1000000; $i++)
|
||||
for ($i = 0; $i < 1000000; $i++)
|
||||
strlen("hallo");
|
||||
}
|
||||
|
||||
@@ -26,14 +26,14 @@ function hallo($a) {
|
||||
}
|
||||
|
||||
function simpleucall() {
|
||||
for ($i = 0; $i < 1000000; $i++)
|
||||
for ($i = 0; $i < 1000000; $i++)
|
||||
hallo("hallo");
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function simpleudcall() {
|
||||
for ($i = 0; $i < 1000000; $i++)
|
||||
for ($i = 0; $i < 1000000; $i++)
|
||||
hallo2("hallo");
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# Written by Sascha Schumann
|
||||
#
|
||||
# $Id$
|
||||
# $Id$
|
||||
|
||||
|
||||
LT_TARGETS = ltmain.sh ltconfig
|
||||
@@ -34,7 +34,7 @@ aclocal.m4: configure.ac acinclude.m4
|
||||
aclocal
|
||||
|
||||
$(config_h_in): configure.ac
|
||||
# explicitly remove target since autoheader does not seem to work
|
||||
# explicitly remove target since autoheader does not seem to work
|
||||
# correctly otherwise (timestamps are not updated)
|
||||
@rm -f $@
|
||||
autoheader
|
||||
|
||||
@@ -4,12 +4,12 @@ function hallo() {
|
||||
}
|
||||
|
||||
function simpleucall($n) {
|
||||
for ($i = 0; $i < $n; $i++)
|
||||
for ($i = 0; $i < $n; $i++)
|
||||
hallo();
|
||||
}
|
||||
|
||||
function simpleudcall($n) {
|
||||
for ($i = 0; $i < $n; $i++)
|
||||
for ($i = 0; $i < $n; $i++)
|
||||
hallo2();
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ function hallo2() {
|
||||
}
|
||||
|
||||
function simpleicall($n) {
|
||||
for ($i = 0; $i < $n; $i++)
|
||||
for ($i = 0; $i < $n; $i++)
|
||||
func_num_args();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class Foo
|
||||
{
|
||||
return $param1;
|
||||
}
|
||||
|
||||
|
||||
private static function privateStaticFunction($param1)
|
||||
{
|
||||
return $param1;
|
||||
@@ -41,18 +41,18 @@ class Foo
|
||||
{
|
||||
return $param1;
|
||||
}
|
||||
|
||||
|
||||
protected function protectedInstanceFunc($param1)
|
||||
{
|
||||
return $param1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function publicInstanceFunc($param1)
|
||||
{
|
||||
return $param1;
|
||||
}
|
||||
|
||||
|
||||
public function closePrivateValid()
|
||||
{
|
||||
return Closure::fromCallable([$this, 'privateInstanceFunc']);
|
||||
@@ -87,23 +87,23 @@ class Foo
|
||||
|
||||
|
||||
class SubFoo extends Foo {
|
||||
|
||||
|
||||
public function closePrivateStaticInvalid()
|
||||
{
|
||||
return Closure::fromCallable([__CLASS__, 'privateStaticFunction']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function closePrivateInvalid()
|
||||
{
|
||||
return Closure::fromCallable([$this, 'privateInstanceFunc']);
|
||||
}
|
||||
|
||||
|
||||
public function closeProtectedStaticMethod()
|
||||
{
|
||||
return Closure::fromCallable([__CLASS__, 'protectedStaticFunction']);
|
||||
}
|
||||
|
||||
|
||||
public function closeProtectedValid()
|
||||
{
|
||||
return Closure::fromCallable([$this, 'protectedInstanceFunc']);
|
||||
@@ -113,13 +113,13 @@ class SubFoo extends Foo {
|
||||
{
|
||||
return Closure::fromCallable('parent::publicInstanceFunc');
|
||||
}
|
||||
|
||||
|
||||
public function getSelfColonParentPublicInstanceMethod()
|
||||
{
|
||||
return Closure::fromCallable('self::publicInstanceFunc');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function getSelfColonParentProtectedInstanceMethod()
|
||||
{
|
||||
return Closure::fromCallable('self::protectedInstanceFunc');
|
||||
|
||||
@@ -47,7 +47,7 @@ class IndexableRetrievable
|
||||
{
|
||||
private $label;
|
||||
private $indexable;
|
||||
|
||||
|
||||
public function __construct(string $label, Indexable $indexable) {
|
||||
$this->label = $label;
|
||||
$this->indexable = $indexable;
|
||||
|
||||
@@ -1356,7 +1356,7 @@ ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const c
|
||||
{
|
||||
va_list va;
|
||||
char *message = NULL;
|
||||
|
||||
|
||||
if (exception_ce) {
|
||||
if (!instanceof_function(exception_ce, zend_ce_error)) {
|
||||
zend_error(E_NOTICE, "Error exceptions must be derived from Error");
|
||||
|
||||
@@ -239,7 +239,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(zend_boo
|
||||
|
||||
zend_internal_argument_count_error(
|
||||
throw_ || ZEND_ARG_USES_STRICT_TYPES(),
|
||||
"%s%s%s() expects %s %d parameter%s, %d given",
|
||||
"%s%s%s() expects %s %d parameter%s, %d given",
|
||||
class_name, \
|
||||
class_name[0] ? "::" : "", \
|
||||
ZSTR_VAL(active_function->common.function_name),
|
||||
@@ -2293,7 +2293,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
|
||||
}
|
||||
|
||||
if (reg_function->common.arg_info &&
|
||||
(reg_function->common.fn_flags & (ZEND_ACC_HAS_RETURN_TYPE|ZEND_ACC_HAS_TYPE_HINTS))) {
|
||||
(reg_function->common.fn_flags & (ZEND_ACC_HAS_RETURN_TYPE|ZEND_ACC_HAS_TYPE_HINTS))) {
|
||||
/* convert "const char*" class type names into "zend_string*" */
|
||||
uint32_t i;
|
||||
uint32_t num_args = reg_function->common.num_args + 1;
|
||||
@@ -3134,7 +3134,7 @@ get_function_via_handler:
|
||||
(!fcc->function_handler->common.scope ||
|
||||
!instanceof_function(ce_org, fcc->function_handler->common.scope))) {
|
||||
if (fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) {
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION &&
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION &&
|
||||
fcc->function_handler->common.function_name) {
|
||||
zend_string_release(fcc->function_handler->common.function_name);
|
||||
}
|
||||
@@ -3361,7 +3361,7 @@ again:
|
||||
((fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) ||
|
||||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
|
||||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION &&
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION &&
|
||||
fcc->function_handler->common.function_name) {
|
||||
zend_string_release(fcc->function_handler->common.function_name);
|
||||
}
|
||||
@@ -3420,7 +3420,7 @@ again:
|
||||
((fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) ||
|
||||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
|
||||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION &&
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION &&
|
||||
fcc->function_handler->common.function_name) {
|
||||
zend_string_release(fcc->function_handler->common.function_name);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ typedef struct _zend_mm_debug_info {
|
||||
} zend_mm_debug_info;
|
||||
|
||||
# define ZEND_MM_OVERHEAD ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_debug_info))
|
||||
#else
|
||||
#else
|
||||
# define ZEND_MM_OVERHEAD 0
|
||||
#endif
|
||||
|
||||
@@ -383,7 +383,7 @@ static void apc_init_heap(void)
|
||||
|
||||
// Preallocate properly aligned SHM chunks (64MB)
|
||||
tmp_data.mem = shm_memalign(ZEND_MM_CHUNK_SIZE, ZEND_MM_CHUNK_SIZE * 32);
|
||||
|
||||
|
||||
// Initialize temporary storage data
|
||||
tmp_data.free_pages = 0;
|
||||
|
||||
@@ -396,7 +396,7 @@ static void apc_init_heap(void)
|
||||
zend_hash_init(apc_ht, 64, NULL, ZVAL_PTR_DTOR, 0);
|
||||
zend_mm_set_heap(old_heap);
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
|
||||
END_EXTERN_C()
|
||||
|
||||
@@ -484,7 +484,7 @@ ZEND_FUNCTION(func_get_args)
|
||||
q = p;
|
||||
if (EXPECTED(Z_TYPE_INFO_P(q) != IS_UNDEF)) {
|
||||
ZVAL_DEREF(q);
|
||||
if (Z_OPT_REFCOUNTED_P(q)) {
|
||||
if (Z_OPT_REFCOUNTED_P(q)) {
|
||||
Z_ADDREF_P(q);
|
||||
}
|
||||
} else {
|
||||
@@ -500,7 +500,7 @@ ZEND_FUNCTION(func_get_args)
|
||||
q = p;
|
||||
if (EXPECTED(Z_TYPE_INFO_P(q) != IS_UNDEF)) {
|
||||
ZVAL_DEREF(q);
|
||||
if (Z_OPT_REFCOUNTED_P(q)) {
|
||||
if (Z_OPT_REFCOUNTED_P(q)) {
|
||||
Z_ADDREF_P(q);
|
||||
}
|
||||
} else {
|
||||
@@ -1279,7 +1279,7 @@ ZEND_FUNCTION(method_exists)
|
||||
Z_PARAM_ZVAL(klass)
|
||||
Z_PARAM_STR(method_name)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
|
||||
if (Z_TYPE_P(klass) == IS_OBJECT) {
|
||||
ce = Z_OBJCE_P(klass);
|
||||
} else if (Z_TYPE_P(klass) == IS_STRING) {
|
||||
|
||||
@@ -1278,7 +1278,7 @@ static void zend_mark_function_as_generator() /* {{{ */
|
||||
|
||||
if (ZEND_TYPE_CODE(return_info.type) != IS_ITERABLE) {
|
||||
const char *msg = "Generators may only declare a return type of Generator, Iterator, Traversable, or iterable, %s is not permitted";
|
||||
|
||||
|
||||
if (!ZEND_TYPE_IS_CLASS(return_info.type)) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR, msg, zend_get_type_by_const(ZEND_TYPE_CODE(return_info.type)));
|
||||
}
|
||||
@@ -1947,7 +1947,7 @@ ZEND_API size_t zend_dirname(char *path, size_t len)
|
||||
static void zend_adjust_for_fetch_type(zend_op *opline, uint32_t type) /* {{{ */
|
||||
{
|
||||
zend_uchar factor = (opline->opcode == ZEND_FETCH_STATIC_PROP_R) ? 1 : 3;
|
||||
|
||||
|
||||
if (opline->opcode == ZEND_FETCH_THIS) {
|
||||
return;
|
||||
}
|
||||
@@ -2185,7 +2185,7 @@ static void zend_emit_tick(void) /* {{{ */
|
||||
if (CG(active_op_array)->last && CG(active_op_array)->opcodes[CG(active_op_array)->last - 1].opcode == ZEND_TICKS) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
opline = get_next_op(CG(active_op_array));
|
||||
|
||||
opline->opcode = ZEND_TICKS;
|
||||
@@ -2612,7 +2612,7 @@ static zend_op *zend_compile_simple_var_no_cv(znode *result, zend_ast *ast, uint
|
||||
opline = zend_emit_op(result, ZEND_FETCH_R, &name_node, NULL);
|
||||
}
|
||||
|
||||
if (name_node.op_type == IS_CONST &&
|
||||
if (name_node.op_type == IS_CONST &&
|
||||
zend_is_auto_global(Z_STR(name_node.u.constant))) {
|
||||
|
||||
opline->extended_value = ZEND_FETCH_GLOBAL;
|
||||
@@ -4968,7 +4968,7 @@ void zend_compile_switch(zend_ast *ast) /* {{{ */
|
||||
} else if (expr_node.op_type == IS_CONST
|
||||
&& Z_TYPE(expr_node.u.constant) == IS_TRUE) {
|
||||
jmpnz_opnums[i] = zend_emit_cond_jump(ZEND_JMPNZ, &cond_node, 0);
|
||||
} else {
|
||||
} else {
|
||||
opline = zend_emit_op(NULL, ZEND_CASE, &expr_node, &cond_node);
|
||||
SET_NODE(opline->result, &case_node);
|
||||
if (opline->op1_type == IS_CONST) {
|
||||
@@ -4992,7 +4992,7 @@ void zend_compile_switch(zend_ast *ast) /* {{{ */
|
||||
if (jumptable) {
|
||||
zval *cond_zv = zend_ast_get_zval(cond_ast);
|
||||
zval jmp_target;
|
||||
ZVAL_LONG(&jmp_target, get_next_op_number(CG(active_op_array)));
|
||||
ZVAL_LONG(&jmp_target, get_next_op_number(CG(active_op_array)));
|
||||
|
||||
ZEND_ASSERT(Z_TYPE_P(cond_zv) == jumptable_type);
|
||||
if (Z_TYPE_P(cond_zv) == IS_LONG) {
|
||||
@@ -5166,7 +5166,7 @@ void zend_compile_try(zend_ast *ast) /* {{{ */
|
||||
if (finally_ast) {
|
||||
zend_loop_var discard_exception;
|
||||
uint32_t opnum_jmp = get_next_op_number(CG(active_op_array)) + 1;
|
||||
|
||||
|
||||
/* Pop FAST_CALL from unwind stack */
|
||||
zend_stack_del_top(&CG(loop_var_stack));
|
||||
|
||||
@@ -5417,7 +5417,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
|
||||
uint32_t i;
|
||||
zend_op_array *op_array = CG(active_op_array);
|
||||
zend_arg_info *arg_infos;
|
||||
|
||||
|
||||
if (return_type_ast) {
|
||||
zend_bool allow_null = 0;
|
||||
|
||||
@@ -5560,7 +5560,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
|
||||
"with a float type can only be float, integer, or NULL");
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case IS_ITERABLE:
|
||||
if (Z_TYPE(default_node.u.constant) != IS_ARRAY) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters "
|
||||
@@ -5572,7 +5572,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
|
||||
zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters "
|
||||
"with an object type can only be NULL");
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
if (!ZEND_SAME_FAKE_TYPE(ZEND_TYPE_CODE(arg_info->type), Z_TYPE(default_node.u.constant))) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters "
|
||||
@@ -5605,7 +5605,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
|
||||
} else {
|
||||
opline->op2.num = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* These are assigned at the end to avoid unitialized memory in case of an error */
|
||||
@@ -7856,7 +7856,7 @@ static void zend_compile_encaps_list(znode *result, zend_ast *ast) /* {{{ */
|
||||
i = ((j * sizeof(zend_string*)) + (sizeof(zval) - 1)) / sizeof(zval);
|
||||
while (i > 1) {
|
||||
get_temporary_variable(CG(active_op_array));
|
||||
i--;
|
||||
i--;
|
||||
}
|
||||
|
||||
zend_end_live_range(CG(active_op_array), range, opline - CG(active_op_array)->opcodes,
|
||||
|
||||
@@ -566,7 +566,7 @@ static inline zval *_get_zval_ptr_ptr(int op_type, znode_op node, zend_free_op *
|
||||
}
|
||||
|
||||
static zend_always_inline zval *_get_obj_zval_ptr_unused(EXECUTE_DATA_D)
|
||||
{
|
||||
{
|
||||
return &EX(This);
|
||||
}
|
||||
|
||||
@@ -944,7 +944,7 @@ static ZEND_COLD void zend_verify_return_error(
|
||||
|
||||
zend_verify_type_error_common(
|
||||
zf, arg_info, ce, value,
|
||||
&fname, &fsep, &fclass, &need_msg, &need_kind, &need_or_null, &given_msg, &given_kind);
|
||||
&fname, &fsep, &fclass, &need_msg, &need_kind, &need_or_null, &given_msg, &given_kind);
|
||||
|
||||
zend_type_error("Return value of %s%s%s() must %s%s%s, %s%s returned",
|
||||
fclass, fsep, fname, need_msg, need_kind, need_or_null, given_msg, given_kind);
|
||||
@@ -960,7 +960,7 @@ static ZEND_COLD void zend_verify_internal_return_error(
|
||||
|
||||
zend_verify_type_error_common(
|
||||
zf, arg_info, ce, value,
|
||||
&fname, &fsep, &fclass, &need_msg, &need_kind, &need_or_null, &given_msg, &given_kind);
|
||||
&fname, &fsep, &fclass, &need_msg, &need_kind, &need_or_null, &given_msg, &given_kind);
|
||||
|
||||
zend_error_noreturn(E_CORE_ERROR, "Return value of %s%s%s() must %s%s%s, %s%s returned",
|
||||
fclass, fsep, fname, need_msg, need_kind, need_or_null, given_msg, given_kind);
|
||||
@@ -1011,7 +1011,7 @@ static zend_always_inline void zend_verify_return_type(zend_function *zf, zval *
|
||||
{
|
||||
zend_arg_info *ret_info = zf->common.arg_info - 1;
|
||||
zend_class_entry *ce = NULL;
|
||||
|
||||
|
||||
if (UNEXPECTED(!zend_check_type(ret_info->type, ret, &ce, cache_slot, NULL, NULL, 1))) {
|
||||
zend_verify_return_error(zf, ce, ret);
|
||||
}
|
||||
@@ -1360,7 +1360,7 @@ static zend_never_inline void zend_pre_incdec_overloaded_property(zval *object,
|
||||
|
||||
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
|
||||
zval *z, *zptr, obj;
|
||||
|
||||
|
||||
ZVAL_OBJ(&obj, Z_OBJ_P(object));
|
||||
Z_ADDREF(obj);
|
||||
zptr = z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, cache_slot, &rv);
|
||||
@@ -1570,7 +1570,7 @@ str_index:
|
||||
switch (Z_TYPE_P(dim)) {
|
||||
case IS_UNDEF:
|
||||
zval_undefined_cv(EX(opline)->op2.var EXECUTE_DATA_CC);
|
||||
/* break missing intentionally */
|
||||
/* break missing intentionally */
|
||||
case IS_NULL:
|
||||
offset_key = ZSTR_EMPTY_ALLOC();
|
||||
goto str_index;
|
||||
@@ -1947,7 +1947,7 @@ use_read_property:
|
||||
ZVAL_INDIRECT(result, ptr);
|
||||
}
|
||||
} else if (EXPECTED(Z_OBJ_HT_P(container)->read_property)) {
|
||||
goto use_read_property;
|
||||
goto use_read_property;
|
||||
} else {
|
||||
zend_error(E_WARNING, "This object doesn't support property references");
|
||||
ZVAL_ERROR(result);
|
||||
@@ -2353,7 +2353,7 @@ static void cleanup_unfinished_calls(zend_execute_data *execute_data, uint32_t o
|
||||
zend_op *opline = EX(func)->op_array.opcodes + op_num;
|
||||
int level;
|
||||
int do_exit;
|
||||
|
||||
|
||||
if (UNEXPECTED(opline->opcode == ZEND_INIT_FCALL ||
|
||||
opline->opcode == ZEND_INIT_FCALL_BY_NAME ||
|
||||
opline->opcode == ZEND_INIT_NS_FCALL_BY_NAME ||
|
||||
|
||||
@@ -812,7 +812,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
|
||||
ZEND_ADD_CALL_FLAG(call, call_info);
|
||||
}
|
||||
|
||||
if (func->type == ZEND_USER_FUNCTION) {
|
||||
if (func->type == ZEND_USER_FUNCTION) {
|
||||
int call_via_handler = (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) != 0;
|
||||
const zend_op *current_opline_before_exception = EG(opline_before_exception);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ extern ZEND_API zend_class_entry *zend_ce_ClosedGeneratorException;
|
||||
typedef struct _zend_generator_node zend_generator_node;
|
||||
typedef struct _zend_generator zend_generator;
|
||||
|
||||
/* The concept of `yield from` exposes problems when accessed at different levels of the chain of delegated generators. We need to be able to reference the currently executed Generator in all cases and still being able to access the return values of finished Generators.
|
||||
/* The concept of `yield from` exposes problems when accessed at different levels of the chain of delegated generators. We need to be able to reference the currently executed Generator in all cases and still being able to access the return values of finished Generators.
|
||||
* The solution to this problem is a doubly-linked tree, which all Generators referenced in maintain a reference to. It should be impossible to avoid walking the tree in all cases. This way, we only need tree walks from leaf to root in case where some part of the `yield from` chain is passed to another `yield from`. (Update of leaf node pointer and list of multi-children nodes needed when leaf gets a child in direct path from leaf to root node.) But only in that case, which should be a fairly rare case (which is then possible, but not totally cheap).
|
||||
* The root of the tree is then the currently executed Generator. The subnodes of the tree (all except the root node) are all Generators which do `yield from`. Each node of the tree knows a pointer to one leaf descendant node. Each node with multiple children needs a list of all leaf descendant nodes paired with pointers to their respective child node. (The stack is determined by leaf node pointers) Nodes with only one child just don't need a list, there it is enough to just have a pointer to the child node. Further, leaf nodes store a pointer to the root node.
|
||||
* That way, when we advance any generator, we just need to look up a leaf node (which all have a reference to a root node). Then we can see at the root node whether current Generator is finished. If it isn't, all is fine and we can just continue. If the Generator finished, there will be two cases. Either it is a simple node with just one child, then go down to child node. Or it has multiple children and we now will remove the current leaf node from the list of nodes (unnecessary, is microoptimization) and go down to the child node whose reference was paired with current leaf node. Child node is then removed its parent reference and becomes new top node. Or the current node references the Generator we're currently executing, then we can continue from the YIELD_FROM opcode. When a node referenced as root node in a leaf node has a parent, then we go the way up until we find a root node without parent.
|
||||
|
||||
@@ -312,7 +312,7 @@ static zend_always_inline zval *zend_hash_find_ind(const HashTable *ht, zend_str
|
||||
zval *zv;
|
||||
|
||||
zv = zend_hash_find(ht, key);
|
||||
return (zv && Z_TYPE_P(zv) == IS_INDIRECT) ?
|
||||
return (zv && Z_TYPE_P(zv) == IS_INDIRECT) ?
|
||||
((Z_TYPE_P(Z_INDIRECT_P(zv)) != IS_UNDEF) ? Z_INDIRECT_P(zv) : NULL) : zv;
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ static zend_always_inline zval *zend_hash_str_find_ind(const HashTable *ht, cons
|
||||
zval *zv;
|
||||
|
||||
zv = zend_hash_str_find(ht, str, len);
|
||||
return (zv && Z_TYPE_P(zv) == IS_INDIRECT) ?
|
||||
return (zv && Z_TYPE_P(zv) == IS_INDIRECT) ?
|
||||
((Z_TYPE_P(Z_INDIRECT_P(zv)) != IS_UNDEF) ? Z_INDIRECT_P(zv) : NULL) : zv;
|
||||
}
|
||||
|
||||
@@ -1024,7 +1024,7 @@ static zend_always_inline zval *_zend_hash_append(HashTable *ht, zend_string *ke
|
||||
if (!ZSTR_IS_INTERNED(key)) {
|
||||
ht->u.flags &= ~HASH_FLAG_STATIC_KEYS;
|
||||
zend_string_addref(key);
|
||||
zend_string_hash_val(key);
|
||||
zend_string_hash_val(key);
|
||||
}
|
||||
p->key = key;
|
||||
p->h = ZSTR_H(key);
|
||||
@@ -1046,7 +1046,7 @@ static zend_always_inline zval *_zend_hash_append_ptr(HashTable *ht, zend_string
|
||||
if (!ZSTR_IS_INTERNED(key)) {
|
||||
ht->u.flags &= ~HASH_FLAG_STATIC_KEYS;
|
||||
zend_string_addref(key);
|
||||
zend_string_hash_val(key);
|
||||
zend_string_hash_val(key);
|
||||
}
|
||||
p->key = key;
|
||||
p->h = ZSTR_H(key);
|
||||
@@ -1068,7 +1068,7 @@ static zend_always_inline void _zend_hash_append_ind(HashTable *ht, zend_string
|
||||
if (!ZSTR_IS_INTERNED(key)) {
|
||||
ht->u.flags &= ~HASH_FLAG_STATIC_KEYS;
|
||||
zend_string_addref(key);
|
||||
zend_string_hash_val(key);
|
||||
zend_string_hash_val(key);
|
||||
}
|
||||
p->key = key;
|
||||
p->h = ZSTR_H(key);
|
||||
|
||||
@@ -129,7 +129,7 @@ static void zend_ini_add_string(zval *result, zval *op1, zval *op2)
|
||||
}
|
||||
}
|
||||
op1_len = (int)Z_STRLEN_P(op1);
|
||||
|
||||
|
||||
if (Z_TYPE_P(op2) != IS_STRING) {
|
||||
convert_to_string(op2);
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ ZEND_API void rebuild_object_properties(zend_object *zobj) /* {{{ */
|
||||
zobj->properties->u.v.flags |= HASH_FLAG_HAS_EMPTY_IND;
|
||||
}
|
||||
|
||||
_zend_hash_append_ind(zobj->properties, prop_info->name,
|
||||
_zend_hash_append_ind(zobj->properties, prop_info->name,
|
||||
OBJ_PROP(zobj, prop_info->offset));
|
||||
}
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
@@ -616,7 +616,7 @@ zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_
|
||||
*guard |= IN_ISSET;
|
||||
zend_std_call_issetter(&tmp_object, member, &tmp_result);
|
||||
*guard &= ~IN_ISSET;
|
||||
|
||||
|
||||
if (!zend_is_true(&tmp_result)) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
zval_ptr_dtor(&tmp_object);
|
||||
|
||||
@@ -112,7 +112,7 @@ ZEND_API void destroy_zend_function(zend_function *function)
|
||||
zend_string_release(function->common.function_name);
|
||||
|
||||
if (function->common.arg_info &&
|
||||
(function->common.fn_flags & (ZEND_ACC_HAS_RETURN_TYPE|ZEND_ACC_HAS_TYPE_HINTS))) {
|
||||
(function->common.fn_flags & (ZEND_ACC_HAS_RETURN_TYPE|ZEND_ACC_HAS_TYPE_HINTS))) {
|
||||
uint32_t i;
|
||||
uint32_t num_args = function->common.num_args + 1;
|
||||
zend_arg_info *arg_info = function->common.arg_info - 1;
|
||||
|
||||
@@ -3001,7 +3001,7 @@ process_double:
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/*
|
||||
/*
|
||||
* String matching - Sunday algorithm
|
||||
* http://www.iti.fh-flensburg.de/lang/algorithmen/pattern/sundayen.htm
|
||||
*/
|
||||
@@ -3085,7 +3085,7 @@ ZEND_API const char* ZEND_FASTCALL zend_memnrstr_ex(const char *haystack, const
|
||||
if (i == needle_len) {
|
||||
return (const char *)p;
|
||||
}
|
||||
|
||||
|
||||
if (UNEXPECTED(p == haystack)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ static void zend_signal_handler(int signo, siginfo_t *siginfo, void *context)
|
||||
if (NULL == TSRMLS_CACHE || NULL == TSRMG_BULK_STATIC(zend_signal_globals_id, zend_signal_globals_t *)) {
|
||||
p_sig.flags = 0;
|
||||
p_sig.handler = SIG_DFL;
|
||||
} else
|
||||
} else
|
||||
#endif
|
||||
p_sig = SIGG(handlers)[signo-1];
|
||||
|
||||
|
||||
@@ -231,58 +231,58 @@ ZEND_API void zend_insert_sort(void *base, size_t nmemb, size_t siz, compare_fun
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ ZEND_API void zend_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_t swp)
|
||||
/* {{{ ZEND_API void zend_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_t swp)
|
||||
*
|
||||
* Derived from LLVM's libc++ implementation of std::sort.
|
||||
*
|
||||
* ===========================================================================
|
||||
* libc++ License
|
||||
* ===========================================================================
|
||||
*
|
||||
*
|
||||
* The libc++ library is dual licensed under both the University of Illinois
|
||||
* "BSD-Like" license and the MIT license. As a user of this code you may
|
||||
* choose to use it under either license. As a contributor, you agree to allow
|
||||
* your code to be used under both.
|
||||
*
|
||||
*
|
||||
* Full text of the relevant licenses is included below.
|
||||
*
|
||||
*
|
||||
* ===========================================================================
|
||||
*
|
||||
*
|
||||
* University of Illinois/NCSA
|
||||
* Open Source License
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2009-2012 by the contributors listed at
|
||||
* http://llvm.org/svn/llvm-project/libcxx/trunk/CREDITS.TXT
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Developed by:
|
||||
*
|
||||
*
|
||||
* LLVM Team
|
||||
*
|
||||
*
|
||||
* University of Illinois at Urbana-Champaign
|
||||
*
|
||||
*
|
||||
* http://llvm.org
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
* deal with the Software without restriction, including without limitation the
|
||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimers.
|
||||
*
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimers in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
*
|
||||
* * Neither the names of the LLVM Team, University of Illinois at
|
||||
* Urbana-Champaign, nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this Software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@@ -290,22 +290,22 @@ ZEND_API void zend_insert_sort(void *base, size_t nmemb, size_t siz, compare_fun
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* WITH THE SOFTWARE.
|
||||
*
|
||||
*
|
||||
* ===========================================================================
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2009-2012 by the contributors listed at
|
||||
* http://llvm.org/svn/llvm-project/libcxx/trunk/CREDITS.TXT
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
* deal in the Software without restriction, including without limitation the
|
||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
|
||||
@@ -27,7 +27,7 @@ static zend_string *zend_new_interned_string_permanent(zend_string *str);
|
||||
static zend_string *zend_new_interned_string_request(zend_string *str);
|
||||
|
||||
/* Any strings interned in the startup phase. Common to all the threads,
|
||||
won't be free'd until process exit. If we want an ability to
|
||||
won't be free'd until process exit. If we want an ability to
|
||||
add permanent strings even after startup, it would be still
|
||||
possible on costs of locking in the thread safe builds. */
|
||||
static HashTable interned_strings_permanent;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#endif
|
||||
|
||||
/* TODO check to undef this option, this might
|
||||
make more perf. destroy_freelist()
|
||||
make more perf. destroy_freelist()
|
||||
should be adapted then. */
|
||||
#define Omit_Private_Memory 1
|
||||
|
||||
@@ -140,7 +140,7 @@ typedef unsigned long int uint32_t;
|
||||
} else if (1 == x) { \
|
||||
tsrm_mutex_unlock(pow5mult_mutex); \
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -988,7 +988,7 @@ ZEND_VM_INLINE_HELPER(zend_binary_assign_op_helper, VAR|UNUSED|THIS|CV, CONST|TM
|
||||
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, binary_op);
|
||||
}
|
||||
# endif
|
||||
|
||||
|
||||
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_obj_helper, binary_op, binary_op);
|
||||
#endif
|
||||
}
|
||||
@@ -1555,7 +1555,7 @@ ZEND_VM_HELPER(zend_fetch_static_prop_helper, CONST|TMPVAR|CV, UNUSED|CONST|VAR,
|
||||
varname = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
|
||||
|
||||
retval = zend_fetch_static_property_address(varname, OP1_TYPE, opline->op2, OP2_TYPE, type EXECUTE_DATA_CC);
|
||||
|
||||
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
if (EG(exception)) {
|
||||
FREE_OP1();
|
||||
@@ -2490,7 +2490,7 @@ ZEND_VM_HOT_HANDLER(43, ZEND_JMPZ, CONST|TMPVAR|CV, JMP_ADDR)
|
||||
zval *val;
|
||||
|
||||
val = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
|
||||
|
||||
|
||||
if (Z_TYPE_INFO_P(val) == IS_TRUE) {
|
||||
ZEND_VM_SET_NEXT_OPCODE(opline + 1);
|
||||
ZEND_VM_CONTINUE();
|
||||
@@ -3213,7 +3213,7 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, UNUSED|CLASS_FETCH|CONST|VAR,
|
||||
|
||||
if (OP1_TYPE == IS_UNUSED) {
|
||||
/* previous opcode is ZEND_FETCH_CLASS */
|
||||
if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
|
||||
if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
|
||||
(opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
|
||||
if (Z_TYPE(EX(This)) == IS_OBJECT) {
|
||||
ce = Z_OBJCE(EX(This));
|
||||
@@ -3675,7 +3675,7 @@ ZEND_VM_HOT_HANDLER(60, ZEND_DO_FCALL, ANY, ANY, SPEC(RETVAL))
|
||||
} else {
|
||||
zend_execute_internal(call, ret);
|
||||
}
|
||||
|
||||
|
||||
#if ZEND_DEBUG
|
||||
if (!EG(exception) && call->func) {
|
||||
ZEND_ASSERT(!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
|
||||
@@ -6322,7 +6322,7 @@ ZEND_VM_HANDLER(180, ZEND_ISSET_ISEMPTY_STATIC_PROP, CONST|TMPVAR|CV, UNUSED|CLA
|
||||
|
||||
if (OP1_TYPE == IS_CONST && value) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
|
||||
}
|
||||
}
|
||||
|
||||
if (OP1_TYPE != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
|
||||
zend_string_release(Z_STR(tmp));
|
||||
|
||||
@@ -1221,7 +1221,7 @@ function gen_labels($f, $spec, $kind, $prolog, &$specs, $switch_labels = array()
|
||||
$label++;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Emit pointer to specialized handler
|
||||
$spec_name = $dsc["op"]."_SPEC".$prefix[$op1].$prefix[$op2].extra_spec_name($extra_spec);
|
||||
switch ($kind) {
|
||||
@@ -1884,7 +1884,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
|
||||
"# endif\n" .
|
||||
$m[1]."return;\n" .
|
||||
"#else\n" .
|
||||
$m[1]."if (EXPECTED(ret > 0)) {\n" .
|
||||
$m[1]."if (EXPECTED(ret > 0)) {\n" .
|
||||
$m[1]."\texecute_data = EG(current_execute_data);\n".
|
||||
$m[1]."\tZEND_VM_LOOP_INTERRUPT_CHECK();\n".
|
||||
$m[1]."} else {\n" .
|
||||
@@ -2291,7 +2291,7 @@ function gen_vm($def, $skel) {
|
||||
fputs($f, "ZEND_API const char *zend_get_opcode_name(zend_uchar opcode);\n");
|
||||
fputs($f, "ZEND_API uint32_t zend_get_opcode_flags(zend_uchar opcode);\n\n");
|
||||
fputs($f, "END_EXTERN_C()\n\n");
|
||||
|
||||
|
||||
foreach ($opcodes as $code => $dsc) {
|
||||
$code = str_pad((string)$code,$code_len," ",STR_PAD_LEFT);
|
||||
$op = str_pad($dsc["op"],$max_opcode_len);
|
||||
@@ -2315,13 +2315,13 @@ function gen_vm($def, $skel) {
|
||||
out($f, HEADER_TEXT);
|
||||
fputs($f,"#include <stdio.h>\n");
|
||||
fputs($f,"#include <zend.h>\n\n");
|
||||
|
||||
|
||||
fputs($f,"static const char *zend_vm_opcodes_names[".($max_opcode + 1)."] = {\n");
|
||||
for ($i = 0; $i <= $max_opcode; $i++) {
|
||||
fputs($f,"\t".(isset($opcodes[$i]["op"])?'"'.$opcodes[$i]["op"].'"':"NULL").",\n");
|
||||
}
|
||||
fputs($f, "};\n\n");
|
||||
|
||||
|
||||
fputs($f,"static uint32_t zend_vm_opcodes_flags[".($max_opcode + 1)."] = {\n");
|
||||
for ($i = 0; $i <= $max_opcode; $i++) {
|
||||
fprintf($f, "\t0x%08x,\n", isset($opcodes[$i]["flags"]) ? $opcodes[$i]["flags"] : 0);
|
||||
@@ -2335,7 +2335,7 @@ function gen_vm($def, $skel) {
|
||||
fputs($f, "ZEND_API uint32_t zend_get_opcode_flags(zend_uchar opcode) {\n");
|
||||
fputs($f, "\treturn zend_vm_opcodes_flags[opcode];\n");
|
||||
fputs($f, "}\n");
|
||||
|
||||
|
||||
fclose($f);
|
||||
echo "zend_vm_opcodes.c generated successfully.\n";
|
||||
|
||||
@@ -2366,7 +2366,7 @@ function gen_vm($def, $skel) {
|
||||
out($f, "# pragma warning(once : 6326)\n");
|
||||
}
|
||||
out($f, "#endif\n");
|
||||
|
||||
|
||||
// Support for ZEND_USER_OPCODE
|
||||
out($f, "static user_opcode_handler_t zend_user_opcode_handlers[256] = {\n");
|
||||
for ($i = 0; $i < 255; ++$i) {
|
||||
|
||||
110
acinclude.m4
110
acinclude.m4
@@ -12,7 +12,7 @@ dnl
|
||||
dnl PHP_HELP_SEPARATOR(title)
|
||||
dnl
|
||||
dnl Adds separator title into the configure --help display.
|
||||
dnl
|
||||
dnl
|
||||
AC_DEFUN([PHP_HELP_SEPARATOR],[
|
||||
AC_ARG_ENABLE([],[
|
||||
$1
|
||||
@@ -148,7 +148,7 @@ $EGREP $pattern'.*include/php' $srcdir/configure|$SED 's/.*>//'|xargs touch 2>/d
|
||||
|
||||
dnl
|
||||
dnl PHP_GEN_GLOBAL_MAKEFILE
|
||||
dnl
|
||||
dnl
|
||||
dnl Generates the global makefile.
|
||||
dnl
|
||||
AC_DEFUN([PHP_GEN_GLOBAL_MAKEFILE],[
|
||||
@@ -183,10 +183,10 @@ AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[
|
||||
dnl
|
||||
dnl PHP_ADD_SOURCES(source-path, sources [, special-flags [, type]])
|
||||
dnl
|
||||
dnl Adds sources which are located relative to source-path to the
|
||||
dnl array of type type. Sources are processed with optional
|
||||
dnl Adds sources which are located relative to source-path to the
|
||||
dnl array of type type. Sources are processed with optional
|
||||
dnl special-flags which are passed to the compiler. Sources
|
||||
dnl can be either written in C or C++ (filenames shall end in .c
|
||||
dnl can be either written in C or C++ (filenames shall end in .c
|
||||
dnl or .cpp, respectively).
|
||||
dnl
|
||||
dnl Note: If source-path begins with a "/", the "/" is removed and
|
||||
@@ -227,7 +227,7 @@ dnl name of the array target-var directly, as well as whether
|
||||
dnl shared objects will be built from the sources.
|
||||
dnl
|
||||
dnl Should not be used directly.
|
||||
dnl
|
||||
dnl
|
||||
AC_DEFUN([PHP_ADD_SOURCES_X],[
|
||||
dnl relative to source- or build-directory?
|
||||
dnl ac_srcdir/ac_bdir include trailing slash
|
||||
@@ -236,20 +236,20 @@ dnl ac_srcdir/ac_bdir include trailing slash
|
||||
/*[)] ac_srcdir=`echo "$1"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
|
||||
*[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$1/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
|
||||
esac
|
||||
|
||||
|
||||
dnl how to build .. shared or static?
|
||||
ifelse($5,yes,_PHP_ASSIGN_BUILD_VARS(shared),_PHP_ASSIGN_BUILD_VARS(php))
|
||||
|
||||
dnl iterate over the sources
|
||||
old_IFS=[$]IFS
|
||||
for ac_src in $2; do
|
||||
|
||||
|
||||
dnl remove the suffix
|
||||
IFS=.
|
||||
set $ac_src
|
||||
ac_obj=[$]1
|
||||
IFS=$old_IFS
|
||||
|
||||
|
||||
dnl append to the array which has been dynamically chosen at m4 time
|
||||
$4="[$]$4 [$]ac_bdir[$]ac_obj.lo"
|
||||
|
||||
@@ -364,7 +364,7 @@ AC_DEFUN([PHP_LIBGCC_LIBPATH],[
|
||||
])
|
||||
|
||||
dnl -------------------------------------------------------------------------
|
||||
dnl Macros to modify LIBS, INCLUDES, etc. variables
|
||||
dnl Macros to modify LIBS, INCLUDES, etc. variables
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
dnl
|
||||
@@ -486,7 +486,7 @@ dnl cc-specific
|
||||
dnl
|
||||
dnl PHP_ADD_INCLUDE(path [,before])
|
||||
dnl
|
||||
dnl add an include path.
|
||||
dnl add an include path.
|
||||
dnl if before is 1, add in the beginning of INCLUDES.
|
||||
dnl
|
||||
AC_DEFUN([PHP_ADD_INCLUDE],[
|
||||
@@ -774,7 +774,7 @@ AC_DEFUN([PHP_BUILD_SHARED],[
|
||||
PHP_BUILD_PROGRAM
|
||||
OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la]
|
||||
php_sapi_module=shared
|
||||
|
||||
|
||||
php_c_pre=$shared_c_pre
|
||||
php_c_meta=$shared_c_meta
|
||||
php_c_post=$shared_c_post
|
||||
@@ -885,7 +885,7 @@ AC_DEFUN([PHP_SELECT_SAPI],[
|
||||
])
|
||||
else
|
||||
PHP_SAPI=$1
|
||||
fi
|
||||
fi
|
||||
|
||||
PHP_ADD_BUILD_DIR([sapi/$1])
|
||||
|
||||
@@ -942,7 +942,7 @@ dnl to build the extension.
|
||||
dnl "shared" can be set to "shared" or "yes" to build the extension as
|
||||
dnl a dynamically loadable library. Optional parameter "sapi_class" can
|
||||
dnl be set to "cli" to mark extension build only with CLI or CGI sapi's.
|
||||
dnl "extra-cflags" are passed to the compiler, with
|
||||
dnl "extra-cflags" are passed to the compiler, with
|
||||
dnl @ext_srcdir@ and @ext_builddir@ being substituted.
|
||||
dnl "cxx" can be used to indicate that a C++ shared module is desired.
|
||||
dnl "zend_ext" indicates a zend extension.
|
||||
@@ -988,7 +988,7 @@ dnl ---------------------------------------------- CLI static module
|
||||
PHP_ADD_BUILD_DIR($ext_builddir)
|
||||
|
||||
dnl Set for phpize builds only
|
||||
dnl ---------------------------
|
||||
dnl ---------------------------
|
||||
if test "$ext_builddir" = "."; then
|
||||
PHP_PECL_EXTENSION=$1
|
||||
PHP_SUBST(PHP_PECL_EXTENSION)
|
||||
@@ -1018,7 +1018,7 @@ 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 To be effective, this macro must be invoked *after* PHP_NEW_EXTENSION.
|
||||
dnl The extension on which it depends must also have been configured.
|
||||
dnl See ADD_EXTENSION_DEP in win32 build
|
||||
dnl See ADD_EXTENSION_DEP in win32 build
|
||||
dnl
|
||||
AC_DEFUN([PHP_ADD_EXTENSION_DEP], [
|
||||
am_i_shared=$[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]
|
||||
@@ -1180,7 +1180,7 @@ main() {
|
||||
struct tm t, *s;
|
||||
time_t old = 0;
|
||||
char buf[27], *p;
|
||||
|
||||
|
||||
s = gmtime_r(&old, &t);
|
||||
p = asctime_r(&t, buf, 26);
|
||||
if (p == buf && s == &t) return (0);
|
||||
@@ -1245,7 +1245,7 @@ AC_DEFUN([PHP_DOES_PREAD_WORK],[
|
||||
#include <errno.h>
|
||||
$1
|
||||
main() {
|
||||
char buf[3];
|
||||
char buf[3];
|
||||
int fd = open("conftest_in", O_RDONLY);
|
||||
if (fd < 0) exit(1);
|
||||
if (pread(fd, buf, 2, 0) != 2) exit(1);
|
||||
@@ -1282,7 +1282,7 @@ AC_DEFUN([PHP_PWRITE_TEST],[
|
||||
if test "$ac_cv_pwrite" = "64"; then
|
||||
AC_DEFINE(PHP_PWRITE_64, 1, [whether pwrite64 is default])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
@@ -1304,7 +1304,7 @@ AC_DEFUN([PHP_PREAD_TEST],[
|
||||
if test "$ac_cv_pread" = "64"; then
|
||||
AC_DEFINE(PHP_PREAD_64, 1, [whether pread64 is default])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
@@ -1342,7 +1342,7 @@ AC_DEFUN([PHP_MISSING_TIME_R_DECL],[
|
||||
|
||||
dnl
|
||||
dnl PHP_READDIR_R_TYPE
|
||||
dnl
|
||||
dnl
|
||||
AC_DEFUN([PHP_READDIR_R_TYPE],[
|
||||
dnl HAVE_READDIR_R is also defined by libmysql
|
||||
AC_CHECK_FUNC(readdir_r,ac_cv_func_readdir_r=yes,ac_cv_func_readdir=no)
|
||||
@@ -1363,7 +1363,7 @@ main() {
|
||||
struct dirent *pentry = (struct dirent *) &entry;
|
||||
|
||||
dir = opendir("/");
|
||||
if (!dir)
|
||||
if (!dir)
|
||||
exit(1);
|
||||
if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0) {
|
||||
close(dir);
|
||||
@@ -1400,7 +1400,7 @@ int readdir_r(DIR *, struct dirent *);
|
||||
|
||||
dnl
|
||||
dnl PHP_TM_GMTOFF
|
||||
dnl
|
||||
dnl
|
||||
AC_DEFUN([PHP_TM_GMTOFF],[
|
||||
AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
|
||||
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||
@@ -1503,7 +1503,7 @@ AC_DEFUN([PHP_AC_BROKEN_SNPRINTF],[
|
||||
main() {
|
||||
char buf[20];
|
||||
int res = 0;
|
||||
res = res || (snprintf(buf, 2, "marcus") != 6);
|
||||
res = res || (snprintf(buf, 2, "marcus") != 6);
|
||||
res = res || (buf[1] != '\0');
|
||||
/* Implementations may consider this as an encoding error */
|
||||
snprintf(buf, 0, "boerger");
|
||||
@@ -1511,7 +1511,7 @@ main() {
|
||||
res = res || (buf[0] != 'm');
|
||||
res = res || (snprintf(NULL, 0, "boerger") != 7);
|
||||
res = res || (snprintf(buf, sizeof(buf), "%f", 0.12345678) != 8);
|
||||
exit(res);
|
||||
exit(res);
|
||||
}
|
||||
],[
|
||||
ac_cv_broken_snprintf=no
|
||||
@@ -1618,7 +1618,7 @@ AC_DEFUN([PHP_SOCKADDR_CHECKS], [
|
||||
if test "$ac_cv_sockaddr_storage" = "yes"; then
|
||||
AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [Whether you have struct sockaddr_storage])
|
||||
fi
|
||||
dnl Check if field sa_len exists in struct sockaddr
|
||||
dnl Check if field sa_len exists in struct sockaddr
|
||||
AC_CACHE_CHECK([for field sa_len in struct sockaddr],ac_cv_sockaddr_sa_len,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/socket.h>],
|
||||
@@ -1659,9 +1659,9 @@ dnl
|
||||
AC_DEFUN([PHP_EBCDIC], [
|
||||
AC_CACHE_CHECK([whether system uses EBCDIC],ac_cv_ebcdic,[
|
||||
AC_TRY_RUN( [
|
||||
int main(void) {
|
||||
return (unsigned char)'A' != (unsigned char)0xC1;
|
||||
}
|
||||
int main(void) {
|
||||
return (unsigned char)'A' != (unsigned char)0xC1;
|
||||
}
|
||||
],[
|
||||
ac_cv_ebcdic=yes
|
||||
],[
|
||||
@@ -1705,7 +1705,7 @@ int main(int argc, char *argv[])
|
||||
FILE *fp;
|
||||
long position;
|
||||
char *filename = tmpnam(NULL);
|
||||
|
||||
|
||||
fp = fopen(filename, "w");
|
||||
if (fp == NULL) {
|
||||
perror("fopen");
|
||||
@@ -1799,7 +1799,7 @@ main() {
|
||||
], [
|
||||
cookie_io_functions_use_off64_t=no
|
||||
])
|
||||
|
||||
|
||||
else
|
||||
|
||||
dnl older glibc versions (up to 2.1.2 ?)
|
||||
@@ -1836,7 +1836,7 @@ dnl
|
||||
AC_DEFUN([PHP_CHECK_LIBRARY], [
|
||||
save_old_LDFLAGS=$LDFLAGS
|
||||
ac_stuff="$5"
|
||||
|
||||
|
||||
save_ext_shared=$ext_shared
|
||||
ext_shared=yes
|
||||
PHP_EVAL_LIBLINE([$]ac_stuff, LDFLAGS)
|
||||
@@ -1926,11 +1926,11 @@ AC_DEFUN([PHP_CHECK_FUNC],[
|
||||
unset ac_cv_func_$1
|
||||
unset ac_cv_func___$1
|
||||
unset found
|
||||
|
||||
|
||||
AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ])
|
||||
|
||||
case $found in
|
||||
yes[)]
|
||||
yes[)]
|
||||
PHP_DEF_HAVE($1)
|
||||
ac_cv_func_$1=yes
|
||||
;;
|
||||
@@ -2001,7 +2001,7 @@ dnl
|
||||
dnl PHP_CHECK_64BIT([do if 32], [do if 64])
|
||||
dnl
|
||||
dnl This macro is used to detect if we're at 64-bit platform or not.
|
||||
dnl It could be useful for those external libs, that have different precompiled
|
||||
dnl It could be useful for those external libs, that have different precompiled
|
||||
dnl versions in different directories.
|
||||
dnl
|
||||
AC_DEFUN([PHP_CHECK_64BIT],[
|
||||
@@ -2071,9 +2071,9 @@ AC_DEFUN([PHP_PROG_AWK], [
|
||||
*mawk)
|
||||
AC_MSG_WARN([mawk is known to have problems on some systems. You should install GNU awk])
|
||||
;;
|
||||
*gawk)
|
||||
*gawk)
|
||||
;;
|
||||
bork)
|
||||
bork)
|
||||
AC_MSG_ERROR([Could not find awk; Install GNU awk])
|
||||
;;
|
||||
*)
|
||||
@@ -2108,7 +2108,7 @@ dnl
|
||||
AC_DEFUN([PHP_PROG_LEX], [
|
||||
dnl we only support certain flex versions
|
||||
flex_version_list="2.5.4"
|
||||
|
||||
|
||||
AC_PROG_LEX
|
||||
if test "$LEX" = "flex"; then
|
||||
dnl AC_DECL_YYTEXT is obsolete since autoconf 2.50 and merged into AC_PROG_LEX
|
||||
@@ -2138,7 +2138,7 @@ dnl it should be removed once we drop support of autoconf 2.13 (if ever)
|
||||
else
|
||||
flex_version=none
|
||||
fi
|
||||
|
||||
|
||||
case $php_cv_flex_version in
|
||||
""|invalid[)]
|
||||
if test -f "$abs_srcdir/Zend/zend_language_scanner.c" && test -f "$abs_srcdir/Zend/zend_ini_scanner.c"; then
|
||||
@@ -2172,7 +2172,7 @@ AC_DEFUN([PHP_PROG_RE2C],[
|
||||
php_cv_re2c_version=invalid
|
||||
else
|
||||
php_cv_re2c_version="`$RE2C --version | cut -d ' ' -f 2 2>/dev/null` (ok)"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
fi
|
||||
case $php_cv_re2c_version in
|
||||
@@ -2301,7 +2301,7 @@ ifelse([$3],[],,[else $3])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl
|
||||
dnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]])
|
||||
dnl
|
||||
dnl Common setup macro for openssl
|
||||
@@ -2348,7 +2348,7 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
|
||||
|
||||
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"
|
||||
fi
|
||||
@@ -2387,7 +2387,7 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
|
||||
CPPFLAGS=$old_CPPFLAGS
|
||||
|
||||
PHP_ADD_INCLUDE($OPENSSL_INCDIR)
|
||||
|
||||
|
||||
PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [
|
||||
PHP_ADD_LIBRARY(crypto,,$1)
|
||||
],[
|
||||
@@ -2422,7 +2422,7 @@ ifelse([$3],[],,[else $3])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl
|
||||
dnl PHP_SETUP_ICONV(shared-add [, action-found [, action-not-found]])
|
||||
dnl
|
||||
dnl Common setup macro for iconv
|
||||
@@ -2486,7 +2486,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [
|
||||
if test -z "$ICONV_DIR"; then
|
||||
AC_MSG_ERROR([Please specify the install prefix of iconv with --with-iconv=<DIR>])
|
||||
fi
|
||||
|
||||
|
||||
if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a ||
|
||||
test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME
|
||||
then
|
||||
@@ -2520,7 +2520,7 @@ ifelse([$3],[],,[else $3])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl
|
||||
dnl PHP_SETUP_LIBXML(shared-add [, action-found [, action-not-found]])
|
||||
dnl
|
||||
dnl Common setup macro for libxml
|
||||
@@ -2602,7 +2602,7 @@ dnl -------------------------------------------------------------------------
|
||||
dnl Misc. macros
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
dnl
|
||||
dnl
|
||||
dnl PHP_INSTALL_HEADERS(path [, file ...])
|
||||
dnl
|
||||
dnl PHP header files to be installed
|
||||
@@ -2613,7 +2613,7 @@ AC_DEFUN([PHP_INSTALL_HEADERS],[
|
||||
PHP_RUN_ONCE(INSTALLHEADERS, $header_file, [
|
||||
INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
|
||||
])
|
||||
done
|
||||
done
|
||||
], [
|
||||
header_path=$1
|
||||
for header_file in $2; do
|
||||
@@ -2621,7 +2621,7 @@ AC_DEFUN([PHP_INSTALL_HEADERS],[
|
||||
PHP_RUN_ONCE(INSTALLHEADERS, $hp_hf, [
|
||||
INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
|
||||
])
|
||||
done
|
||||
done
|
||||
])
|
||||
])
|
||||
|
||||
@@ -2644,7 +2644,7 @@ IFS="- /.
|
||||
|
||||
dnl
|
||||
dnl PHP_DEBUG_MACRO(filename)
|
||||
dnl
|
||||
dnl
|
||||
AC_DEFUN([PHP_DEBUG_MACRO],[
|
||||
DEBUG_LOG=$1
|
||||
cat >$1 <<X
|
||||
@@ -2706,7 +2706,7 @@ EOF
|
||||
echo "'[$]0' \\" >> $1
|
||||
if test `expr " [$]0" : " '.*"` = 0; then
|
||||
CONFIGURE_COMMAND="$CONFIGURE_COMMAND '[$]0'"
|
||||
else
|
||||
else
|
||||
CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0"
|
||||
fi
|
||||
CONFIGURE_ARGS="$clean_configure_args"
|
||||
@@ -2774,7 +2774,7 @@ AC_DEFUN([PHP_CHECK_CONFIGURE_OPTIONS],[
|
||||
if test "$PHP_MAJOR_VERSION" -lt "6"; then
|
||||
case $arg_name in
|
||||
enable-zend-multibyte[)] continue;;
|
||||
esac
|
||||
esac
|
||||
fi
|
||||
|
||||
is_arg_set=php_[]`echo [$]arg_name | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ-' 'abcdefghijklmnopqrstuvwxyz_'`
|
||||
@@ -2856,7 +2856,7 @@ AC_DEFUN([PHP_CRYPT_R_STYLE],
|
||||
],[
|
||||
CRYPTD buffer;
|
||||
crypt_r("passwd", "hash", &buffer);
|
||||
],
|
||||
],
|
||||
php_cv_crypt_r_style=cryptd)
|
||||
|
||||
if test "$php_cv_crypt_r_style" = "none"; then
|
||||
@@ -2866,7 +2866,7 @@ php_cv_crypt_r_style=cryptd)
|
||||
],[
|
||||
struct crypt_data buffer;
|
||||
crypt_r("passwd", "hash", &buffer);
|
||||
],
|
||||
],
|
||||
php_cv_crypt_r_style=struct_crypt_data)
|
||||
fi
|
||||
|
||||
@@ -2878,7 +2878,7 @@ php_cv_crypt_r_style=struct_crypt_data)
|
||||
],[
|
||||
struct crypt_data buffer;
|
||||
crypt_r("passwd", "hash", &buffer);
|
||||
],
|
||||
],
|
||||
php_cv_crypt_r_style=struct_crypt_data_gnu_source)
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -20,7 +20,7 @@ if not exist "%SDK_RUNNER%" (
|
||||
|
||||
if not exist "%PHP_BUILD_CACHE_SDK_DIR%" (
|
||||
echo Cloning remote SDK repository
|
||||
git clone --branch %SDK_BRANCH% %SDK_REMOTE% "%PHP_BUILD_CACHE_SDK_DIR%" 2>&1
|
||||
git clone --branch %SDK_BRANCH% %SDK_REMOTE% "%PHP_BUILD_CACHE_SDK_DIR%" 2>&1
|
||||
)
|
||||
|
||||
for /f "tokens=*" %%a in ('type %PHP_BUILD_CACHE_SDK_DIR%\VERSION') do set GOT_SDK_VER=%%a
|
||||
@@ -30,7 +30,7 @@ if NOT "%GOT_SDK_VER%" == "%PHP_BUILD_SDK_BRANCH:~8%" (
|
||||
echo Fetching remote SDK repository
|
||||
git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" fetch --prune origin 2>&1
|
||||
echo Checkout SDK repository branch
|
||||
git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" checkout --force %SDK_BRANCH%
|
||||
git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" checkout --force %SDK_BRANCH%
|
||||
)
|
||||
|
||||
if not exist "%SDK_RUNNER%" (
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id$
|
||||
# $Id$
|
||||
#
|
||||
|
||||
include generated_lists
|
||||
@@ -35,7 +35,7 @@ SUPPRESS_WARNINGS ?= 2>&1 | (egrep -v '(AC_TRY_RUN called without default to all
|
||||
all: $(targets)
|
||||
|
||||
$(config_h_in): configure
|
||||
# explicitly remove target since autoheader does not seem to work
|
||||
# explicitly remove target since autoheader does not seem to work
|
||||
# correctly otherwise (timestamps are not updated)
|
||||
@echo rebuilding $@
|
||||
@rm -f $@
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# | Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id: buildcheck.sh,v 1.37.2.2.2.1 2007-01-01 19:32:10 iliaa Exp $
|
||||
# $Id: buildcheck.sh,v 1.37.2.2.2.1 2007-01-01 19:32:10 iliaa Exp $
|
||||
#
|
||||
|
||||
echo "buildconf: checking installation..."
|
||||
|
||||
@@ -35,16 +35,16 @@
|
||||
}
|
||||
|
||||
dif=i-1
|
||||
|
||||
|
||||
for (; i <= NF; i++)
|
||||
filenames[i-dif]=$i
|
||||
|
||||
|
||||
no_files=NF-dif
|
||||
|
||||
|
||||
for(i = 1; i <= no_files; i++) {
|
||||
if (system("test -r " filenames[i]) != 0)
|
||||
continue
|
||||
|
||||
|
||||
target=filenames[i]
|
||||
sub(srcdir "/", "", target)
|
||||
target2=target
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
for (e in used)
|
||||
delete used[e]
|
||||
|
||||
|
||||
cmdx=cmd " " filenames[i]
|
||||
done=0
|
||||
while ((cmdx | getline) > 0) {
|
||||
@@ -66,10 +66,10 @@
|
||||
done=1
|
||||
printf(" \\\n\t" substr($3,2,length($3)-2))
|
||||
used[$3] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (done == 1)
|
||||
print "\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ function count(arr, n, i)
|
||||
END {
|
||||
# order it correctly
|
||||
out_count = 0;
|
||||
|
||||
|
||||
while (count(mods)) {
|
||||
for (i = 0; i <= mod_count - 1; i++) {
|
||||
if (i in mods) {
|
||||
|
||||
@@ -2,7 +2,7 @@ BEGIN {
|
||||
mode=0
|
||||
sources=""
|
||||
}
|
||||
|
||||
|
||||
mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ {
|
||||
if (match($0, "[^=]*$")) {
|
||||
sources=substr($0, RSTART, RLENGTH-1)
|
||||
|
||||
22
configure.ac
22
configure.ac
@@ -159,7 +159,7 @@ 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 -------------------------------------------------------------------------
|
||||
|
||||
@@ -688,7 +688,7 @@ dnl Check for getaddrinfo, should be a better way, but...
|
||||
dnl Also check for working getaddrinfo
|
||||
AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo,
|
||||
[AC_TRY_LINK([#include <netdb.h>],
|
||||
[struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g);],
|
||||
[struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g);],
|
||||
AC_TRY_RUN([
|
||||
#include <netdb.h>
|
||||
#include <sys/types.h>
|
||||
@@ -710,7 +710,7 @@ int main(void) {
|
||||
}
|
||||
|
||||
pai = ai;
|
||||
|
||||
|
||||
while (pai) {
|
||||
if (pai->ai_family != AF_INET) {
|
||||
/* 127.0.0.1/NUMERICHOST should only resolve ONE way */
|
||||
@@ -797,7 +797,7 @@ if test "$PHP_GCOV" = "yes"; then
|
||||
if test "$GCC" != "yes"; then
|
||||
AC_MSG_ERROR([GCC is required for --enable-gcov])
|
||||
fi
|
||||
|
||||
|
||||
dnl Check if ccache is being used
|
||||
case `$php_shtool path $CC` in
|
||||
*ccache*[)] gcc_ccache=yes;;
|
||||
@@ -807,7 +807,7 @@ if test "$PHP_GCOV" = "yes"; then
|
||||
if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then
|
||||
AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
|
||||
fi
|
||||
|
||||
|
||||
dnl min: 1.5 (i.e. 105, major * 100 + minor for easier comparison)
|
||||
ltp_version_min="105"
|
||||
dnl non-working versions, e.g. "1.8 1.18";
|
||||
@@ -840,7 +840,7 @@ if test "$PHP_GCOV" = "yes"; then
|
||||
fi
|
||||
])
|
||||
else
|
||||
ltp_msg="To enable code coverage reporting you must have LTP installed"
|
||||
ltp_msg="To enable code coverage reporting you must have LTP installed"
|
||||
AC_MSG_ERROR([$ltp_msg])
|
||||
fi
|
||||
|
||||
@@ -930,7 +930,7 @@ fi
|
||||
AC_MSG_CHECKING([where to scan for configuration files])
|
||||
PHP_ARG_WITH(config-file-scan-dir,,
|
||||
[ --with-config-file-scan-dir=PATH
|
||||
Set the path where to scan for configuration files], DEFAULT, no)
|
||||
Set the path where to scan for configuration files], DEFAULT, no)
|
||||
if test "$PHP_CONFIG_FILE_SCAN_DIR" = "DEFAULT"; then
|
||||
PHP_CONFIG_FILE_SCAN_DIR=
|
||||
fi
|
||||
@@ -1028,7 +1028,7 @@ dnl -------------------------------------------------------------------------
|
||||
PHP_HELP_SEPARATOR([Extensions:
|
||||
|
||||
--with-EXTENSION=[shared[,PATH]]
|
||||
|
||||
|
||||
NOTE: Not all extensions can be build as 'shared'.
|
||||
|
||||
Example: --with-foobar=shared,/usr/local/foobar/
|
||||
@@ -1115,13 +1115,13 @@ if test "$PHP_PEAR" != "no"; then
|
||||
dnl PEAR dependancies
|
||||
dnl
|
||||
if test "$PHP_XML" = "no"; then
|
||||
pear_error_msg="$pear_error_msg
|
||||
pear_error_msg="$pear_error_msg
|
||||
PEAR requires XML to be enabled. Add --enable-xml to the configure line. (or --without-pear)"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl if test "$PHP_XMLRPC" = "no"; then
|
||||
dnl pear_error_msg="$pear_error_msg
|
||||
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 fi
|
||||
dnl
|
||||
@@ -1234,7 +1234,7 @@ if test -z "$EXTENSION_DIR"; then
|
||||
if test "$enable_maintainer_zts" = "yes"; then
|
||||
extbasedir=$extbasedir-zts
|
||||
fi
|
||||
|
||||
|
||||
if test "$PHP_DEBUG" = "1"; then
|
||||
extbasedir=$extbasedir-debug
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
BCMATH FAQ:
|
||||
BCMATH FAQ:
|
||||
|
||||
1) Why BCMATH?
|
||||
|
||||
|
||||
6
ext/bcmath/libbcmath/configure
vendored
6
ext/bcmath/libbcmath/configure
vendored
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated automatically using autoconf version 2.13
|
||||
# Generated automatically using autoconf version 2.13
|
||||
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
#
|
||||
# This configure script is free software; the Free Software Foundation
|
||||
@@ -1236,7 +1236,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||
cat >> confdefs.h <<EOF
|
||||
#define $ac_tr_hdr 1
|
||||
EOF
|
||||
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
@@ -1312,7 +1312,7 @@ fi
|
||||
echo "$ac_t""$ac_cv_c_const" 1>&6
|
||||
if test $ac_cv_c_const = no; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define const
|
||||
#define const
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
@@ -103,7 +103,7 @@ fi
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
else
|
||||
@@ -112,7 +112,7 @@ if [ x"$dir_arg" != x ]; then
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
@@ -122,7 +122,7 @@ else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
@@ -150,7 +150,7 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
@@ -189,17 +189,17 @@ else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
@@ -230,7 +230,7 @@ else
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
errstatus=0
|
||||
|
||||
for file in ${1+"$@"} ; do
|
||||
for file in ${1+"$@"} ; do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</maintainer>
|
||||
</maintainers>
|
||||
<description>
|
||||
For arbitrary precision mathematics PHP offers the Binary Calculator
|
||||
For arbitrary precision mathematics PHP offers the Binary Calculator
|
||||
which supports numbers of any size and precision, represented as strings.
|
||||
</description>
|
||||
<license>PHP</license>
|
||||
|
||||
@@ -24,7 +24,7 @@ if test "$PHP_BZ2" != "no"; then
|
||||
AC_MSG_ERROR(Please reinstall the BZip2 distribution)
|
||||
fi
|
||||
|
||||
PHP_CHECK_LIBRARY(bz2, BZ2_bzerror,
|
||||
PHP_CHECK_LIBRARY(bz2, BZ2_bzerror,
|
||||
[
|
||||
PHP_ADD_INCLUDE($BZIP_DIR/include)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_DIR/$PHP_LIBDIR, BZ2_SHARED_LIBADD)
|
||||
|
||||
@@ -33,5 +33,5 @@ Bz2 is an extension to create and parse bzip2 compressed data.
|
||||
<file role="doc">php_bz2.h</file>
|
||||
<file role="src">bz2.c</file>
|
||||
</dir>
|
||||
</filelist>
|
||||
</filelist>
|
||||
</package>
|
||||
|
||||
@@ -278,13 +278,13 @@ static void _php_cal_info(int cal, zval *ret)
|
||||
add_index_string(&months, i, calendar->month_name_long[i]);
|
||||
add_index_string(&smonths, i, calendar->month_name_short[i]);
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
add_assoc_string(ret, "calsymbol", calendar->symbol);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* {{{ proto array cal_info([int calendar])
|
||||
@@ -512,21 +512,21 @@ PHP_FUNCTION(juliantojd)
|
||||
/*
|
||||
caution: the Hebrew format produces non unique result.
|
||||
for example both: year '5' and year '5000' produce 'ä'.
|
||||
use the numeric one for calculations.
|
||||
use the numeric one for calculations.
|
||||
*/
|
||||
static char *heb_number_to_chars(int n, int fl, char **ret)
|
||||
{
|
||||
char *p, old[18], *endofalafim;
|
||||
|
||||
p = endofalafim = old;
|
||||
/*
|
||||
prevents the option breaking the jewish beliefs, and some other
|
||||
/*
|
||||
prevents the option breaking the jewish beliefs, and some other
|
||||
critical resources ;)
|
||||
*/
|
||||
if (n > 9999 || n < 1) {
|
||||
*ret = NULL;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* alafim (thousands) case */
|
||||
if (n / 1000) {
|
||||
|
||||
@@ -301,7 +301,7 @@ static int yearOffset[19] =
|
||||
/* names for leap (13-month) year */
|
||||
char *JewishMonthNameLeap[14] =
|
||||
{
|
||||
"",
|
||||
"",
|
||||
"Tishri",
|
||||
"Heshvan",
|
||||
"Kislev",
|
||||
@@ -320,7 +320,7 @@ char *JewishMonthNameLeap[14] =
|
||||
/* names for regular year */
|
||||
char *JewishMonthName[14] =
|
||||
{
|
||||
"",
|
||||
"",
|
||||
"Tishri",
|
||||
"Heshvan",
|
||||
"Kislev",
|
||||
@@ -339,7 +339,7 @@ char *JewishMonthName[14] =
|
||||
/* names for leap (13-month) year */
|
||||
char *JewishMonthHebNameLeap[14] =
|
||||
{
|
||||
"",
|
||||
"",
|
||||
"\xFA\xF9\xF8\xE9",
|
||||
"\xE7\xF9\xE5\xEF",
|
||||
"\xEB\xF1\xEC\xE5",
|
||||
@@ -358,7 +358,7 @@ char *JewishMonthHebNameLeap[14] =
|
||||
/* names for regular year */
|
||||
char *JewishMonthHebName[14] =
|
||||
{
|
||||
"",
|
||||
"",
|
||||
"\xFA\xF9\xF8\xE9",
|
||||
"\xE7\xF9\xE5\xEF",
|
||||
"\xEB\xF1\xEC\xE5",
|
||||
|
||||
@@ -36,7 +36,7 @@ standard it is based on is the Julian Day Count. The Julian Day Count
|
||||
is a count of days starting from January 1st, 4713 B.C. To convert
|
||||
between calendar systems, you must first convert to Julian Day Count,
|
||||
then to the calendar system of your choice. Julian Day Count is very
|
||||
different from the Julian Calendar!
|
||||
different from the Julian Calendar!
|
||||
</description>
|
||||
<license>PHP</license>
|
||||
<release>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
if(!extension_loaded("calendar"))
|
||||
print "skip - CALENDAR extension not available";
|
||||
<?php
|
||||
if(!extension_loaded("calendar"))
|
||||
print "skip - CALENDAR extension not available";
|
||||
?>
|
||||
|
||||
@@ -55,12 +55,12 @@ Sample Script:
|
||||
|
||||
<?php
|
||||
$word = new COM("word.application");
|
||||
print "Loaded Word, version {$word->Version}\n";
|
||||
$word->Visible = 1;
|
||||
$word->Documents->Add();
|
||||
$word->Selection->TypeText("This is a test...");
|
||||
$word->Documents[1]->SaveAs("Useless test.doc");
|
||||
$word->Quit();
|
||||
print "Loaded Word, version {$word->Version}\n";
|
||||
$word->Visible = 1;
|
||||
$word->Documents->Add();
|
||||
$word->Selection->TypeText("This is a test...");
|
||||
$word->Documents[1]->SaveAs("Useless test.doc");
|
||||
$word->Quit();
|
||||
?>
|
||||
|
||||
TODO:
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
current locale.
|
||||
</para>
|
||||
<para>
|
||||
When called with an integer argument these functions
|
||||
When called with an integer argument these functions
|
||||
behave exactly like their C counterparts.
|
||||
</para>
|
||||
<para>
|
||||
@@ -19,7 +19,7 @@
|
||||
requested criteria.
|
||||
</para>
|
||||
<para>
|
||||
Passing anything else but a string or integer will
|
||||
Passing anything else but a string or integer will
|
||||
return false immediately.
|
||||
</para>
|
||||
</partintro>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
</maintainer>
|
||||
</maintainers>
|
||||
<description>
|
||||
The functions provided by this extension check whether a
|
||||
character or string falls into a certain character class
|
||||
The functions provided by this extension check whether a
|
||||
character or string falls into a certain character class
|
||||
according to the current locale.
|
||||
</description>
|
||||
<license>PHP</license>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl $Id$
|
||||
dnl $Id$
|
||||
dnl
|
||||
|
||||
PHP_ARG_WITH(curl, for cURL support,
|
||||
@@ -91,17 +91,17 @@ if test "$PHP_CURL" != "no"; then
|
||||
|
||||
PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD)
|
||||
PHP_EVAL_INCLINE($CURL_INCL, CURL_SHARED_LIBADD)
|
||||
|
||||
|
||||
AC_MSG_CHECKING([for SSL support in libcurl])
|
||||
if test -n "$CURL_SSL"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([HAVE_CURL_SSL], [1], [Have cURL with SSL support])
|
||||
|
||||
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=$CURL_INCL
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS=$CURL_LIBS
|
||||
|
||||
|
||||
AC_PROG_CPP
|
||||
AC_MSG_CHECKING([for openssl support in libcurl])
|
||||
AC_TRY_RUN([
|
||||
@@ -130,7 +130,7 @@ int main(int argc, char *argv[])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
|
||||
AC_MSG_CHECKING([for gnutls support in libcurl])
|
||||
AC_TRY_RUN([
|
||||
#include <strings.h>
|
||||
@@ -139,7 +139,7 @@ int main(int argc, char *argv[])
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
|
||||
|
||||
|
||||
if (data && data->ssl_version && *data->ssl_version) {
|
||||
const char *ptr = data->ssl_version;
|
||||
|
||||
@@ -158,15 +158,15 @@ int main(int argc, char *argv[])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
|
||||
CFLAGS="$save_CFLAGS"
|
||||
LDFLAGS="$save_LDFLAGS"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
PHP_CHECK_LIBRARY(curl,curl_easy_perform,
|
||||
[
|
||||
PHP_CHECK_LIBRARY(curl,curl_easy_perform,
|
||||
[
|
||||
AC_DEFINE(HAVE_CURL,1,[ ])
|
||||
],[
|
||||
AC_MSG_ERROR(There is something wrong. Please check config.log for more information.)
|
||||
|
||||
@@ -19,7 +19,7 @@ if (PHP_CURL != "no") {
|
||||
SETUP_OPENSSL("curl", PHP_CURL) > 0 &&
|
||||
CHECK_LIB("winmm.lib", "curl", PHP_CURL) &&
|
||||
CHECK_LIB("wldap32.lib", "curl", PHP_CURL) &&
|
||||
(((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", "curl", PHP_CURL))) ||
|
||||
(((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", "curl", PHP_CURL))) ||
|
||||
(PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "curl", PHP_CURL)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED))) &&
|
||||
!isNaN(ver_num) &&
|
||||
(ver_num <= parseInt("0x073b00") || ver_num > parseInt("0x073b00") &&
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
</maintainer>
|
||||
</maintainers>
|
||||
<description>
|
||||
PHP supports libcurl, a library created by Daniel Stenberg,
|
||||
that allows you to connect and communicate to many different
|
||||
types of servers with many different types of protocols.
|
||||
libcurl currently supports the http, https, ftp, gopher,
|
||||
telnet, dict, file, and ldap protocols. libcurl also supports
|
||||
HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading (this
|
||||
can also be done with PHP's ftp extension), HTTP form based
|
||||
PHP supports libcurl, a library created by Daniel Stenberg,
|
||||
that allows you to connect and communicate to many different
|
||||
types of servers with many different types of protocols.
|
||||
libcurl currently supports the http, https, ftp, gopher,
|
||||
telnet, dict, file, and ldap protocols. libcurl also supports
|
||||
HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading (this
|
||||
can also be done with PHP's ftp extension), HTTP form based
|
||||
upload, proxies, cookies, and user+password authentication.
|
||||
</description>
|
||||
<license>PHP</license>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
echo $_COOKIE['foo'];
|
||||
break;
|
||||
case 'encoding':
|
||||
echo $_SERVER['HTTP_ACCEPT_ENCODING'];
|
||||
echo $_SERVER['HTTP_ACCEPT_ENCODING'];
|
||||
break;
|
||||
case 'contenttype':
|
||||
header('Content-Type: text/plain;charset=utf-8');
|
||||
|
||||
@@ -8,7 +8,7 @@ function curl_cli_server_start() {
|
||||
if(getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
return getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
}
|
||||
|
||||
|
||||
$php_executable = getenv('TEST_PHP_EXECUTABLE');
|
||||
$doc_root = __DIR__;
|
||||
$router = "responder/get.php";
|
||||
@@ -36,7 +36,7 @@ function curl_cli_server_start() {
|
||||
|
||||
$handle = proc_open($cmd, $descriptorspec, $pipes, $doc_root);
|
||||
}
|
||||
|
||||
|
||||
// note: even when server prints 'Listening on localhost:8964...Press Ctrl-C to quit.'
|
||||
// it might not be listening yet...need to wait until fsockopen() call returns
|
||||
$error = "Unable to connect to server\n";
|
||||
|
||||
@@ -5,7 +5,7 @@ sinclude(ext/date/lib/timelib.m4)
|
||||
sinclude(lib/timelib.m4)
|
||||
|
||||
PHP_DATE_CFLAGS="-I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
|
||||
timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c
|
||||
timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c
|
||||
lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c"
|
||||
|
||||
PHP_NEW_EXTENSION(date, php_date.c $timelib_sources, no,, $PHP_DATE_CFLAGS)
|
||||
|
||||
@@ -1,54 +1,54 @@
|
||||
These functions build the foundation for accessing Berkeley DB style
|
||||
databases.
|
||||
These functions build the foundation for accessing Berkeley DB style
|
||||
databases.
|
||||
|
||||
This is a general abstraction layer for several file-based databases. As
|
||||
such, functionality is limited to a common subset of features supported
|
||||
by modern databases such as Sleepycat Software's DB2. (This is not to be
|
||||
confused with IBM's DB2 software, which is supported through the ODBC
|
||||
functions.)
|
||||
such, functionality is limited to a common subset of features supported
|
||||
by modern databases such as Sleepycat Software's DB2. (This is not to be
|
||||
confused with IBM's DB2 software, which is supported through the ODBC
|
||||
functions.)
|
||||
|
||||
This extensions allows to work with the following databases:
|
||||
dbm DBM is the oldest (original) type of Berkeley DB style databases.
|
||||
You should avoid it, if possible. We do not support the
|
||||
compatibility functions built into DB2 and gdbm, because they are
|
||||
only compatible on the source code level, but cannot handle the
|
||||
original dbm format.
|
||||
ndbm NDBM is a newer type and more flexible than dbm. It still has
|
||||
most of the arbitrary limits of dbm (therefore it is deprecated).
|
||||
gdbm GDBM is the GNU database manager.
|
||||
You should avoid it, if possible. We do not support the
|
||||
compatibility functions built into DB2 and gdbm, because they are
|
||||
only compatible on the source code level, but cannot handle the
|
||||
original dbm format.
|
||||
ndbm NDBM is a newer type and more flexible than dbm. It still has
|
||||
most of the arbitrary limits of dbm (therefore it is deprecated).
|
||||
gdbm GDBM is the GNU database manager.
|
||||
db2 DB2 is Sleepycat Software's DB2. It's described as "a programmatic
|
||||
toolkit that provides high-performance built-in database support
|
||||
for both standalone and client/server applications.
|
||||
db3 DB3 is Sleepycat Software's DB3.
|
||||
toolkit that provides high-performance built-in database support
|
||||
for both standalone and client/server applications.
|
||||
db3 DB3 is Sleepycat Software's DB3.
|
||||
db4 DB4 is Sleepycat Software's DB4. This is available since PHP 5.0.
|
||||
cdb CDB is "a fast, reliable, lightweight package for creating and
|
||||
reading constant databases." It is from the author of qmail and
|
||||
can be found at http://cr.yp.to/cdb.html. Since it is constant,
|
||||
we support only reading operations. And since PHP 4.3.0 we support
|
||||
writing (not updating) through the internal cdb library.
|
||||
cdb_make Since PHP 4.3.0 we support creation (not updating) of cdb files
|
||||
when the bundled cdb library is used.
|
||||
flatfile This is available since PHP 4.3.0 for compatibility with the
|
||||
deprecated dbm extension only and should be avoided. However you
|
||||
may use this where files were created in this format. That happens
|
||||
when configure could not find any external library.
|
||||
inifile This is available since PHP 4.3.3 to be able to modify php.ini
|
||||
files from within PHP scripts. When working with ini files you
|
||||
can pass arrays of the form array(0=>group,1=>value_name) or
|
||||
strings of the form "[group]value_name" where group is optional.
|
||||
As the functions dba_firstkey() and dba_nextkey() return string
|
||||
representations of the key there is a new function dba_key_split()
|
||||
available since PHP 5 which allows to convert the string keys into
|
||||
array keys without losing FALSE.
|
||||
qdbm This is available since PHP 5.0.0. The qdbm library can be loaded
|
||||
from http://qdbm.sourceforge.net.
|
||||
cdb CDB is "a fast, reliable, lightweight package for creating and
|
||||
reading constant databases." It is from the author of qmail and
|
||||
can be found at http://cr.yp.to/cdb.html. Since it is constant,
|
||||
we support only reading operations. And since PHP 4.3.0 we support
|
||||
writing (not updating) through the internal cdb library.
|
||||
cdb_make Since PHP 4.3.0 we support creation (not updating) of cdb files
|
||||
when the bundled cdb library is used.
|
||||
flatfile This is available since PHP 4.3.0 for compatibility with the
|
||||
deprecated dbm extension only and should be avoided. However you
|
||||
may use this where files were created in this format. That happens
|
||||
when configure could not find any external library.
|
||||
inifile This is available since PHP 4.3.3 to be able to modify php.ini
|
||||
files from within PHP scripts. When working with ini files you
|
||||
can pass arrays of the form array(0=>group,1=>value_name) or
|
||||
strings of the form "[group]value_name" where group is optional.
|
||||
As the functions dba_firstkey() and dba_nextkey() return string
|
||||
representations of the key there is a new function dba_key_split()
|
||||
available since PHP 5 which allows to convert the string keys into
|
||||
array keys without losing FALSE.
|
||||
qdbm This is available since PHP 5.0.0. The qdbm library can be loaded
|
||||
from http://qdbm.sourceforge.net.
|
||||
|
||||
|
||||
After configuring and compiling PHP you must execute the following test
|
||||
from commandline:
|
||||
php run-tests.php ext/dba.
|
||||
This shows whether your combination of handlers works. Most problematic
|
||||
are dbm and ndbm which conflict with many installations. The reason for
|
||||
from commandline:
|
||||
php run-tests.php ext/dba.
|
||||
This shows whether your combination of handlers works. Most problematic
|
||||
are dbm and ndbm which conflict with many installations. The reason for
|
||||
this is that on several systems these libraries are part of more than one
|
||||
other library. The configuration test only prevents you from configuring
|
||||
other library. The configuration test only prevents you from configuring
|
||||
malfaunctioning single handlers but not combinations.
|
||||
@@ -155,11 +155,11 @@ if test "$PHP_GDBM" != "no"; then
|
||||
if test -n "$THIS_INCLUDE"; then
|
||||
PHP_CHECK_LIBRARY(gdbm, gdbm_open, [
|
||||
AC_DEFINE_UNQUOTED(GDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
|
||||
AC_DEFINE(DBA_GDBM, 1, [ ])
|
||||
AC_DEFINE(DBA_GDBM, 1, [ ])
|
||||
THIS_LIBS=gdbm
|
||||
], [], [-L$THIS_PREFIX/$PHP_LIBDIR])
|
||||
fi
|
||||
|
||||
|
||||
PHP_DBA_STD_ASSIGN
|
||||
PHP_DBA_STD_CHECK
|
||||
PHP_DBA_STD_ATTACH
|
||||
@@ -180,12 +180,12 @@ if test "$PHP_NDBM" != "no"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
if test -n "$THIS_INCLUDE"; then
|
||||
for LIB in ndbm db1 c; do
|
||||
PHP_CHECK_LIBRARY($LIB, dbm_open, [
|
||||
AC_DEFINE_UNQUOTED(NDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
|
||||
AC_DEFINE(DBA_NDBM, 1, [ ])
|
||||
AC_DEFINE(DBA_NDBM, 1, [ ])
|
||||
THIS_LIBS=$LIB
|
||||
], [], [-L$THIS_PREFIX/$PHP_LIBDIR])
|
||||
if test -n "$THIS_LIBS"; then
|
||||
@@ -325,7 +325,7 @@ AC_DEFUN([PHP_DBA_DB_CHECK],[
|
||||
])
|
||||
fi
|
||||
if test -n "$THIS_LIBS"; then
|
||||
AC_DEFINE(DBA_DB$1, 1, [ ])
|
||||
AC_DEFINE(DBA_DB$1, 1, [ ])
|
||||
if test -n "$THIS_INCLUDE"; then
|
||||
AC_DEFINE_UNQUOTED(DB$1_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
|
||||
fi
|
||||
@@ -567,7 +567,7 @@ if test "$PHP_DBM" != "no"; then
|
||||
AC_DEFINE_UNQUOTED(DBM_VERSION, "DBM", [ ])
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_DEFINE(DBA_DBM, 1, [ ])
|
||||
AC_DEFINE(DBA_DBM, 1, [ ])
|
||||
THIS_LIBS=$LIB
|
||||
], [], [-L$THIS_PREFIX/$PHP_LIBDIR])
|
||||
if test -n "$THIS_LIBS"; then
|
||||
@@ -575,7 +575,7 @@ if test "$PHP_DBM" != "no"; then
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
PHP_DBA_STD_ASSIGN
|
||||
PHP_DBA_STD_CHECK
|
||||
PHP_DBA_STD_ATTACH
|
||||
@@ -621,7 +621,7 @@ elif test "$PHP_CDB" != "no"; then
|
||||
for LIB in cdb c; do
|
||||
PHP_CHECK_LIBRARY($LIB, cdb_read, [
|
||||
AC_DEFINE_UNQUOTED(CDB_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
|
||||
AC_DEFINE(DBA_CDB, 1, [ ])
|
||||
AC_DEFINE(DBA_CDB, 1, [ ])
|
||||
THIS_LIBS=$LIB
|
||||
], [], [-L$THIS_PREFIX/$PHP_LIBDIR])
|
||||
if test -n "$THIS_LIBS"; then
|
||||
@@ -654,7 +654,7 @@ PHP_DBA_STD_RESULT(FlatFile, FlatFile)
|
||||
|
||||
dnl
|
||||
dnl Extension setup
|
||||
dnl
|
||||
dnl
|
||||
AC_MSG_CHECKING([whether to enable DBA interface])
|
||||
if test "$HAVE_DBA" = "1"; then
|
||||
if test "$ext_shared" = "yes"; then
|
||||
|
||||
@@ -108,7 +108,7 @@ DBA_FETCH_FUNC(lmdb)
|
||||
int rc;
|
||||
MDB_val k, v;
|
||||
char *ret = NULL;
|
||||
|
||||
|
||||
if (LMDB_IT(cur)) {
|
||||
rc = mdb_txn_renew(LMDB_IT(txn));
|
||||
} else {
|
||||
@@ -125,7 +125,7 @@ DBA_FETCH_FUNC(lmdb)
|
||||
rc = mdb_get(LMDB_IT(txn), LMDB_IT(dbi), &k, &v);
|
||||
if (rc) {
|
||||
if (MDB_NOTFOUND != rc) {
|
||||
php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc));
|
||||
php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc));
|
||||
}
|
||||
mdb_txn_abort(LMDB_IT(txn));
|
||||
return NULL;
|
||||
@@ -201,7 +201,7 @@ DBA_EXISTS_FUNC(lmdb)
|
||||
rc = mdb_get(LMDB_IT(txn), LMDB_IT(dbi), &k, &v);
|
||||
if (rc) {
|
||||
if (MDB_NOTFOUND != rc) {
|
||||
php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc));
|
||||
php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc));
|
||||
}
|
||||
mdb_txn_abort(LMDB_IT(txn));
|
||||
return FAILURE;
|
||||
@@ -265,7 +265,7 @@ DBA_FIRSTKEY_FUNC(lmdb)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rc = mdb_cursor_get(LMDB_IT(cur), &k, &v, MDB_FIRST);
|
||||
rc = mdb_cursor_get(LMDB_IT(cur), &k, &v, MDB_FIRST);
|
||||
if (rc) {
|
||||
mdb_txn_abort(LMDB_IT(txn));
|
||||
mdb_cursor_close(LMDB_IT(cur));
|
||||
@@ -298,7 +298,7 @@ DBA_NEXTKEY_FUNC(lmdb)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rc = mdb_cursor_get(LMDB_IT(cur), &k, &v, MDB_NEXT);
|
||||
rc = mdb_cursor_get(LMDB_IT(cur), &k, &v, MDB_NEXT);
|
||||
if (rc) {
|
||||
mdb_txn_abort(LMDB_IT(txn));
|
||||
mdb_cursor_close(LMDB_IT(cur));
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
|
||||
# You can use this script if you want to use an external cdb lib. If you
|
||||
# compile php using --with-cdb the internal functions will be used and no
|
||||
# compile php using --with-cdb the internal functions will be used and no
|
||||
# external library is used so that this script is not necessary.
|
||||
#
|
||||
# cdb-0.75 lacks support for installing header files and creating a
|
||||
# cdb-0.75 lacks support for installing header files and creating a
|
||||
# library which programs can link against. This shell script fills
|
||||
# the gap.
|
||||
#
|
||||
|
||||
@@ -12,7 +12,7 @@ fi
|
||||
|
||||
if test "$PHP_DOM" != "no"; then
|
||||
|
||||
if test "$PHP_LIBXML" = "no"; then
|
||||
if test "$PHP_LIBXML" = "no"; then
|
||||
AC_MSG_ERROR([DOM extension requires LIBXML extension, add --enable-libxml])
|
||||
fi
|
||||
|
||||
@@ -27,7 +27,7 @@ if test "$PHP_DOM" != "no"; then
|
||||
nodelist.c text.c comment.c domconfiguration.c \
|
||||
domimplementationsource.c entityreference.c \
|
||||
notation.c xpath.c dom_iterators.c \
|
||||
typeinfo.c domerror.c domlocator.c namednodemap.c userdatahandler.c],
|
||||
typeinfo.c domerror.c domlocator.c namednodemap.c userdatahandler.c],
|
||||
$ext_shared)
|
||||
PHP_SUBST(DOM_SHARED_LIBADD)
|
||||
PHP_INSTALL_HEADERS([ext/dom/xml_common.h])
|
||||
|
||||
@@ -2038,7 +2038,7 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ctxt->vctxt.error = php_libxml_ctx_error;
|
||||
ctxt->vctxt.warning = php_libxml_ctx_warning;
|
||||
if (ctxt->sax != NULL) {
|
||||
@@ -2247,7 +2247,7 @@ PHP_METHOD(domdocument, registerNodeClass)
|
||||
dom_set_doc_classmap(intern->document, basece, ce);
|
||||
RETURN_TRUE;
|
||||
}
|
||||
|
||||
|
||||
zend_throw_error(NULL, "Class %s is not derived from %s.", ZSTR_VAL(ce->name), ZSTR_VAL(basece->name));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ echo "--------- creating a new attribute\n";
|
||||
//$attr = $dom->createAttribute("src", "picture.gif");
|
||||
//print_r($attr);
|
||||
|
||||
//$rootnode->set_attributeNode($attr);
|
||||
//$rootnode->set_attributeNode($attr);
|
||||
$attr = $rootnode->setAttribute("src", "picture.gif");
|
||||
$attr = $rootnode->getAttribute("src");
|
||||
print_r($attr);
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
<heading>Reminder</heading>
|
||||
<body>Don't forget the meeting tonight!</body>
|
||||
<footer>Or I'll clobber you!</footer>
|
||||
</note>
|
||||
</note>
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
<from>Shane</from>
|
||||
<heading>Reminder</heading>
|
||||
<body>Don't forget the meeting tonight!</body>
|
||||
</note>
|
||||
</note>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
function libxml_options_to_int($libxmlOptions) {
|
||||
|
||||
|
||||
$defined_constants = get_defined_constants(true);
|
||||
$env_array = explode('|', $libxmlOptions);
|
||||
$libxml_constants = array_intersect_key($defined_constants['libxml'], array_flip($env_array));
|
||||
|
||||
$sum = 0;
|
||||
foreach($libxml_constants as $value) {
|
||||
foreach($libxml_constants as $value) {
|
||||
$sum = $sum|$value;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ include(dirname(__FILE__) . '/domdocumentload_utilities.php');
|
||||
$doc = new DOMDocument();
|
||||
|
||||
$libxml_options = libxml_options_to_int(getenv('LOAD_OPTIONS'));
|
||||
$result = $doc->loadXML(file_get_contents(dirname(__FILE__) . getenv('XML_FILE')),
|
||||
$result = $doc->loadXML(file_get_contents(dirname(__FILE__) . getenv('XML_FILE')),
|
||||
$libxml_options);
|
||||
|
||||
$expectedResult = (bool) getenv('EXPECTED_RESULT');
|
||||
|
||||
@@ -4,7 +4,7 @@ include(dirname(__FILE__) . '/domdocumentload_utilities.php');
|
||||
$doc = new DOMDocument();
|
||||
|
||||
$libxml_options = libxml_options_to_int(getenv('LOAD_OPTIONS'));
|
||||
$result = $doc->loadXML(file_get_contents(dirname(__FILE__) . getenv('XML_FILE')),
|
||||
$result = $doc->loadXML(file_get_contents(dirname(__FILE__) . getenv('XML_FILE')),
|
||||
$libxml_options);
|
||||
|
||||
$expectedResult = (bool) getenv('EXPECTED_RESULT');
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
<from>Shane</from>
|
||||
<heading>Reminder</heading>
|
||||
<body>Don't forget the meeting tonight!</body>
|
||||
</note>
|
||||
</note>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
API for many spell libraries:
|
||||
- aspell/pspell (intended to replace ispell)
|
||||
- hspell (hebrew)
|
||||
- ispell
|
||||
- ispell
|
||||
- myspell/hunspell (OpenOffice project, mozilla)
|
||||
- uspell (primarily Yiddish, Hebrew, and Eastern European languages)
|
||||
A plugin system allows to add custom spell support.
|
||||
|
||||
224
ext/exif/exif.c
224
ext/exif/exif.c
@@ -138,7 +138,7 @@ PHP_MINFO_FUNCTION(exif)
|
||||
php_info_print_table_row(2, "Supported EXIF Version", "0220");
|
||||
php_info_print_table_row(2, "Supported filetypes", "JPEG, TIFF");
|
||||
|
||||
if (zend_hash_str_exists(&module_registry, "mbstring", sizeof("mbstring")-1)) {
|
||||
if (zend_hash_str_exists(&module_registry, "mbstring", sizeof("mbstring")-1)) {
|
||||
php_info_print_table_row(2, "Multibyte decoding support using mbstring", "enabled");
|
||||
} else {
|
||||
php_info_print_table_row(2, "Multibyte decoding support using mbstring", "disabled");
|
||||
@@ -965,36 +965,36 @@ static tag_info_array tag_table_VND_OLYMPUS = {
|
||||
};
|
||||
|
||||
static tag_info_array tag_table_VND_SAMSUNG = {
|
||||
{ 0x0001, "Version"},
|
||||
{ 0x0021, "PictureWizard"},
|
||||
{ 0x0030, "LocalLocationName"},
|
||||
{ 0x0031, "LocationName"},
|
||||
{ 0x0035, "Preview"},
|
||||
{ 0x0043, "CameraTemperature"},
|
||||
{ 0xa001, "FirmwareName"},
|
||||
{ 0xa003, "LensType"},
|
||||
{ 0xa004, "LensFirmware"},
|
||||
{ 0xa010, "SensorAreas"},
|
||||
{ 0xa011, "ColorSpace"},
|
||||
{ 0xa012, "SmartRange"},
|
||||
{ 0xa013, "ExposureBiasValue"},
|
||||
{ 0xa014, "ISO"},
|
||||
{ 0xa018, "ExposureTime"},
|
||||
{ 0xa019, "FNumber"},
|
||||
{ 0xa01a, "FocalLengthIn35mmFormat"},
|
||||
{ 0xa020, "EncryptionKey"},
|
||||
{ 0xa021, "WB_RGGBLevelsUncorrected"},
|
||||
{ 0xa022, "WB_RGGBLevelsAuto"},
|
||||
{ 0xa023, "WB_RGGBLevelsIlluminator1"},
|
||||
{ 0xa024, "WB_RGGBLevelsIlluminator2"},
|
||||
{ 0xa028, "WB_RGGBLevelsBlack"},
|
||||
{ 0xa030, "ColorMatrix"},
|
||||
{ 0xa031, "ColorMatrixSRGB"},
|
||||
{ 0xa032, "ColorMatrixAdobeRGB"},
|
||||
{ 0xa040, "ToneCurve1"},
|
||||
{ 0xa041, "ToneCurve2"},
|
||||
{ 0xa042, "ToneCurve3"},
|
||||
{ 0xa043, "ToneCurve4"},
|
||||
{ 0x0001, "Version"},
|
||||
{ 0x0021, "PictureWizard"},
|
||||
{ 0x0030, "LocalLocationName"},
|
||||
{ 0x0031, "LocationName"},
|
||||
{ 0x0035, "Preview"},
|
||||
{ 0x0043, "CameraTemperature"},
|
||||
{ 0xa001, "FirmwareName"},
|
||||
{ 0xa003, "LensType"},
|
||||
{ 0xa004, "LensFirmware"},
|
||||
{ 0xa010, "SensorAreas"},
|
||||
{ 0xa011, "ColorSpace"},
|
||||
{ 0xa012, "SmartRange"},
|
||||
{ 0xa013, "ExposureBiasValue"},
|
||||
{ 0xa014, "ISO"},
|
||||
{ 0xa018, "ExposureTime"},
|
||||
{ 0xa019, "FNumber"},
|
||||
{ 0xa01a, "FocalLengthIn35mmFormat"},
|
||||
{ 0xa020, "EncryptionKey"},
|
||||
{ 0xa021, "WB_RGGBLevelsUncorrected"},
|
||||
{ 0xa022, "WB_RGGBLevelsAuto"},
|
||||
{ 0xa023, "WB_RGGBLevelsIlluminator1"},
|
||||
{ 0xa024, "WB_RGGBLevelsIlluminator2"},
|
||||
{ 0xa028, "WB_RGGBLevelsBlack"},
|
||||
{ 0xa030, "ColorMatrix"},
|
||||
{ 0xa031, "ColorMatrixSRGB"},
|
||||
{ 0xa032, "ColorMatrixAdobeRGB"},
|
||||
{ 0xa040, "ToneCurve1"},
|
||||
{ 0xa041, "ToneCurve2"},
|
||||
{ 0xa042, "ToneCurve3"},
|
||||
{ 0xa043, "ToneCurve4"},
|
||||
TAG_TABLE_END
|
||||
};
|
||||
|
||||
@@ -1105,72 +1105,72 @@ static tag_info_array tag_table_VND_PANASONIC = {
|
||||
};
|
||||
|
||||
static tag_info_array tag_table_VND_DJI = {
|
||||
{ 0x0001, "Make"},
|
||||
{ 0x0003, "SpeedX"},
|
||||
{ 0x0004, "SpeedY"},
|
||||
{ 0x0005, "SpeedZ"},
|
||||
{ 0x0006, "Pitch"},
|
||||
{ 0x0007, "Yaw"},
|
||||
{ 0x0008, "Roll"},
|
||||
{ 0x0009, "CameraPitch"},
|
||||
{ 0x000a, "CameraYaw"},
|
||||
{ 0x000b, "CameraRoll"},
|
||||
{ 0x0001, "Make"},
|
||||
{ 0x0003, "SpeedX"},
|
||||
{ 0x0004, "SpeedY"},
|
||||
{ 0x0005, "SpeedZ"},
|
||||
{ 0x0006, "Pitch"},
|
||||
{ 0x0007, "Yaw"},
|
||||
{ 0x0008, "Roll"},
|
||||
{ 0x0009, "CameraPitch"},
|
||||
{ 0x000a, "CameraYaw"},
|
||||
{ 0x000b, "CameraRoll"},
|
||||
TAG_TABLE_END
|
||||
};
|
||||
|
||||
static tag_info_array tag_table_VND_SONY = {
|
||||
{ 0x0102, "Quality"},
|
||||
{ 0x0104, "FlashExposureComp"},
|
||||
{ 0x0105, "Teleconverter"},
|
||||
{ 0x0112, "WhiteBalanceFineTune"},
|
||||
{ 0x0114, "CameraSettings"},
|
||||
{ 0x0115, "WhiteBalance"},
|
||||
{ 0x0116, "0x0116"},
|
||||
{ 0x0e00, "PrintIM"},
|
||||
{ 0x1000, "MultiBurstMode"},
|
||||
{ 0x1001, "MultiBurstImageWidth"},
|
||||
{ 0x1002, "MultiBurstImageHeight"},
|
||||
{ 0x1003, "Panorama"},
|
||||
{ 0x2000, "0x2000"},
|
||||
{ 0x2001, "PreviewImage"},
|
||||
{ 0x2002, "0x2002"},
|
||||
{ 0x2003, "0x2003"},
|
||||
{ 0x2004, "Contrast"},
|
||||
{ 0x2005, "Saturation"},
|
||||
{ 0x2006, "0x2006"},
|
||||
{ 0x2007, "0x2007"},
|
||||
{ 0x2008, "0x2008"},
|
||||
{ 0x2009, "0x2009"},
|
||||
{ 0x200a, "AutoHDR"},
|
||||
{ 0x3000, "ShotInfo"},
|
||||
{ 0xb000, "FileFormat"},
|
||||
{ 0xb001, "SonyModelID"},
|
||||
{ 0xb020, "ColorReproduction"},
|
||||
{ 0xb021, "ColorTemperature"},
|
||||
{ 0xb022, "ColorCompensationFilter"},
|
||||
{ 0xb023, "SceneMode"},
|
||||
{ 0xb024, "ZoneMatching"},
|
||||
{ 0xb025, "DynamicRangeOptimizer"},
|
||||
{ 0xb026, "ImageStabilization"},
|
||||
{ 0xb027, "LensID"},
|
||||
{ 0xb028, "MinoltaMakerNote"},
|
||||
{ 0xb029, "ColorMode"},
|
||||
{ 0xb02b, "FullImageSize"},
|
||||
{ 0xb02c, "PreviewImageSize"},
|
||||
{ 0xb040, "Macro"},
|
||||
{ 0xb041, "ExposureMode"},
|
||||
{ 0xb042, "FocusMode"},
|
||||
{ 0xb043, "AFMode"},
|
||||
{ 0xb044, "AFIlluminator"},
|
||||
{ 0xb047, "JPEGQuality"},
|
||||
{ 0xb048, "FlashLevel"},
|
||||
{ 0xb049, "ReleaseMode"},
|
||||
{ 0xb04a, "SequenceNumber"},
|
||||
{ 0xb04b, "AntiBlur"},
|
||||
{ 0xb04e, "LongExposureNoiseReduction"},
|
||||
{ 0xb04f, "DynamicRangeOptimizer"},
|
||||
{ 0xb052, "IntelligentAuto"},
|
||||
{ 0xb054, "WhiteBalance2"},
|
||||
{ 0x0102, "Quality"},
|
||||
{ 0x0104, "FlashExposureComp"},
|
||||
{ 0x0105, "Teleconverter"},
|
||||
{ 0x0112, "WhiteBalanceFineTune"},
|
||||
{ 0x0114, "CameraSettings"},
|
||||
{ 0x0115, "WhiteBalance"},
|
||||
{ 0x0116, "0x0116"},
|
||||
{ 0x0e00, "PrintIM"},
|
||||
{ 0x1000, "MultiBurstMode"},
|
||||
{ 0x1001, "MultiBurstImageWidth"},
|
||||
{ 0x1002, "MultiBurstImageHeight"},
|
||||
{ 0x1003, "Panorama"},
|
||||
{ 0x2000, "0x2000"},
|
||||
{ 0x2001, "PreviewImage"},
|
||||
{ 0x2002, "0x2002"},
|
||||
{ 0x2003, "0x2003"},
|
||||
{ 0x2004, "Contrast"},
|
||||
{ 0x2005, "Saturation"},
|
||||
{ 0x2006, "0x2006"},
|
||||
{ 0x2007, "0x2007"},
|
||||
{ 0x2008, "0x2008"},
|
||||
{ 0x2009, "0x2009"},
|
||||
{ 0x200a, "AutoHDR"},
|
||||
{ 0x3000, "ShotInfo"},
|
||||
{ 0xb000, "FileFormat"},
|
||||
{ 0xb001, "SonyModelID"},
|
||||
{ 0xb020, "ColorReproduction"},
|
||||
{ 0xb021, "ColorTemperature"},
|
||||
{ 0xb022, "ColorCompensationFilter"},
|
||||
{ 0xb023, "SceneMode"},
|
||||
{ 0xb024, "ZoneMatching"},
|
||||
{ 0xb025, "DynamicRangeOptimizer"},
|
||||
{ 0xb026, "ImageStabilization"},
|
||||
{ 0xb027, "LensID"},
|
||||
{ 0xb028, "MinoltaMakerNote"},
|
||||
{ 0xb029, "ColorMode"},
|
||||
{ 0xb02b, "FullImageSize"},
|
||||
{ 0xb02c, "PreviewImageSize"},
|
||||
{ 0xb040, "Macro"},
|
||||
{ 0xb041, "ExposureMode"},
|
||||
{ 0xb042, "FocusMode"},
|
||||
{ 0xb043, "AFMode"},
|
||||
{ 0xb044, "AFIlluminator"},
|
||||
{ 0xb047, "JPEGQuality"},
|
||||
{ 0xb048, "FlashLevel"},
|
||||
{ 0xb049, "ReleaseMode"},
|
||||
{ 0xb04a, "SequenceNumber"},
|
||||
{ 0xb04b, "AntiBlur"},
|
||||
{ 0xb04e, "LongExposureNoiseReduction"},
|
||||
{ 0xb04f, "DynamicRangeOptimizer"},
|
||||
{ 0xb052, "IntelligentAuto"},
|
||||
{ 0xb054, "WhiteBalance2"},
|
||||
TAG_TABLE_END
|
||||
};
|
||||
|
||||
@@ -1319,16 +1319,16 @@ static tag_info_array tag_table_VND_SIGMA = {
|
||||
};
|
||||
|
||||
static tag_info_array tag_table_VND_KYOCERA = {
|
||||
{ 0x0001, "FormatThumbnail"},
|
||||
{ 0x0E00, "PrintImageMatchingInfo"},
|
||||
{ 0x0001, "FormatThumbnail"},
|
||||
{ 0x0E00, "PrintImageMatchingInfo"},
|
||||
TAG_TABLE_END
|
||||
};
|
||||
|
||||
static tag_info_array tag_table_VND_RICOH = {
|
||||
{ 0x0001, "MakerNoteDataType"},
|
||||
{ 0x0002, "Version"},
|
||||
{ 0x0E00, "PrintImageMatchingInfo"},
|
||||
{ 0x2001, "RicohCameraInfoMakerNoteSubIFD"},
|
||||
{ 0x0001, "MakerNoteDataType"},
|
||||
{ 0x0002, "Version"},
|
||||
{ 0x0E00, "PrintImageMatchingInfo"},
|
||||
{ 0x2001, "RicohCameraInfoMakerNoteSubIFD"},
|
||||
TAG_TABLE_END
|
||||
};
|
||||
|
||||
@@ -1365,20 +1365,20 @@ static const maker_note_type maker_note_array[] = {
|
||||
{ tag_table_VND_NIKON, "NIKON", NULL, "Nikon\x00\x01\x00", 8, 8, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_NIKON_990, "NIKON", NULL, NULL, 0, 0, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_OLYMPUS, "OLYMPUS OPTICAL CO.,LTD", NULL, "OLYMP\x00\x01\x00", 8, 8, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_SAMSUNG, "SAMSUNG", NULL, NULL, 0, 0, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_PANASONIC, "Panasonic", NULL, "Panasonic\x00\x00\x00", 12, 12, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_DJI, "DJI", NULL, NULL, 0, 0, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_SONY, "SONY", NULL, "SONY DSC \x00\x00\x00", 12, 12, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_PENTAX, "PENTAX", NULL, "AOC\x00", 6, 6, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_MINOLTA, "Minolta, KONICA MINOLTA", NULL, NULL, 0, 0, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_SIGMA, "SIGMA, FOVEON", NULL, "SIGMA\x00\x00\x00", 10, 10, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_SIGMA, "SIGMA, FOVEON", NULL, "FOVEON\x00\x00\x00", 10, 10, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_KYOCERA, "KYOCERA, CONTAX", NULL, "KYOCERA \x00\x00\x00", 22, 22, MN_ORDER_NORMAL, MN_OFFSET_MAKER},
|
||||
{ tag_table_VND_RICOH, "RICOH", NULL, "Ricoh", 5, 5, MN_ORDER_MOTOROLA, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_RICOH, "RICOH", NULL, "RICOH", 5, 5, MN_ORDER_MOTOROLA, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_SAMSUNG, "SAMSUNG", NULL, NULL, 0, 0, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_PANASONIC, "Panasonic", NULL, "Panasonic\x00\x00\x00", 12, 12, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_DJI, "DJI", NULL, NULL, 0, 0, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_SONY, "SONY", NULL, "SONY DSC \x00\x00\x00", 12, 12, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_PENTAX, "PENTAX", NULL, "AOC\x00", 6, 6, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_MINOLTA, "Minolta, KONICA MINOLTA", NULL, NULL, 0, 0, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_SIGMA, "SIGMA, FOVEON", NULL, "SIGMA\x00\x00\x00", 10, 10, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_SIGMA, "SIGMA, FOVEON", NULL, "FOVEON\x00\x00\x00", 10, 10, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_KYOCERA, "KYOCERA, CONTAX", NULL, "KYOCERA \x00\x00\x00", 22, 22, MN_ORDER_NORMAL, MN_OFFSET_MAKER},
|
||||
{ tag_table_VND_RICOH, "RICOH", NULL, "Ricoh", 5, 5, MN_ORDER_MOTOROLA, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_RICOH, "RICOH", NULL, "RICOH", 5, 5, MN_ORDER_MOTOROLA, MN_OFFSET_NORMAL},
|
||||
|
||||
/* These re-uses existing formats */
|
||||
{ tag_table_VND_OLYMPUS, "AGFA", NULL, "AGFA \x00\x01", 8, 8, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_OLYMPUS, "AGFA", NULL, "AGFA \x00\x01", 8, 8, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},
|
||||
{ tag_table_VND_OLYMPUS, "EPSON", NULL, "EPSON\x00\x01\x00", 8, 8, MN_ORDER_NORMAL, MN_OFFSET_NORMAL}
|
||||
};
|
||||
/* }}} */
|
||||
@@ -3151,7 +3151,7 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (maker_note->offset >= value_len) {
|
||||
/* Do not go past the value end */
|
||||
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "IFD data too short: 0x%04X offset 0x%04X", value_len, maker_note->offset);
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
</maintainer>
|
||||
</maintainers>
|
||||
<description>
|
||||
The EXIF functions provide access to information stored in headers
|
||||
of JPEG and TIFF images. This way you can read meta data generated
|
||||
The EXIF functions provide access to information stored in headers
|
||||
of JPEG and TIFF images. This way you can read meta data generated
|
||||
by digital cameras and certain image processing applications.
|
||||
</description>
|
||||
<license>PHP</license>
|
||||
|
||||
@@ -7,12 +7,12 @@ if (php_sapi_name() != "cli") {
|
||||
}
|
||||
/*
|
||||
This script can be used on Win32 systems
|
||||
|
||||
|
||||
1) Make sure you have CygWin installed
|
||||
2) Adjust the $cygwin_path to match your installation
|
||||
3) Change the environment cariable PATHEXT to include .PHP
|
||||
4) run ext_skel --extname=...
|
||||
the first time you run this script you will be asked to
|
||||
the first time you run this script you will be asked to
|
||||
associate it with a program. chooses the CLI version of php.
|
||||
*/
|
||||
|
||||
@@ -39,7 +39,7 @@ $fp = fopen("$extname/$extname.php", "rb");
|
||||
if ($fp) {
|
||||
$php_file = fread($fp, filesize("$extname/$extname.php"));
|
||||
fclose($fp);
|
||||
|
||||
|
||||
$php_file = str_replace("dl('", "dl('php_", $php_file);
|
||||
$fp = fopen("$extname/$extname.php", "wb");
|
||||
if ($fp) {
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
</maintainer>
|
||||
</maintainers>
|
||||
<description>
|
||||
This extension allows retrieval of information regarding vast majority of file.
|
||||
This extension allows retrieval of information regarding vast majority of file.
|
||||
This information may include dimensions, quality, length etc...
|
||||
|
||||
Additionally it can also be used to retrieve the mime type for a particular
|
||||
Additionally it can also be used to retrieve the mime type for a particular
|
||||
file and for text files proper language encoding.
|
||||
</description>
|
||||
<license>PHP</license>
|
||||
|
||||
@@ -6,7 +6,7 @@ Introduction
|
||||
We all know that you should always check input variables, but PHP does not
|
||||
offer really good functionality for doing this in a safe way. The Input Filter
|
||||
extension is meant to address this issue by implementing a set of filters and
|
||||
mechanisms that users can use to safely access their input data.
|
||||
mechanisms that users can use to safely access their input data.
|
||||
|
||||
|
||||
Change Log
|
||||
@@ -51,7 +51,7 @@ General Considerations
|
||||
* All flags mentioned here should be prepended with `FILTER_FLAG_` when used
|
||||
with PHP.
|
||||
|
||||
|
||||
|
||||
API
|
||||
===
|
||||
mixed *input_get* (int *source*, string *name*, [, int *filter* [, mixed *filter_options*, [ string *characterset* ] ]);
|
||||
@@ -62,7 +62,7 @@ mixed *input_get* (int *source*, string *name*, [, int *filter* [, mixed *filter
|
||||
mixed *input_get_args* (array *definitions*, int *source*, [, array *data*]);
|
||||
Returns an array with all filtered variables defined in 'definition'.
|
||||
The keys are used as the name of the argument. The value can be either
|
||||
an integer (flags) or an array of options. This array can contain
|
||||
an integer (flags) or an array of options. This array can contain
|
||||
the 'filter' type, the 'flags', the 'otptions' or the 'charset'
|
||||
|
||||
bool *input_has_variable (int *source*, string *name*);
|
||||
@@ -110,7 +110,7 @@ application by returning false.
|
||||
The constants should be prepended by `FILTER_VALIDATE_` when used with php.
|
||||
|
||||
================ ========== =========== ==================================================
|
||||
Name Constant Return Type Description
|
||||
Name Constant Return Type Description
|
||||
================ ========== =========== ==================================================
|
||||
int INT integer Returns the input variable as an integer
|
||||
|
||||
@@ -122,7 +122,7 @@ int INT integer Returns the input variable as an integer
|
||||
* max_range: Maximum number that is allowed
|
||||
(inclusive)
|
||||
* flags: A bitmask supporting the following flags:
|
||||
|
||||
|
||||
- ALLOW_OCTAL: allow octal numbers with the format
|
||||
0nn as input too.
|
||||
- ALLOW_HEX: allow hexadecimal numbers with the
|
||||
@@ -144,7 +144,7 @@ validate_url URL string Validates an URL's format.
|
||||
|
||||
$filter_options - an bitmask that supports the
|
||||
following flags:
|
||||
|
||||
|
||||
* SCHEME_REQUIRED: The 'schema' part of the URL
|
||||
needs to in the passed URL.
|
||||
* HOST_REQUIRED: The 'host' part of the URL
|
||||
@@ -180,9 +180,9 @@ set rules for this specific filter. Instead of taking an *options* array, they
|
||||
use this parameter for flags for the specific filter.
|
||||
|
||||
The constants should be prepended by `FILTER_SANITIZE_` when used with php.
|
||||
|
||||
|
||||
============= ================ =========== =====================================================
|
||||
Name Constant Return Type Description
|
||||
Name Constant Return Type Description
|
||||
============= ================ =========== =====================================================
|
||||
string STRING string Returns the input variable as a string after it has
|
||||
been stripped of XML/HTML tags and other evil things
|
||||
@@ -190,7 +190,7 @@ string STRING string Returns the input variable as a strin
|
||||
|
||||
$filter_options - an bitmask that supports the
|
||||
following flags:
|
||||
|
||||
|
||||
* NO_ENCODE_QUOTES: Prevents single and double
|
||||
quotes from being encoded as numerical HTML
|
||||
entities.
|
||||
@@ -228,10 +228,10 @@ encoded ENCODED string Encodes all characters outside the ra
|
||||
|
||||
special_chars SPECIAL_CHARS string Encodes the 'special' characters ' " < > &, \0 and
|
||||
everything below 0x20 as numerical HTML entities.
|
||||
|
||||
|
||||
$filter_options - an bitmask that supports the
|
||||
following flags:
|
||||
|
||||
|
||||
* STRIP_LOW: excludes all characters < 0x20 from the
|
||||
allowed character list. If this is not set, then
|
||||
those characters are encoded as numerical HTML
|
||||
@@ -243,10 +243,10 @@ special_chars SPECIAL_CHARS string Encodes the 'special' characters ' "
|
||||
|
||||
unsafe_raw UNSAFE_RAW string Returns the input variable as a string without
|
||||
XML/HTML being stripped from the input value.
|
||||
|
||||
|
||||
$filter_options - an bitmask that supports the
|
||||
following flags:
|
||||
|
||||
|
||||
* STRIP_LOW: excludes all characters < 0x20 from the
|
||||
allowed character list
|
||||
* STRIP_HIGH: excludes all characters >= 0x80 from
|
||||
@@ -256,7 +256,7 @@ unsafe_raw UNSAFE_RAW string Returns the input variable as a strin
|
||||
* ENCODE_HIGH: allows characters >= 0x80 but encodes
|
||||
them as numerical HTML entities
|
||||
* ENCODE_AMP: encodes & as &
|
||||
|
||||
|
||||
The flags STRIP_LOW and ENCODE_LOW are mutual
|
||||
exclusive, and so are STRIP_HIGH and ENCODE_HIGH. In
|
||||
the case they clash, the characters will be
|
||||
@@ -269,20 +269,20 @@ email EMAIL string Removes all characters that can not b
|
||||
filter does `not` validate if the e-mail address has
|
||||
the correct format, use the validate_email filter
|
||||
for that.
|
||||
|
||||
|
||||
url URL string Removes all characters that can not be part of a
|
||||
correctly formed URI. (a-z A-Z 0-9 $ - _ . + ! * ' (
|
||||
) , { } | \ ^ ~ [ ] ` < > # % " ; / ? : @ & =) This
|
||||
filter does `not` validate if a URI has the correct
|
||||
format, use the validate_url filter for that.
|
||||
|
||||
|
||||
number_int NUMBER_INT int Removes all characters that are [^0-9+-].
|
||||
|
||||
number_float NUMBER_FLOAT float Removes all characters that are [^0-9+-].
|
||||
|
||||
$filter_options - an bitmask that supports the
|
||||
following flags:
|
||||
|
||||
|
||||
* ALLOW_FRACTION: adds "." to the characters that
|
||||
are not stripped.
|
||||
* ALLOW_THOUSAND: adds "," to the characters that
|
||||
@@ -308,7 +308,7 @@ supported:
|
||||
The constants should be prepended by `FILTER_` when used with php.
|
||||
|
||||
============= =========== =========== =====================================================
|
||||
Name Constant Return Type Description
|
||||
Name Constant Return Type Description
|
||||
============= =========== =========== =====================================================
|
||||
callback CALLBACK mixed Calls the callback function/method with the input
|
||||
variable's value by reference which can do filtering
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user