1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #ifndef PHP_POSIX_H
23 #define PHP_POSIX_H
24
25 #ifdef HAVE_CONFIG_H
26 #include "config.h"
27 #endif
28
29 #if HAVE_POSIX
30 #ifndef DLEXPORT
31 #define DLEXPORT
32 #endif
33
34 extern zend_module_entry posix_module_entry;
35 #define posix_module_ptr &posix_module_entry
36
37
38 PHP_FUNCTION(posix_kill);
39
40
41 PHP_FUNCTION(posix_getpid);
42 PHP_FUNCTION(posix_getppid);
43
44
45 PHP_FUNCTION(posix_getuid);
46 PHP_FUNCTION(posix_getgid);
47 PHP_FUNCTION(posix_geteuid);
48 PHP_FUNCTION(posix_getegid);
49 PHP_FUNCTION(posix_setuid);
50 PHP_FUNCTION(posix_setgid);
51 #ifdef HAVE_SETEUID
52 PHP_FUNCTION(posix_seteuid);
53 #endif
54 #ifdef HAVE_SETEGID
55 PHP_FUNCTION(posix_setegid);
56 #endif
57 #ifdef HAVE_GETGROUPS
58 PHP_FUNCTION(posix_getgroups);
59 #endif
60 #ifdef HAVE_GETLOGIN
61 PHP_FUNCTION(posix_getlogin);
62 #endif
63
64
65 PHP_FUNCTION(posix_getpgrp);
66 #ifdef HAVE_SETSID
67 PHP_FUNCTION(posix_setsid);
68 #endif
69 PHP_FUNCTION(posix_setpgid);
70
71 #ifdef HAVE_GETPGID
72 PHP_FUNCTION(posix_getpgid);
73 #endif
74 #ifdef HAVE_GETSID
75 PHP_FUNCTION(posix_getsid);
76 #endif
77
78
79 PHP_FUNCTION(posix_uname);
80 PHP_FUNCTION(posix_times);
81
82
83 #ifdef HAVE_CTERMID
84 PHP_FUNCTION(posix_ctermid);
85 #endif
86 PHP_FUNCTION(posix_ttyname);
87 PHP_FUNCTION(posix_isatty);
88
89
90 PHP_FUNCTION(posix_getcwd);
91
92
93 #ifdef HAVE_MKFIFO
94 PHP_FUNCTION(posix_mkfifo);
95 #endif
96 #ifdef HAVE_MKNOD
97 PHP_FUNCTION(posix_mknod);
98 #endif
99
100
101 PHP_FUNCTION(posix_access);
102
103
104 PHP_FUNCTION(posix_getgrnam);
105 PHP_FUNCTION(posix_getgrgid);
106 PHP_FUNCTION(posix_getpwnam);
107 PHP_FUNCTION(posix_getpwuid);
108
109 #ifdef HAVE_GETRLIMIT
110 PHP_FUNCTION(posix_getrlimit);
111 #endif
112
113 #ifdef HAVE_INITGROUPS
114 PHP_FUNCTION(posix_initgroups);
115 #endif
116
117 PHP_FUNCTION(posix_get_last_error);
118 PHP_FUNCTION(posix_strerror);
119
120 ZEND_BEGIN_MODULE_GLOBALS(posix)
121 int last_error;
122 ZEND_END_MODULE_GLOBALS(posix)
123
124 #ifdef ZTS
125 # define POSIX_G(v) TSRMG(posix_globals_id, zend_posix_globals *, v)
126 #else
127 # define POSIX_G(v) (posix_globals.v)
128 #endif
129
130 #else
131
132 #define posix_module_ptr NULL
133
134 #endif
135
136 #define phpext_posix_ptr posix_module_ptr
137
138 #endif