xref: /php-src/ext/posix/posix.stub.php (revision ca5fd055)
1<?php
2
3/** @generate-class-entries */
4
5/**
6 * @var int
7 * @cvalue F_OK
8 */
9const POSIX_F_OK = UNKNOWN;
10/**
11 * @var int
12 * @cvalue X_OK
13 */
14const POSIX_X_OK = UNKNOWN;
15/**
16 * @var int
17 * @cvalue W_OK
18 */
19const POSIX_W_OK = UNKNOWN;
20/**
21 * @var int
22 * @cvalue R_OK
23 */
24const POSIX_R_OK = UNKNOWN;
25
26#ifdef S_IFREG
27/**
28 * @var int
29 * @cvalue S_IFREG
30 */
31const POSIX_S_IFREG = UNKNOWN;
32#endif
33#ifdef S_IFCHR
34/**
35 * @var int
36 * @cvalue S_IFCHR
37 */
38const POSIX_S_IFCHR = UNKNOWN;
39#endif
40#ifdef S_IFBLK
41/**
42 * @var int
43 * @cvalue S_IFBLK
44 */
45const POSIX_S_IFBLK = UNKNOWN;
46#endif
47#ifdef S_IFIFO
48/**
49 * @var int
50 * @cvalue S_IFIFO
51 */
52const POSIX_S_IFIFO = UNKNOWN;
53#endif
54#ifdef S_IFSOCK
55/**
56 * @var int
57 * @cvalue S_IFSOCK
58 */
59const POSIX_S_IFSOCK = UNKNOWN;
60#endif
61#ifdef RLIMIT_AS
62/**
63 * @var int
64 * @cvalue RLIMIT_AS
65 */
66const POSIX_RLIMIT_AS = UNKNOWN;
67#endif
68#ifdef RLIMIT_CORE
69/**
70 * @var int
71 * @cvalue RLIMIT_CORE
72 */
73const POSIX_RLIMIT_CORE = UNKNOWN;
74#endif
75#ifdef RLIMIT_CPU
76/**
77 * @var int
78 * @cvalue RLIMIT_CPU
79 */
80const POSIX_RLIMIT_CPU = UNKNOWN;
81#endif
82#ifdef RLIMIT_DATA
83/**
84 * @var int
85 * @cvalue RLIMIT_DATA
86 */
87const POSIX_RLIMIT_DATA = UNKNOWN;
88#endif
89#ifdef RLIMIT_FSIZE
90/**
91 * @var int
92 * @cvalue RLIMIT_FSIZE
93 */
94const POSIX_RLIMIT_FSIZE = UNKNOWN;
95#endif
96#ifdef RLIMIT_LOCKS
97/**
98 * @var int
99 * @cvalue RLIMIT_LOCKS
100 */
101const POSIX_RLIMIT_LOCKS = UNKNOWN;
102#endif
103#ifdef RLIMIT_MEMLOCK
104/**
105 * @var int
106 * @cvalue RLIMIT_MEMLOCK
107 */
108const POSIX_RLIMIT_MEMLOCK = UNKNOWN;
109#endif
110#ifdef RLIMIT_MSGQUEUE
111/**
112 * @var int
113 * @cvalue RLIMIT_MSGQUEUE
114 */
115const POSIX_RLIMIT_MSGQUEUE = UNKNOWN;
116#endif
117#ifdef RLIMIT_NICE
118/**
119 * @var int
120 * @cvalue RLIMIT_NICE
121 */
122const POSIX_RLIMIT_NICE = UNKNOWN;
123#endif
124#ifdef RLIMIT_NOFILE
125/**
126 * @var int
127 * @cvalue RLIMIT_NOFILE
128 */
129const POSIX_RLIMIT_NOFILE = UNKNOWN;
130#endif
131#ifdef RLIMIT_NPROC
132/**
133 * @var int
134 * @cvalue RLIMIT_NPROC
135 */
136const POSIX_RLIMIT_NPROC = UNKNOWN;
137#endif
138#ifdef RLIMIT_RSS
139/**
140 * @var int
141 * @cvalue RLIMIT_RSS
142 */
143const POSIX_RLIMIT_RSS = UNKNOWN;
144#endif
145#ifdef RLIMIT_RTPRIO
146/**
147 * @var int
148 * @cvalue RLIMIT_RTPRIO
149 */
150const POSIX_RLIMIT_RTPRIO = UNKNOWN;
151#endif
152#ifdef RLIMIT_RTTIME
153/**
154 * @var int
155 * @cvalue RLIMIT_RTTIME
156 */
157const POSIX_RLIMIT_RTTIME = UNKNOWN;
158#endif
159#ifdef RLIMIT_SIGPENDING
160/**
161 * @var int
162 * @cvalue RLIMIT_SIGPENDING
163 */
164const POSIX_RLIMIT_SIGPENDING = UNKNOWN;
165#endif
166#ifdef RLIMIT_STACK
167/**
168 * @var int
169 * @cvalue RLIMIT_STACK
170 */
171const POSIX_RLIMIT_STACK = UNKNOWN;
172#endif
173#ifdef RLIMIT_KQUEUES
174/**
175 * @var int
176 * @cvalue RLIMIT_KQUEUES
177 */
178const POSIX_RLIMIT_KQUEUES = UNKNOWN;
179#endif
180#ifdef RLIMIT_NPTS
181/**
182 * @var int
183 * @cvalue RLIMIT_NPTS
184 */
185const POSIX_RLIMIT_NPTS = UNKNOWN;
186#endif
187#ifdef HAVE_SETRLIMIT
188/**
189 * @var int
190 * @cvalue RLIM_INFINITY
191 */
192const POSIX_RLIMIT_INFINITY = UNKNOWN;
193#endif
194#ifdef _SC_ARG_MAX
195/**
196 * @var int
197 * @cvalue _SC_ARG_MAX
198 */
199const POSIX_SC_ARG_MAX = UNKNOWN;
200#endif
201#ifdef _SC_CHILD_MAX
202/**
203 * @var int
204 * @cvalue _SC_CHILD_MAX
205 */
206const POSIX_SC_CHILD_MAX = UNKNOWN;
207#endif
208#ifdef _SC_CLK_TCK
209/**
210 * @var int
211 * @cvalue _SC_CLK_TCK
212 */
213const POSIX_SC_CLK_TCK = UNKNOWN;
214#endif
215#ifdef _SC_PAGESIZE
216/**
217 * @var int
218 * @cvalue _SC_PAGESIZE
219 */
220const POSIX_SC_PAGESIZE = UNKNOWN;
221#endif
222#ifdef _SC_NPROCESSORS_CONF
223/**
224 * @var int
225 * @cvalue _SC_NPROCESSORS_CONF
226 */
227const POSIX_SC_NPROCESSORS_CONF = UNKNOWN;
228#endif
229#ifdef _SC_NPROCESSORS_ONLN
230/**
231 * @var int
232 * @cvalue _SC_NPROCESSORS_ONLN
233 */
234const POSIX_SC_NPROCESSORS_ONLN = UNKNOWN;
235#endif
236#ifdef _PC_LINK_MAX
237/**
238 * @var int
239 * @cvalue _PC_LINK_MAX
240 */
241const POSIX_PC_LINK_MAX = UNKNOWN;
242#endif
243#ifdef _PC_MAX_CANON
244/**
245 * @var int
246 * @cvalue _PC_MAX_CANON
247 */
248const POSIX_PC_MAX_CANON = UNKNOWN;
249#endif
250#ifdef _PC_MAX_INPUT
251/**
252 * @var int
253 * @cvalue _PC_MAX_INPUT
254 */
255const POSIX_PC_MAX_INPUT = UNKNOWN;
256#endif
257#ifdef _PC_NAME_MAX
258/**
259 * @var int
260 * @cvalue _PC_NAME_MAX
261 */
262const POSIX_PC_NAME_MAX = UNKNOWN;
263#endif
264#ifdef _PC_PATH_MAX
265/**
266 * @var int
267 * @cvalue _PC_PATH_MAX
268 */
269const POSIX_PC_PATH_MAX = UNKNOWN;
270#endif
271#ifdef _PC_PIPE_BUF
272/**
273 * @var int
274 * @cvalue _PC_PIPE_BUF
275 */
276const POSIX_PC_PIPE_BUF = UNKNOWN;
277#endif
278#ifdef _PC_CHOWN_RESTRICTED
279/**
280 * @var int
281 * @cvalue _PC_CHOWN_RESTRICTED
282 */
283const POSIX_PC_CHOWN_RESTRICTED = UNKNOWN;
284#endif
285#ifdef _PC_NO_TRUNC
286/**
287 * @var int
288 * @cvalue _PC_NO_TRUNC
289 */
290const POSIX_PC_NO_TRUNC = UNKNOWN;
291#endif
292#ifdef _PC_ALLOC_SIZE_MIN
293/**
294 * @var int
295 * @cvalue _PC_ALLOC_SIZE_MIN
296 */
297const POSIX_PC_ALLOC_SIZE_MIN = UNKNOWN;
298#endif
299#ifdef _PC_SYMLINK_MAX
300/**
301 * @var int
302 * @cvalue _PC_SYMLINK_MAX
303 */
304const POSIX_PC_SYMLINK_MAX = UNKNOWN;
305#endif
306#ifdef _SC_OPEN_MAX
307/**
308 * @var int
309 * @cvalue _SC_OPEN_MAX
310 */
311const POSIX_SC_OPEN_MAX = UNKNOWN;
312#endif
313
314function posix_kill(int $process_id, int $signal): bool {}
315
316function posix_getpid(): int {}
317
318function posix_getppid(): int {}
319
320function posix_getuid(): int {}
321
322function posix_setuid(int $user_id): bool {}
323
324function posix_geteuid(): int {}
325
326#ifdef HAVE_SETEUID
327function posix_seteuid(int $user_id): bool {}
328#endif
329
330function posix_getgid(): int {}
331
332function posix_setgid(int $group_id): bool {}
333
334function posix_getegid(): int {}
335
336#ifdef HAVE_SETEGID
337function posix_setegid(int $group_id): bool {}
338#endif
339
340#ifdef HAVE_GETGROUPS
341/**
342 * @return array<int, int>|false
343 * @refcount 1
344 */
345function posix_getgroups(): array|false {}
346#endif
347
348#ifdef HAVE_GETLOGIN
349function posix_getlogin(): string|false {}
350#endif
351
352function posix_getpgrp(): int {}
353
354#ifdef HAVE_SETSID
355function posix_setsid(): int {}
356#endif
357
358function posix_setpgid(int $process_id, int $process_group_id): bool {}
359
360#ifdef HAVE_GETPGID
361function posix_getpgid(int $process_id): int|false {}
362#endif
363
364#ifdef HAVE_GETSID
365function posix_getsid(int $process_id): int|false {}
366#endif
367
368/**
369 * @return array<string, string>|false
370 * @refcount 1
371 */
372function posix_uname(): array|false {}
373
374/**
375 * @return array<string, int>|false
376 * @refcount 1
377 */
378function posix_times(): array|false {}
379
380
381#ifdef HAVE_CTERMID
382function posix_ctermid(): string|false {}
383#endif
384
385/** @param resource|int $file_descriptor */
386function posix_ttyname($file_descriptor): string|false {}
387
388/** @param resource|int $file_descriptor */
389function posix_isatty($file_descriptor): bool {}
390
391function posix_getcwd(): string|false {}
392
393#ifdef HAVE_MKFIFO
394function posix_mkfifo(string $filename, int $permissions): bool {}
395#endif
396
397#ifdef HAVE_MKNOD
398function posix_mknod(string $filename, int $flags, int $major = 0, int $minor = 0): bool {}
399#endif
400
401function posix_access(string $filename, int $flags = 0): bool {}
402
403#ifdef HAVE_EACCESS
404function posix_eaccess(string $filename, int $flags = 0): bool {}
405#endif
406
407/**
408 * @return array<string, int|string|array|null>|false
409 * @refcount 1
410 */
411function posix_getgrnam(string $name): array|false {}
412
413/**
414 * @return array<string, int|string|array|null>|false
415 * @refcount 1
416 */
417function posix_getgrgid(int $group_id): array|false {}
418
419/**
420 * @return array<string, int|string>|false
421 * @refcount 1
422 */
423function posix_getpwnam(string $username): array|false {}
424
425/**
426 * @return array<string, int|string>|false
427 * @refcount 1
428 */
429function posix_getpwuid(int $user_id): array|false {}
430
431#ifdef HAVE_GETRLIMIT
432/**
433 * @return array<int|string, int|string>|false
434 * @refcount 1
435 */
436function posix_getrlimit(?int $resource = null): array|false {}
437#endif
438
439#ifdef HAVE_SETRLIMIT
440function posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): bool {}
441#endif
442
443function posix_get_last_error(): int {}
444
445/** @alias posix_get_last_error */
446function posix_errno(): int {}
447
448function posix_strerror(int $error_code): string {}
449
450#ifdef HAVE_INITGROUPS
451function posix_initgroups(string $username, int $group_id): bool {}
452#endif
453
454function posix_sysconf(int $conf_id): int {}
455
456#ifdef HAVE_PATHCONF
457function posix_pathconf(string $path, int $name): int|false {}
458#endif
459
460#ifdef HAVE_FPATHCONF
461/** @param resource|int $file_descriptor */
462function posix_fpathconf($file_descriptor, int $name): int|false {}
463#endif
464