Commit Graph

378 Commits

Author SHA1 Message Date
Christoph M. Becker
cb262cd974
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80960: opendir() warning wrong info when failed on Windows
2021-04-19 16:17:01 +02:00
Christoph M. Becker
ea3c992bff
Fix #80960: opendir() warning wrong info when failed on Windows
Firstly, we must not forget to set appropriate error codes for "manual"
checks in `virtual_file_ex()`.

Secondly, we must not call `php_error_docref2()` for warnings regarding
unary functions; thus, we introduce `php_win32_docref1_from_error()`.

Closes GH-6872.
2021-04-19 16:12:22 +02:00
Sammy Kaye Powers
a9e96a378d
Expose php_during_module_startup() and php_during_module_shutdown()
This can be handy when trying to determine if it is safe to access request globals amongst other things.

Closes GH-6265
2020-10-05 14:01:43 -07:00
Gabriel Caruso
0574c21b50
Prepare for PHP 8.0 RC1 2020-09-30 00:19:10 +02:00
Gabriel Caruso
7479ab9f80 Update API version numbers
In preparation for PHP 8.0.
2020-08-04 22:25:28 +02:00
Nikita Popov
0d836a39a7 Revert "Prepare for PHP 8.1"
This reverts commit 1ab4d0e6b7.
This reverts commit a359635cb1.
2020-08-04 22:24:44 +02:00
Gabriel Caruso
1ab4d0e6b7
Update API version numbers
In preparation for PHP 8.0.
2020-08-04 18:07:16 +02:00
twosee
88355dd338 Constify char * arguments of APIs
Closes GH-5676.
2020-06-08 10:38:45 +02:00
George Peter Banyard
1df3f97c21 Fix [-Wundef] warning in main folder 2020-05-12 22:01:00 +02:00
Máté Kocsis
4a816584a4
Make float to string casts locale-independent
From now on, float to string casting will always behave locale-independently.
RFC: https://wiki.php.net/rfc/locale_independent_float_to_string
Closes GH-5224

Co-authored-by: George Peter Banyard <girgias@php.net>
2020-05-08 10:52:23 +02:00
Nikita Popov
84854a72c7 Remove mergesort implementation
php_mergesort() isn't being used for anything, and hasn't been for
a long time. Even if we wanted to use a stable sort, this isn't
the implementation we'd use...
2020-02-27 10:36:01 +01:00
Máté Kocsis
662afc80f8
Remove PHP_SLEEP_NON_VOID as it is not useful anymore 2019-11-07 17:56:26 +01:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Dmitry Stogov
78aa89a3ee Update PHP_API_VERSION 2019-09-02 19:02:40 +03:00
Peter Kokot
e0ea444dd3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Convert all php_error_docref0 to php_error_docref
2019-07-13 02:10:17 +02:00
George Peter Banyard
1c1de0c41a Convert all php_error_docref0 to php_error_docref
Closes GH-4394
2019-07-13 02:05:17 +02:00
Nikita Popov
96daf181a6 Merge branch 'PHP-7.4' 2019-07-12 13:18:53 +02:00
Nikita Popov
e2c3bc80e3 Remove duplicate XtOffsetOf() definitions in php.h
These are already defined in zend_portability.h.
2019-07-12 13:18:18 +02:00
Peter Kokot
e676aef56a Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove APACHE symbol
2019-07-08 15:06:54 +02:00
Peter Kokot
4b864c2ebb Remove APACHE symbol
The APACHE symbol was used in very early PHP versions to indicate the
Apache module usage. Since PHP 4 this is no longer used in the code.
2019-07-08 15:05:54 +02:00
Derick Rethans
8ec0cf8be7 Bump API numbers 2019-05-29 09:34:10 +01:00
Nikita Popov
1d53d6df7e Merge branch 'PHP-7.4' 2019-04-17 14:06:05 +02:00
Nikita Popov
f73f190c3f Fix internal_encoding fallback in mbstring
By introducing a hook that is called whenever one of
internal_encoding / input_encoding / output_encoding changes, so
that mbstring can adjust it's internal state.

This also makes internal_encoding work with zend multibyte.
2019-04-17 14:05:53 +02:00
Peter Kokot
a36c856b0a Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove HAVE_STRERROR
2019-04-08 23:40:46 +02:00
Peter Kokot
e6a6017f78 Remove HAVE_STRERROR
Checking for the strerror function presence is no longer needed since it
is part of the C89 standard [1] and can be safely assumed that all
current systems have it.

Check in the configure.ac and Windows defined symbol are still left
until the file library (libmagic) will be updated.

[1]: https://port70.net/~nsz/c/c89/c89-draft.html
2019-04-08 23:39:45 +02:00
Peter Kokot
309edb070d Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove HAVE_LIMITS_H
2019-04-07 15:21:48 +02:00
Peter Kokot
fd1ad1e25a Remove HAVE_LIMITS_H
The `<limits.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_LIMITS_H` symbol
defined by Autoconf in configure.ac [2] can be ommitted and simplifed
however due to bundled file library (libmagic) and timelib still using
it, the removal there was omitted and done only in Zend.m4 file.

Current bundled libraries libtime, oniguruma, and libmagic still include
partial `HAVE_LIMITS_H` usage and will be more refactored when this is
possible.

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
2019-04-07 15:20:02 +02:00
Peter Kokot
2968a1d7f2 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove legacy AC_CHECK_TYPE calls for uint and ulong
2019-03-06 22:50:46 +01:00
Peter Kokot
bebcdcc745 Remove legacy AC_CHECK_TYPE calls for uint and ulong
The AC_CHECK_TYPE was refactored in more recent versions of Autoconf
and the call with two arguments is obsolete and not recommended anymore.

This patch also refactors some leftovers of using ulong and uint which
are not standard nor common usages of types in C.

The ulong can be used as zend_ulong and uint usage is actually
`unsigned int`.

The usage of HAVE_ULONG removed since it is not used in current code
base.

Legacy edgecase for some legacy HPUX systems removed:
- sys/stream.h header is not checked and the HAVE_SYS_STREAM_H is
  not defined with current build system.

- flags are unsigned int
- max_allowed_packet changed to unsigned int
2019-03-06 22:49:16 +01:00
Peter Kokot
ac6b9b0b7f Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove obsolescent AC_HEADER_STDC and memcpy check
2019-03-01 19:24:06 +01:00
Peter Kokot
a700451706 Remove obsolescent AC_HEADER_STDC and memcpy check
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems anymore, including the `AC_HEADER_STDC`.

This macro checks if given system has C89 compliant header files such
as `<string.h>`, `<stdlib.h>`, `<stdarg.h>`, `<float.h>`,... and defines
the `STDC_HEADERS` symbol [2]. Case is that current systems should be
well supported with at least C89 standard headers [3].

Given headers are still additionally checked with the `AC_PROG_CC`
macro, yet not needed anyway.

Additionally, the HAVE_MEMCPY check has been removed. The memcpy
function is standardized by C89 and later.

Refs:
[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
[3] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
2019-03-01 19:22:44 +01:00
Peter Kokot
f1b8c30174 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove PHP_DECLARED_TIMEZONE and HAVE_DECLARED_TIMEZONE
2019-02-28 21:18:06 +01:00
Peter Kokot
f64ae64f52 Remove PHP_DECLARED_TIMEZONE and HAVE_DECLARED_TIMEZONE
The HAVE_DECLARED_TIMEZONE symbol usage has been introduced in
2fd8cbff2a
and then removed via
667a9b9bce.
2019-02-28 21:17:49 +01:00
Peter Kokot
20addf88e4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove unused PHP_AC_BROKEN_SPRINTF and AC_ZEND_BROKEN_SPRINTF
2019-02-23 22:29:16 +01:00
Peter Kokot
b33fa18eab Remove unused PHP_AC_BROKEN_SPRINTF and AC_ZEND_BROKEN_SPRINTF
The sprintf function has been normalized to php_sprintf via
61364b5bb1.

This patch removes the checks to make a custom sprintf function

The ZEND_BROKEN_SPRINTF has been removed and the
hardcoded #define zend_sprintf sprintf is used.

The php_sprintf and zend_sprintf are now symbols to sprintf.

This patch now removes the custom PHP definitions of the php_sprintf and
zend_sprintf functions in favor of the C99 sprintf which is also
standardized in C89 already. Once, on some systems sprintf didn't behave
in same way.
2019-02-23 22:26:47 +01:00
Peter Kokot
623911f993 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove local variables
2019-02-03 21:23:18 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Zeev Suraski
38c337f22e Remove year range from copyright notice 2019-01-30 11:00:23 +02:00
Nikita Popov
3c2e1b6bd5 Bump API numbers
These are of course not the final API numbers, but let's make sure
they differ from the 7.4 branch for now.
2019-01-28 11:17:30 +01:00
Zeev Suraski
67e0138c0d Future-proof email addresses... 2018-11-01 18:30:28 +02:00
Peter Kokot
dcc529aff4 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
2018-09-16 20:50:20 +02:00
Peter Kokot
77118fc925 Remove HAVE_ASSERT_H
The `<assert.h>` header file is part of the standard C89 headers [1] and
on older systems there needed to be also a manual check if header is
present.

Since PHP requires at least C89 manual check and the `HAVE_ASSERT_H`
symbol defined by Autoconf in configure.ac can be both removed [2].

This patch also removes unused <assert.h> includes where c files don't
use the `assert()` macro.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2018-09-09 09:43:03 +02:00
Christoph M. Becker
144e8d1f83 Update API version numbers
These are supposed to be final now for PHP 7.3.
2018-07-31 13:33:48 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Michael Moravec
a5748cab2e
Bump extension, module and PHP API numbers for 7.3 2018-06-14 16:26:13 +02:00
Sara Golemon
df4edde870
Remove padding just merged since 7.3 isn't released yet.
Also bump PHP_API_VERSION since the struct size has changed.
2018-01-23 11:13:41 -05:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Javier Eguiluz
c136fda18e Fixed a typo 2017-12-09 18:39:06 +01:00
Kalle Sommer Nielsen
bfdd22a3de Remove old references to SAPIs and extensions no longer in the core 2017-07-19 09:09:24 +02:00