Skip to content

Commit 2acfab9

Browse files
committed
#133: Posix [add sysconf call](php/php-src#9481)
1 parent 33dc78f commit 2acfab9

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
@@ -1006,7 +1006,11 @@ private function majorReleaseDefinitionProvider(): Generator
10061006
];
10071007

10081008
yield 'posix' => [
1009-
'constants' => ['51', '70'],
1009+
'constants' => [
1010+
'51',
1011+
'70',
1012+
'83',
1013+
],
10101014
'functions' => [
10111015
'40', '42',
10121016
'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)