xref: /PHP-8.1/ext/posix/php_posix.h (revision 01b3fc03)
1 /*
2    +----------------------------------------------------------------------+
3    | Copyright (c) The PHP Group                                          |
4    +----------------------------------------------------------------------+
5    | This source file is subject to version 3.01 of the PHP license,      |
6    | that is bundled with this package in the file LICENSE, and is        |
7    | available through the world-wide-web at the following url:           |
8    | https://www.php.net/license/3_01.txt                                 |
9    | If you did not receive a copy of the PHP license and are unable to   |
10    | obtain it through the world-wide-web, please send a note to          |
11    | license@php.net so we can mail you a copy immediately.               |
12    +----------------------------------------------------------------------+
13    | Author: Kristian Koehntopp <kris@koehntopp.de>                       |
14    +----------------------------------------------------------------------+
15  */
16 
17 #ifndef PHP_POSIX_H
18 #define PHP_POSIX_H
19 
20 #ifdef HAVE_CONFIG_H
21 #include "config.h"
22 #endif
23 
24 #ifdef HAVE_POSIX
25 #ifndef DLEXPORT
26 #define DLEXPORT
27 #endif
28 
29 extern zend_module_entry posix_module_entry;
30 #define posix_module_ptr &posix_module_entry
31 
32 #include "php_version.h"
33 #define PHP_POSIX_VERSION PHP_VERSION
34 
35 ZEND_BEGIN_MODULE_GLOBALS(posix)
36 	int last_error;
37 ZEND_END_MODULE_GLOBALS(posix)
38 
39 #if defined(ZTS) && defined(COMPILE_DL_POSIX)
40 ZEND_TSRMLS_CACHE_EXTERN()
41 #endif
42 
43 ZEND_EXTERN_MODULE_GLOBALS(posix)
44 #define POSIX_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(posix, v)
45 
46 #else
47 
48 #define posix_module_ptr NULL
49 
50 #endif
51 
52 #define phpext_posix_ptr posix_module_ptr
53 
54 #endif /* PHP_POSIX_H */
55