]> granicus.if.org Git - php/log
php
6 years agoDrop ext/spl/spl.php
Nikita Popov [Fri, 21 Sep 2018 07:00:51 +0000 (09:00 +0200)]
Drop ext/spl/spl.php

Leftover from ext/spl/internal, which was removed previously.

6 years agoMerge branch 'PHP-7.3'
Christoph M. Becker [Sat, 22 Sep 2018 13:57:28 +0000 (15:57 +0200)]
Merge branch 'PHP-7.3'

* PHP-7.3:
  Fix #66828: iconv_mime_encode Q-encoding longer than it should be

6 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Sat, 22 Sep 2018 13:43:06 +0000 (15:43 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #66828: iconv_mime_encode Q-encoding longer than it should be

6 years agoMerge branch 'PHP-7.1' into PHP-7.2
Christoph M. Becker [Sat, 22 Sep 2018 13:30:08 +0000 (15:30 +0200)]
Merge branch 'PHP-7.1' into PHP-7.2

* PHP-7.1:
  Fix #66828: iconv_mime_encode Q-encoding longer than it should be

6 years agoFix #66828: iconv_mime_encode Q-encoding longer than it should be
Christoph M. Becker [Sat, 22 Sep 2018 13:20:20 +0000 (15:20 +0200)]
Fix #66828: iconv_mime_encode Q-encoding longer than it should be

Before the fix for bug 48289 has been applied, the algorithm to
construct a Q-encoded-word has been optimistic, i.e. try to encode as
many bytes that *may* fit in the remaining space, calculate the actual
length of the Q-encoded word, and if it's too long, try again with a
reduced size.  However, the fix for the mentioned bug replaced this by
a pessimistic algorithm, which always terminates[1] the for loop[2]
during the first iteration (which renders the following 3 lines as dead
code), and as such easily produces unnecessarily short encoded-words.
Instead the proper fix for the bug would have been to make sure that
`out_size` is always decremented, if the space isn't sufficient for the
encoded-word.

[1] <https://github.com/php/php-src/blob/php-7.3.0beta3/ext/iconv/iconv.c#L1421>
[2] <https://github.com/php/php-src/blob/php-7.3.0beta3/ext/iconv/iconv.c#L1360>

6 years agoMerge branch 'PHP-7.3'
Anatol Belski [Sat, 22 Sep 2018 00:11:06 +0000 (02:11 +0200)]
Merge branch 'PHP-7.3'

* PHP-7.3:
  Fix test and add skip section

6 years agoFix test and add skip section
Anatol Belski [Sat, 22 Sep 2018 00:10:43 +0000 (02:10 +0200)]
Fix test and add skip section

6 years ago[ci skip] Update UPGRADING.INTERNALS
Anatol Belski [Fri, 21 Sep 2018 14:27:51 +0000 (16:27 +0200)]
[ci skip] Update UPGRADING.INTERNALS

6 years agoRename *.p5c files to *.inc
Peter Kokot [Fri, 21 Sep 2018 17:07:49 +0000 (19:07 +0200)]
Rename *.p5c files to *.inc

When including files in PHP tests a good practice so far has been to use
the *.inc extension. This patch renames few *.p5c files that are
included in phpt files.

6 years agoAdd directory structure to the contributing docs
Peter Kokot [Sat, 15 Sep 2018 15:26:02 +0000 (17:26 +0200)]
Add directory structure to the contributing docs

This patch adds a php-src directory structure introduction to the
contributing guidelines. Thanks to the discussion at [1] and PHP
manual.

[1] https://github.com/php/php-src/pull/3520

6 years agoMerge branch 'PHP-7.3'
Anatol Belski [Fri, 21 Sep 2018 13:58:50 +0000 (15:58 +0200)]
Merge branch 'PHP-7.3'

* PHP-7.3:
  Add test for bug #76909
  Fixed bug #76909 preg_match difference between 7.3 and < 7.3
  Upgrade PCRE2 to 10.32

6 years agoAdd test for bug #76909
Anatol Belski [Fri, 21 Sep 2018 13:57:00 +0000 (15:57 +0200)]
Add test for bug #76909

6 years agoFixed bug #76909 preg_match difference between 7.3 and < 7.3
Anatol Belski [Fri, 21 Sep 2018 13:55:03 +0000 (15:55 +0200)]
Fixed bug #76909 preg_match difference between 7.3 and < 7.3

Applied upstream patch, see https://bugs.exim.org/show_bug.cgi?id=2321

6 years agoUpgrade PCRE2 to 10.32
Anatol Belski [Tue, 18 Sep 2018 12:16:06 +0000 (14:16 +0200)]
Upgrade PCRE2 to 10.32

(cherry picked from commit d918e0776b5168aed2707b0ca500589844f0faa8)

6 years agoUpdate NEWS and UPGRADING wrt. PR 2760
Christoph M. Becker [Fri, 21 Sep 2018 13:00:07 +0000 (15:00 +0200)]
Update NEWS and UPGRADING wrt. PR 2760

6 years agoMerge branch 'PHP-7.3'
Christoph M. Becker [Fri, 21 Sep 2018 13:06:35 +0000 (15:06 +0200)]
Merge branch 'PHP-7.3'

* PHP-7.3:
  Fix
  Fix

6 years agoFix permissions
Peter Kokot [Tue, 18 Sep 2018 20:46:20 +0000 (22:46 +0200)]
Fix permissions

Certain files don't need to be executables.

6 years agoRemove HAVE_TIME_H
Peter Kokot [Tue, 18 Sep 2018 17:26:19 +0000 (19:26 +0200)]
Remove HAVE_TIME_H

The `<time.h>` header file is part of the standard C89 headers [1] and
on current systems can be included unconditionally.

Since PHP requires at least C89 or greater, the `HAVE_TIME_H` symbol
defined by Autoconf in ext/pdo_sqlite/config.m4 [2] can be ommitted and
simplifed.

Additionally, since PHP didn't define `HAVE_TIME_H` prior in the
configure.ac the occurrence of this symbol in cli can be removed.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4

6 years agoFix
Sebastian Bergmann [Thu, 20 Sep 2018 16:01:34 +0000 (12:01 -0400)]
Fix

6 years agoFix
Sebastian Bergmann [Thu, 20 Sep 2018 15:53:27 +0000 (11:53 -0400)]
Fix

6 years agoMerge branch 'PHP-7.3'
Dmitry Stogov [Thu, 20 Sep 2018 09:34:31 +0000 (12:34 +0300)]
Merge branch 'PHP-7.3'

* PHP-7.3:
  Fixed bug #76711 (OPcache enabled triggers false-positive "Illegal string offset")

6 years agoFixed bug #76711 (OPcache enabled triggers false-positive "Illegal string offset")
Dmitry Stogov [Thu, 20 Sep 2018 09:33:46 +0000 (12:33 +0300)]
Fixed bug #76711 (OPcache enabled triggers false-positive "Illegal string offset")

6 years agoUpdate to SQLite 3.25.1
Christoph M. Becker [Wed, 19 Sep 2018 18:01:04 +0000 (20:01 +0200)]
Update to SQLite 3.25.1

6 years agoUse macro
Dmitry Stogov [Wed, 19 Sep 2018 15:09:32 +0000 (18:09 +0300)]
Use macro

6 years agoImproved hash copying
Dmitry Stogov [Wed, 19 Sep 2018 14:53:10 +0000 (17:53 +0300)]
Improved hash copying

6 years agoDrop unused variable
Dmitry Stogov [Wed, 19 Sep 2018 11:43:17 +0000 (14:43 +0300)]
Drop unused variable

6 years agoTurn zend_hash_exists() into inline function
Dmitry Stogov [Wed, 19 Sep 2018 10:55:53 +0000 (13:55 +0300)]
Turn zend_hash_exists() into inline function

6 years agoUse zend_hash_find() instead of zend_hash_exists()
Dmitry Stogov [Wed, 19 Sep 2018 10:55:27 +0000 (13:55 +0300)]
Use zend_hash_find() instead of zend_hash_exists()

6 years agoMicro-optimization
Dmitry Stogov [Wed, 19 Sep 2018 10:54:37 +0000 (13:54 +0300)]
Micro-optimization

6 years agoRemove zend_hash_exists()
Dmitry Stogov [Wed, 19 Sep 2018 10:54:02 +0000 (13:54 +0300)]
Remove zend_hash_exists()

6 years agoMerge branch 'PHP-7.3'
Nikita Popov [Wed, 19 Sep 2018 10:32:03 +0000 (12:32 +0200)]
Merge branch 'PHP-7.3'

6 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Wed, 19 Sep 2018 10:31:55 +0000 (12:31 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

6 years agoMerge branch 'PHP-7.1' into PHP-7.2
Nikita Popov [Wed, 19 Sep 2018 10:31:46 +0000 (12:31 +0200)]
Merge branch 'PHP-7.1' into PHP-7.2

6 years agoFix getColumnMeta() test
Nikita Popov [Mon, 17 Sep 2018 14:36:05 +0000 (16:36 +0200)]
Fix getColumnMeta() test

Newer MySQL versions are stricter about invalid values. Three issues
are fixed:

* Don't use negative values with ZEROFILL. ZEROFILL implies UNSIGNED.
* Use a legal TIMESTAMP value. TIMESTAMP does not accept a Unix timestamp.
* Specify BIGINT values as strings, to avoid overflows.

This is a cherry-pick of d2dc0a32911c0e08986da799ce11e18c3fa5ca57 from master.

6 years agoFix intermittent failures in mysqli_stmt_bind_result_format.phpt
Nikita Popov [Wed, 19 Sep 2018 09:31:42 +0000 (11:31 +0200)]
Fix intermittent failures in mysqli_stmt_bind_result_format.phpt

There were two distinct issues here:
 * $trend was compared against 'NULL' using !=, which does not work
   as intended in the case where $trend==0.0.
 * current_targets was declared as double(17,0), which means that
   the fractional part was rounded, so that the same comparison in
   SQL (rounded) and in PHP (not rounded) did not necessarily
   match.

Please don't write mt_rand based tests, it takes ages to debug this
crap...

6 years agoRemove zend_hash_exists()
Dmitry Stogov [Wed, 19 Sep 2018 09:22:58 +0000 (12:22 +0300)]
Remove zend_hash_exists()

6 years agoImprove ZEND_VM_SMART_BRANCH()
Dmitry Stogov [Wed, 19 Sep 2018 08:47:02 +0000 (11:47 +0300)]
Improve ZEND_VM_SMART_BRANCH()

6 years agoMerge branch 'PHP-7.3'
Nikita Popov [Wed, 19 Sep 2018 07:40:12 +0000 (09:40 +0200)]
Merge branch 'PHP-7.3'

6 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Wed, 19 Sep 2018 07:39:21 +0000 (09:39 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

6 years agoMerge branch 'PHP-7.1' into PHP-7.2
Nikita Popov [Wed, 19 Sep 2018 07:38:17 +0000 (09:38 +0200)]
Merge branch 'PHP-7.1' into PHP-7.2

6 years agoFixed bug #76901
Nikita Popov [Wed, 19 Sep 2018 07:37:04 +0000 (09:37 +0200)]
Fixed bug #76901

get_method() may modify the object pointer passed to it if method
forwarding is used. In this case we do not want to modify the
passed zval, so make sure that we copy the object into a temporary
first.

6 years agoRemove unused methods-on-non-objects-nested.inc
Peter Kokot [Tue, 18 Sep 2018 19:58:40 +0000 (21:58 +0200)]
Remove unused methods-on-non-objects-nested.inc

File `Zend/tests/methods-on-non-objects-nested.inc` was introduced
in 971d369d8849f9200f568b39b607417d1fc384f7 and made obsolete in
1c94ff0595bbe6f3df8058aff7252bda09dc4a15.

6 years agoMerge branch 'PHP-7.3'
Nikita Popov [Tue, 18 Sep 2018 18:51:50 +0000 (20:51 +0200)]
Merge branch 'PHP-7.3'

6 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Tue, 18 Sep 2018 18:51:13 +0000 (20:51 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

6 years agoMerge branch 'PHP-7.1' into PHP-7.2
Nikita Popov [Tue, 18 Sep 2018 18:50:27 +0000 (20:50 +0200)]
Merge branch 'PHP-7.1' into PHP-7.2

6 years agoFix bug #75533: array_reduce is slow when $carry is large array
Manabu Matsui [Wed, 22 Nov 2017 02:07:15 +0000 (11:07 +0900)]
Fix bug #75533: array_reduce is slow when $carry is large array

6 years agoClass constants and default property values can't be IS_REFERENCE anymore.
Dmitry Stogov [Tue, 18 Sep 2018 15:46:10 +0000 (18:46 +0300)]
Class constants and default property values can't be IS_REFERENCE anymore.

6 years agoFixed crashes in ZTS build introduced by 689c6fb188c9dfe5e428492b4b80f8d6f586a7e5
Dmitry Stogov [Tue, 18 Sep 2018 13:49:58 +0000 (16:49 +0300)]
Fixed crashes in ZTS build introduced by 689c6fb188c9dfe5e428492b4b80f8d6f586a7e5

6 years agoUpgrade PCRE2 to 10.32
Anatol Belski [Tue, 18 Sep 2018 12:16:06 +0000 (14:16 +0200)]
Upgrade PCRE2 to 10.32

6 years agoRemove server-tests.php
Nikita Popov [Mon, 17 Sep 2018 10:49:10 +0000 (12:49 +0200)]
Remove server-tests.php

As far as I know server-tests.php is unmaintained and no longer
used for anything nowadays. Some of the new sections are supported
by run-tests.php itself nowadays and some server-based tests
(using the CLI server or php-fpm) are performed through different
means.

Dropping server-tests.php has been discussed in a bunch of PR
discussions already, so let's go ahead with it...

6 years agoSimplify buffer management in php_intl_idn_to_46()
Nikita Popov [Tue, 18 Sep 2018 10:46:13 +0000 (12:46 +0200)]
Simplify buffer management in php_intl_idn_to_46()

Instead of manually tracking how/whether the buffer is used, make
use of the string refcount.

6 years agoMerge branch 'PHP-7.3'
Nikita Popov [Tue, 18 Sep 2018 10:39:13 +0000 (12:39 +0200)]
Merge branch 'PHP-7.3'

6 years agoRemove invalid free
Nikita Popov [Tue, 18 Sep 2018 10:37:12 +0000 (12:37 +0200)]
Remove invalid free

The initialization of buffer has been moved further down in 7.3,
so this free is no longer legal.

6 years agoDrop --without-libzip option from Travis
Nikita Popov [Mon, 17 Sep 2018 15:24:06 +0000 (17:24 +0200)]
Drop --without-libzip option from Travis

We need to build against the system libzip now.

Also add an UPGRADING note.

6 years agoRemove bundled libzip
Nikita Popov [Mon, 17 Sep 2018 15:19:12 +0000 (17:19 +0200)]
Remove bundled libzip

6 years agodrop support for bundled libzip (linux)
Remi Collet [Thu, 7 Sep 2017 12:26:19 +0000 (14:26 +0200)]
drop support for bundled libzip (linux)

6 years agoDrop unused variable
Nikita Popov [Mon, 17 Sep 2018 19:34:31 +0000 (21:34 +0200)]
Drop unused variable

6 years agoRemove legacy add_*_unset() macros
Nikita Popov [Mon, 17 Sep 2018 19:27:25 +0000 (21:27 +0200)]
Remove legacy add_*_unset() macros

These have been superseded by add_*_null().

6 years agoRemove add_method() macro
Nikita Popov [Mon, 17 Sep 2018 19:25:01 +0000 (21:25 +0200)]
Remove add_method() macro

Which uses add_assoc_function(), which doesn't exist anymore...

6 years agoMerge branch 'PHp-7.3'
Anatol Belski [Tue, 18 Sep 2018 08:47:34 +0000 (10:47 +0200)]
Merge branch 'PHp-7.3'

* PHp-7.3:
  Add spectre switch for suitable vc14 versions

6 years agoMerge branch 'PHP-7.2' into PHP-7.3
Anatol Belski [Tue, 18 Sep 2018 08:46:44 +0000 (10:46 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Add spectre switch for suitable vc14 versions

6 years agoMerge branch 'PHP-7.1' into PHP-7.2
Anatol Belski [Tue, 18 Sep 2018 08:45:18 +0000 (10:45 +0200)]
Merge branch 'PHP-7.1' into PHP-7.2

* PHP-7.1:
  Add spectre switch for suitable vc14 versions

6 years agoAdd spectre switch for suitable vc14 versions
Anatol Belski [Tue, 18 Sep 2018 08:43:52 +0000 (10:43 +0200)]
Add spectre switch for suitable vc14 versions

6 years agoReplace ZEND_ACC_ANON_BOUND, ZEND_ACC_UNRESOLVED_PARENT and ZEND_ACC_UNRESOLVED_INTER...
Dmitry Stogov [Tue, 18 Sep 2018 08:41:40 +0000 (11:41 +0300)]
Replace ZEND_ACC_ANON_BOUND, ZEND_ACC_UNRESOLVED_PARENT and ZEND_ACC_UNRESOLVED_INTERFACES with single ZEND_ACC_LINKED.

6 years agoRemove HAVE_STDARG_H
Peter Kokot [Mon, 17 Sep 2018 02:39:01 +0000 (04:39 +0200)]
Remove HAVE_STDARG_H

The C89 standard and later defines the `<stdarg.h>` header as part of
the standard headers [1]. On current systems it is always present and
can be included unconditionally.

Checking for presence and functionality of the `<stdarg.h>` header and
variadic function is not relevant anymore on current systems since this
is always available.

Also Autoconf suggests relying on at least C89 or above [2] and [3].

The following files were regenerated with re2c 1.0.3:
- Zend/zend_language_scanner.c
- Zend/zend_language_scanner_defs.h

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html

6 years agoRemove HAVE_STRING_H
Peter Kokot [Sat, 15 Sep 2018 23:14:08 +0000 (01:14 +0200)]
Remove HAVE_STRING_H

The C89 standard and later defines the `<string.h>` header as part of
the standard headers [1] and on current systems it is always present.

Code included also `<strings.h>` header as an alterinative in some
files. This kind of check was relevant on some older systems where the
`<strings.h>` file included definitions for the C89 compliant
`<string.h>`. Today such alternative check is not required anymore. The
`<strings.h>` file is part of the POSIX definition these days.

Also Autoconf suggests doing this and relying on C89 or above [2] and [3].

This patch also cleans few unused `<strings.h>` inclusions in the libmbfl.

[1]: https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2]: http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3]: https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html

6 years agoFix config.guess and config.sub files in .gitignore
Peter Kokot [Tue, 18 Sep 2018 03:21:19 +0000 (05:21 +0200)]
Fix config.guess and config.sub files in .gitignore

Files `config.guess` and `config.sub` are committed in the php-src
repository so these don't need to be ignored for the root directory.
For the extensions these can be ignored in case of building extension
inside the php-src with phpize.

6 years agoMerge branch 'PHP-7.3'
Pierrick Charron [Tue, 18 Sep 2018 00:31:36 +0000 (20:31 -0400)]
Merge branch 'PHP-7.3'

6 years agoMerge branch 'PHP-7.2' into PHP-7.3
Pierrick Charron [Tue, 18 Sep 2018 00:31:07 +0000 (20:31 -0400)]
Merge branch 'PHP-7.2' into PHP-7.3

6 years agoMerge branch 'PHP-7.1' into PHP-7.2
Pierrick Charron [Tue, 18 Sep 2018 00:30:18 +0000 (20:30 -0400)]
Merge branch 'PHP-7.1' into PHP-7.2

6 years agoFix 76480: Use curl_multi_wait() so that timeouts are respected
Pierrick Charron [Tue, 18 Sep 2018 00:28:44 +0000 (20:28 -0400)]
Fix 76480: Use curl_multi_wait() so that timeouts are respected

6 years agoRemove my_estrdup() and my_efree() macros
Nikita Popov [Mon, 17 Sep 2018 18:52:12 +0000 (20:52 +0200)]
Remove my_estrdup() and my_efree() macros

Replace the single use of my_efree().

6 years agoRemove ZEND_EARLY_BINDING_* constants
Nikita Popov [Mon, 17 Sep 2018 18:46:46 +0000 (20:46 +0200)]
Remove ZEND_EARLY_BINDING_* constants

It seems like these were never actually used.

6 years agoRemove ZEND_OBJECTS_STORE_HANDLERS macro
Nikita Popov [Mon, 17 Sep 2018 16:38:50 +0000 (18:38 +0200)]
Remove ZEND_OBJECTS_STORE_HANDLERS macro

Object store handlers are no longer a thing since PHP 7.

6 years agoRemove unused ZEND_CT and ZEND_RT constants
Nikita Popov [Mon, 17 Sep 2018 16:36:08 +0000 (18:36 +0200)]
Remove unused ZEND_CT and ZEND_RT constants

6 years agoRemove unused HAVE_BROKEN_GLIBC_FOPEN_APPEND
Nikita Popov [Mon, 17 Sep 2018 16:26:50 +0000 (18:26 +0200)]
Remove unused HAVE_BROKEN_GLIBC_FOPEN_APPEND

This has not been used since PHP 5.0.

6 years agoUse different loop terminating conditions
Dmitry Stogov [Mon, 17 Sep 2018 17:39:28 +0000 (20:39 +0300)]
Use different loop terminating conditions

6 years agoMerge branch 'PHP-7.3'
Dmitry Stogov [Mon, 17 Sep 2018 17:21:05 +0000 (20:21 +0300)]
Merge branch 'PHP-7.3'

* PHP-7.3:
  Allow switching back to Zend MM heap.

6 years agoAllow switching back to Zend MM heap.
Dmitry Stogov [Mon, 17 Sep 2018 17:20:13 +0000 (20:20 +0300)]
Allow switching back to Zend MM heap.

6 years agoRemove __USE_GNU defines
Nikita Popov [Mon, 17 Sep 2018 15:51:00 +0000 (17:51 +0200)]
Remove __USE_GNU defines

This is an internal glibc macro, it should not be necessary to use
it if we already define _GNU_SOURCE (we do through
AC_USE_SYSTEM_EXTENSIONS). Needing to use __USE_GNU generally
indicates an inclusion order problem (libc header included before
config.h).

6 years agoDon't export anything in php_sysvmsg.h
Nikita Popov [Mon, 17 Sep 2018 15:49:09 +0000 (17:49 +0200)]
Don't export anything in php_sysvmsg.h

These are all only relevant for the implementation.

6 years agoSet correct error code and adapt test
Anatol Belski [Mon, 17 Sep 2018 15:18:39 +0000 (17:18 +0200)]
Set correct error code and adapt test

6 years agoSwitch Travis build to Xenial
Nikita Popov [Mon, 17 Sep 2018 11:37:33 +0000 (13:37 +0200)]
Switch Travis build to Xenial

Also explicitly start the mysql and pgsql services, as these are
no longer running by default.

6 years agoFix getColumnMeta() test
Nikita Popov [Mon, 17 Sep 2018 14:36:05 +0000 (16:36 +0200)]
Fix getColumnMeta() test

Newer MySQL versions are stricter about invalid values. Three issues
are fixed:

* Don't use negative values with ZEROFILL. ZEROFILL implies UNSIGNED.
* Use a legal TIMESTAMP value. TIMESTAMP does not accept a Unix timestamp.
* Specify BIGINT values as strings, to avoid overflows.

6 years agoDon't install libt1-dev on travis
Nikita Popov [Mon, 17 Sep 2018 11:47:35 +0000 (13:47 +0200)]
Don't install libt1-dev on travis

Support for libt1 has been removed from ext/gd in PHP 7.0 by
7dcfdbbee431c93c52605e1df323d18e0c6088e9, so we no longer need
to install this package. It is also no longer available on newer
Ubuntu versions.

6 years agoRemove unused MREMAP_MAYMOVE compatibility define
Nikita Popov [Mon, 17 Sep 2018 10:18:09 +0000 (12:18 +0200)]
Remove unused MREMAP_MAYMOVE compatibility define

6 years agoFix error setting, both errors are needed
Anatol Belski [Mon, 17 Sep 2018 11:33:49 +0000 (13:33 +0200)]
Fix error setting, both errors are needed

6 years agoRemove unused HAVE_MEM_MMAP_ANON and HAVE_MEM_MMAP_ZERO checks
Nikita Popov [Mon, 17 Sep 2018 10:03:45 +0000 (12:03 +0200)]
Remove unused HAVE_MEM_MMAP_ANON and HAVE_MEM_MMAP_ZERO checks

These haven't been used since the MM rewrite in PHP 7.0. Nowadays
we assume that either MAP_ANON or MAP_ANONYMOUS is available.

6 years agoRemove __GNUC__ guard around stddef.h include
Nikita Popov [Mon, 17 Sep 2018 09:54:22 +0000 (11:54 +0200)]
Remove __GNUC__ guard around stddef.h include

HAVE_STDDEF_H guards have been removed by
6c1ff61a368a26c8f2cbf383aa8a26fc30cf59ef, because the header is
always available in C89. This removes a __GNUC__ guard for the
same header.

6 years agoFix localized error messages and memory leaks
Anatol Belski [Mon, 17 Sep 2018 07:48:33 +0000 (09:48 +0200)]
Fix localized error messages and memory leaks

The FormatMessage API needs to LocalFree the delivered error messages.
In cases where messages are delivered in non ASCII compatible encoding,
the messages might be unreadable. This aligns the error message encoding
with the encoding settings in PHP, the focus is UTF-8 as default.

Initialize error buffer

Avoid code duplication

6 years agoDon't use xml resource in openssl test
Nikita Popov [Mon, 17 Sep 2018 08:20:26 +0000 (10:20 +0200)]
Don't use xml resource in openssl test

Instead use a file resource, removing the dependency on ext/xml.

6 years agoRemove PHP_XML_INTERNAL defines
Nikita Popov [Mon, 17 Sep 2018 08:13:18 +0000 (10:13 +0200)]
Remove PHP_XML_INTERNAL defines

This macro is no longer used.

6 years agoPerform final GC before the object store is freed
Nikita Popov [Sun, 16 Sep 2018 11:42:00 +0000 (13:42 +0200)]
Perform final GC before the object store is freed

free_object_storage intentionally does not free the object allocations
to make sure that they show up as leaks. However, if the object is in
the GC root buffer, the later GC run may end up freeing the allocation,
hiding the leak.

Avoid this by moving the final GC run before free_object_storage, the
way it was done before fast_shutdown was integrated into core.

6 years agoRemove HAVE_STDIO_H
Peter Kokot [Mon, 17 Sep 2018 00:00:51 +0000 (02:00 +0200)]
Remove HAVE_STDIO_H

The `<stdio.h>` header file is part of the standard C89 headers [1]
and on current systems can be included unconditionally.

Since PHP requires at least C89 or greater, the `HAVE_STDIO_H` symbol
defined by Autoconf [2] can be ommitted and simplifed.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4

6 years agoMake PHP development tools files executable
Peter Kokot [Sun, 16 Sep 2018 22:02:36 +0000 (00:02 +0200)]
Make PHP development tools files executable

This patch makes few remaining PHP development tools files
executable and adds a shebang to them.

The `#!/usr/bin/env php` shebang provides running the script via
`./script.php` and uses env to find PHP script location on the system.
At the same time it still provides running the script with a user
defined PHP location using `php script.php`. Shebang is not visible in
the output of the generated file.

6 years agoExplain why the test was skipped
Gabriel Caruso [Sun, 16 Sep 2018 20:31:06 +0000 (17:31 -0300)]
Explain why the test was skipped

6 years agoRemove HAVE_STDLIB_H
Peter Kokot [Sat, 15 Sep 2018 21:59:45 +0000 (23:59 +0200)]
Remove HAVE_STDLIB_H

The C89 and later standard defines the `<stdlib.h>` header as part of
the standard headers [1] and on current systems it is always present
and the `HAVE_STDLIB_H` symbol can be removed.

Also Autoconf suggests doing this and relying on C89 or above [2] and [3].

[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html

6 years agoRemove HAVE_SYS_VARARGS_H
Peter Kokot [Sun, 16 Sep 2018 01:31:24 +0000 (03:31 +0200)]
Remove HAVE_SYS_VARARGS_H

Outdated systems used to provide the `<varargs.h>` and in case of PHP
`<sys/varargs.h>`. [1]

Current systems have `<stdarg.h>` which is also a C89 standard header
and systems have it always present. [2]

[1] https://en.wikipedia.org/wiki/Stdarg.h#varargs.h
[2] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2

6 years agoUse EXPECT instead of EXPECTF when possible
Gabriel Caruso [Thu, 16 Aug 2018 02:52:44 +0000 (23:52 -0300)]
Use EXPECT instead of EXPECTF when possible

6 years agoRemove unnecessary destroy wrappers
Nikita Popov [Sun, 16 Sep 2018 15:14:46 +0000 (17:14 +0200)]
Remove unnecessary destroy wrappers

There used to be needed due to ZEND_FILE_LINE in debug builds.
As the argument is no longer passed, we don't need the wrappers
either.