Skip to content

Commit ae14e4b

Browse files
committed
#133: Posix [add sysconf call](php/php-src#9481)
1 parent fc7ab48 commit ae14e4b

File tree

4 files changed

+43
-1
lines changed

4 files changed

+43
-1
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[
2+
{
3+
"name": "POSIX_SC_ARG_MAX",
4+
"ext_min": "8.3.0alpha1",
5+
"php_min": "8.3.0alpha1"
6+
},
7+
{
8+
"name": "POSIX_SC_PAGESIZE",
9+
"ext_min": "8.3.0alpha1",
10+
"php_min": "8.3.0alpha1"
11+
},
12+
{
13+
"name": "POSIX_SC_NPROCESSORS_CONF",
14+
"ext_min": "8.3.0alpha1",
15+
"php_min": "8.3.0alpha1"
16+
},
17+
{
18+
"name": "POSIX_SC_NPROCESSORS_ONLN",
19+
"ext_min": "8.3.0alpha1",
20+
"php_min": "8.3.0alpha1"
21+
}
22+
]

data/reference/extension/posix/83/functions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,10 @@
33
"name": "posix_eaccess",
44
"ext_min": "8.3.0alpha1",
55
"php_min": "8.3.0alpha1"
6+
},
7+
{
8+
"name": "posix_sysconf",
9+
"ext_min": "8.3.0alpha1",
10+
"php_min": "8.3.0alpha1"
611
}
712
]

src/Application/Command/Init/InitHandler.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,11 @@ private function majorReleaseDefinitionProvider(): Generator
950950
];
951951

952952
yield 'posix' => [
953-
'constants' => ['51', '70'],
953+
'constants' => [
954+
'51',
955+
'70',
956+
'83',
957+
],
954958
'functions' => [
955959
'40', '42',
956960
'51', '52',

tests/Reference/Extension/PhpBundle/Posix/PosixExtensionTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ class PosixExtensionTest extends GenericTestCase
2828
*/
2929
public static function setUpBeforeClass(): void
3030
{
31+
self::$optionalconstants = [
32+
// Requires _SC_ARG_MAX
33+
'POSIX_SC_ARG_MAX',
34+
// Requires _SC_PAGESIZE
35+
'POSIX_SC_PAGESIZE',
36+
// Requires _SC_NPROCESSORS_CONF
37+
'POSIX_SC_NPROCESSORS_CONF',
38+
// Requires _SC_NPROCESSORS_ONLN
39+
'POSIX_SC_NPROCESSORS_ONLN',
40+
];
41+
3142
self::$optionalfunctions = [
3243
// Requires HAVE_EACCESS
3344
'posix_eaccess',

0 commit comments

Comments
 (0)