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
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.
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.
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).
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.
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.
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.
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.
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.
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.
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].
Implement #67331: Have parse_ini_file add empty entries
Some INI processors allow to specify empty values by just giving the
key without the equals sign, for instance MySQL and Python. It appears
to be sensible to add this possibility to our INI parser, so that it
can be used for such INI files as well. We choose NULL as the value of
empty values.
This syntactical enhancement is a (minor) BC break, though, as can be
seen by the necessary change to bug49692.ini. The “comment” formerly
has been simply ignored, but now it would be parsed as key with an
empty value.
Change default of $variant param of idn_to_ascii() and idn_to_utf8()
According to the “Deprecate and remove INTL_IDNA_VARIANT_2003” RFC[1],
we change the default of the $variant parameter of `idn_to_ascii()` and
`idn_to_utf8()` from `INTL_IDNA_VARIANT_2003` to
`INTL_IDNA_VARIANT_UTS46`.
Given that ICU is a set of lively developed libraries, that ICU 50.1
has been released on 2012-11-05, and PHP 7.4 is scheduled to be
released seven years after it, we consider it appropriate to ditch
these legacy versions.
Particularly, that would be a reasonable groundwork to implement part
two of the “Deprecate and remove INTL_IDNA_VARIANT_2003” RFC[1], namely
to default idn_to_ascii()'s and idn_to_utf8()'s $variant parameter to
INTL_IDNA_VARIANT_UTS46, which is not defined in ICU < 4.6.