xref: /PHP-7.3/ext/fileinfo/php_fileinfo.h (revision 8d3f8ca1)
1 /*
2   +----------------------------------------------------------------------+
3   | PHP Version 7                                                        |
4   +----------------------------------------------------------------------+
5   | Copyright (c) 1997-2018 The PHP Group                                |
6   +----------------------------------------------------------------------+
7   | This source file is subject to version 3.0 of the PHP license,       |
8   | that is bundled with this package in the file LICENSE, and is        |
9   | available through the world-wide-web at the following url:           |
10   | http://www.php.net/license/3_0.txt.                                  |
11   | If you did not receive a copy of the PHP license and are unable to   |
12   | obtain it through the world-wide-web, please send a note to          |
13   | license@php.net so we can mail you a copy immediately.               |
14   +----------------------------------------------------------------------+
15   | Author: Ilia Alshanetsky <ilia@php.net>                              |
16   +----------------------------------------------------------------------+
17 */
18 
19 #ifndef PHP_FILEINFO_H
20 #define PHP_FILEINFO_H
21 
22 extern zend_module_entry fileinfo_module_entry;
23 #define phpext_fileinfo_ptr &fileinfo_module_entry
24 
25 #define PHP_FILEINFO_VERSION PHP_VERSION
26 
27 #ifdef PHP_WIN32
28 #define PHP_FILEINFO_API __declspec(dllexport)
29 #else
30 #define PHP_FILEINFO_API
31 #endif
32 
33 #ifdef ZTS
34 #include "TSRM.h"
35 #endif
36 
37 PHP_MINFO_FUNCTION(fileinfo);
38 
39 PHP_FUNCTION(finfo_open);
40 PHP_FUNCTION(finfo_close);
41 PHP_FUNCTION(finfo_set_flags);
42 PHP_FUNCTION(finfo_file);
43 PHP_FUNCTION(finfo_buffer);
44 PHP_FUNCTION(mime_content_type);
45 
46 #ifdef ZTS
47 #define FILEINFO_G(v) TSRMG(fileinfo_globals_id, zend_fileinfo_globals *, v)
48 #else
49 #define FILEINFO_G(v) (fileinfo_globals.v)
50 #endif
51 
52 #endif	/* PHP_FILEINFO_H */
53 
54 
55 /*
56  * Local variables:
57  * tab-width: 4
58  * c-basic-offset: 4
59  * End:
60  * vim600: noet sw=4 ts=4 fdm=marker
61  * vim<600: noet sw=4 ts=4
62  */
63