Commit Graph

189 Commits

Author SHA1 Message Date
Nikita Popov
26d417d758 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix gidlist allocation leak on error
2021-04-11 10:38:07 +02:00
Nikita Popov
454d297564 Fix gidlist allocation leak on error 2021-04-11 10:37:40 +02:00
Nikita Popov
032905b5a0 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Support more than NGROUPS_MAX groups on macos
2021-04-08 12:25:16 +02:00
Nikita Popov
eebcfeb68e Support more than NGROUPS_MAX groups on macos
I suspect this is the cause for our recent CI failures. Apparently,
on macos it is possible for getgroups() to return more than
NGROUPS_MAX groups. We avoid an EINVAL in that case by fetching
the exact number of groups in advance. This should work on both
macos and posix systems.
2021-04-08 12:23:39 +02:00
Máté Kocsis
ffff237497
Promote warning to exception in ext/posix
Closes GH-6009
2020-08-24 17:34:33 +02:00
Max Semenik
2b5de6f839
Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
Nikita Popov
aa2e68cf6e Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79570
2020-06-19 17:32:34 +02:00
Nikita Popov
525d8a8bfa Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79570
2020-06-19 17:32:21 +02:00
Böszörményi Zoltán
6aff9a50ca Fixed bug #79570
Use the same logic for getgrgid_r, getpwnam_r and getpwuid_r
as for getgrnam_r in #75696

Closes GH-5740.
2020-06-19 17:31:28 +02:00
George Peter Banyard
e6930bcfba More [-Wundef] warnings fixed in POSIX extension
Forgot to squash this into the other commit
2020-05-20 18:22:10 +02:00
George Peter Banyard
f677251ceb Fix [-Wundef] warning in POSIX extension 2020-05-20 14:01:11 +02:00
Máté Kocsis
21cfa03f17
Generate function entries for another batch of extensions
Closes GH-5352
2020-04-05 21:15:30 +02:00
Máté Kocsis
d1764ca330
Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Máté Kocsis
8f4f1dea34
Convert zend_parse_parameters_none() to fast ZPP
I've done the conversion in those extensions where fast ZPP is predominant.
2020-01-03 13:23:37 +01:00
Máté Kocsis
345703724c
Use RETURN_THROWS() during ZPP in most of the extensions
Except for some bigger ones: reflection, sodium, spl
2019-12-31 11:46:11 +01:00
Nikita Popov
647b1c7fcf Remove most uses of ZEND_PARSE_PARAMETERS_END_EX()
As ZPP now throws, it makes no sense to specify an explicit return
value.
2019-10-07 10:02:18 +02:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Stephen Reay
f40cc41465 Added arginfo stub for posix extension 2019-08-14 14:40:37 +02:00
Nikita Popov
0d31a8e4e1 Merge branch 'PHP-7.4' 2019-06-20 17:24:43 +02:00
Nikita Popov
d80f0ff6c0 Handle gr_mem misalignment on macos 2019-06-20 17:24:06 +02:00
Nikita Popov
1df8175b61 Convert fetch_resource warnings into TypeErrors
More type checks that are not part of zpp and should generate a
TypeError in PHP 8.
2019-06-03 09:17:12 +02:00
Dmitry Stogov
f1b306fe11 Switch to use ZTS cache 2019-03-12 14:15:47 +03: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
Nikita Popov
ac03b15e3c 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).
2018-09-17 17:51:00 +02:00
Christoph M. Becker
0a51e75e28 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #75696: posix_getgrnam fails to print details of group
2018-09-01 14:30:08 +02:00
Christoph M. Becker
7bcda659f8 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #75696: posix_getgrnam fails to print details of group
2018-09-01 14:28:13 +02:00
Christoph M. Becker
2677d43850 Fix #75696: posix_getgrnam fails to print details of group
According to the POSIX specification of `getgrnam_r()` the result of
`sysconf(_SC_GETGR_R_SIZE_MAX)` is an initial value suggested for the
size of the buffer, and `ERANGE` signals that insufficient storage was
supplied.  So if we get `ERANGE`, we try again with a buffer twice as
big, and so on, instead of failing.
2018-09-01 14:25:59 +02:00
Dmitry Stogov
4a475a4976 Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Stanislav Malyshev
f61e1d28fe Merge branch 'pull-request/3288'
* pull-request/3288:
  Fix bug #75481: makedev warning
2018-06-19 16:43:52 -07:00
Peter Kokot
97f2ce4031 Fix bug #75481: makedev warning
To use makedev the sys/sysmacros.h needs to be included on newer
systems.
2018-06-13 04:36:55 +02:00
Peter Kokot
c03ee19230 Normalize the POSIX phpinfo output
Instead of the Git attributes ident blob object name display only
extension status (enabled).
2018-06-02 13:35:22 +02:00
Gabriel Caruso
1314f0fb3a Use int instead of long in protos 2018-02-23 11:06:20 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Dmitry Stogov
6a9d2b2190 Cleanup type conversion 2017-12-07 19:24:55 +03:00
Dmitry Stogov
9c2a1f52a5 Avoid useless dereferences and separations during paramter passing. 2017-06-19 12:55:59 +03:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Sara Golemon
e2a159fe01 Use new param API in posix 2016-12-28 11:48:36 -08:00
Nikita Popov
8e855534b7 Fix posix build 2016-05-01 13:07:01 +02:00
Xinchen Hui
895337ddbd Fixed bug #72133 (php_posix_group_to_array crashes if gr_passwd is NULL) 2016-05-01 11:00:41 +08:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Nikita Popov
788c4c852d Fix posix_setrlimit segfault 2015-07-09 20:40:07 +02:00
Magnus Määttä
a55ca9a8d1 Fix posix_setrlimit() to use int as values instead of strings.
Add constant for unlimited (POSIX_RLIMIT_INFINITY).
2015-07-09 00:04:13 +02:00
Magnus Määttä
963d906aff Add posix_setrlimit() FR #54603 2015-07-08 22:12:07 +02:00
Anatol Belski
663074b6b1 cleanup mod version macros and mod defs, round x 2015-03-23 21:30:22 +01:00