The AC_ARG_PROGRAM Autoconf macro provides program name transformations
when installing. This patch implements #64517 and prepares the
implementation for the request #60518.
In ./configure --help it additionally outputs --program-prefix=PREFIX,
--program-suffix=SUFFIX and the upcoming --program-transform-name=PROGRAM
option.
Macro AC_ARG_PROGRAM is available since Autoconf 2.0 and needs to be
called after the AC_CANONICAL_TARGET macro.
Refs:
- https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Transforming-Names.html
These macros are supposed to behave like POSIX's symlink() and link(),
respectively, on POSIX compliant systems and on Windows.
Future scope: merge link.c and link_win32.c
convert_scalar_to_number() will now call cast_object() with an
_IS_NUMBER argument, in which case the cast handler should return
either an integer or floating point number, whichever is more
appropriate.
Previously convert_scalar_to_number() unconditionally converted
objects to integers instead.
Fixes bug #53033.
Fixes bug #54973.
Fixes bug #73108.
The behavior of RANGE_RANGE() is 7.1 changed completely, from
rescaling an already generated number to generating a number
itself. Because of this str_shuffle() ended up generating two
random numbers on every iteration.
To avoid further misuse the function is dropped entirely. Extensions
for PHP >= 7.1 should directly call php_mt_rand_range().
zend_get_parameters_ex() has been marked as deprecated for a long
time already. What zend_get_paramers() does is even more
questionable under PHP7. Both functions are obsoleted by the ZPP
mechanism, so I'm dropping them.
Primarily related to the path handling datatypes, to avoid unnecessary
casts, where possible. Also some rework to avoid code dup. Probably
more places are to go, even not path related, primarily to have less
casts and unsigned integers where possible. That way, we've not only
less warnings and casts, but are also safer with regard to the
integer overflows. OFC it's not a panacea, but still significantly
reduces the vulnerability potential.
The core implementation details are described in win32/nice.c for values sent to proc_nice(), these can however be discussed to maybe comply with those of wmic, Anatol, thoughts?
The test supplied uses wmic for testing the functionality, it could potentially fail on systems where either wmic is not available or the system language is not english (as Microsoft tends to translate even CLI programs).
We add a respective note to UPGRADING. Furthermore, as renaming of zend_qsort()
and the new zend_insert_sort() are irrelevant for user-land, we move this
info to UPGRADING.INTERNALS.
Previous some places passed return_value_ptr only if the function
returned by reference. Now return_value_ptr is always set, even
for functions returning by-value.
This allows you to return zvals without copying their contents. For
this purpose two new macros RETVAL_ZVAL_FAST and RETURN_ZVAL_FAST
are added:
RETVAL_ZVAL_FAST(zv); /* Analog to RETVAL_ZVAL(zv, 1, 0) */
RETURN_ZVAL_FAST(zv); /* Analog to RETURN_ZVAL(zv, 1, 0) */
These macros behave similarly to the non-FAST versions with
copy=1 and dtor=0, with the difference that the FAST versions
will try return the zval without copying by utilizing return_value_ptr.
- Added mechanism to force outer streams to be closed before their inner ones.
- Fixed temp:// streams only handling correctly (through an ad hoc mechanism) reverse closing order
when the inner stream is of type memory.
- Added to UPGRADING information about the new class Transliteral, the new
parameter in dns_get_record and the fact that call_user_func_array no longer
allows call-time pass-by-reference.
. zend_function.pass_rest_by_reference is replaced by
ZEND_ACC_PASS_REST_BY_REFERENCE in zend_function.fn_flags
. zend_function.return_reference is replaced by ZEND_ACC_RETURN_REFERENCE
in zend_function.fn_flags
. zend_arg_info.required_num_args removed. it was needed only for internal
functions. Now the first arg_info for internal function (which has special
meaning) is represented by zend_internal_function_info structure.
. zend_op_array.size, size_var, size_literal, current_brk_cont,
backpatch_count moved into CG(context), because they are used only during
compilation.
. zend_op_array.start_op is moved into EG(start_op), because it's used
only for 'interactive' execution of single top-level op-array.
. zend_op_array.done_pass_two is replaced by ZEND_ACC_DONE_PASS_TWO in
zend_op_array.fn_flags.
. op_array.vars array is trimmed (reallocated) during pass_two.
. zend_class_entry.constants_updated is replaced by
ZEND_ACC_CONSTANTS_UPDATED in zend_class_entry.ce_flags
. the size of zend_class_entry is reduced by sharing the same memory space
by different information for internal and user classes.
See zend_class_inttry.info union.