- Notifications
You must be signed in to change notification settings - Fork 7.8k
/
Copy pathbasic_functions.h
138 lines (109 loc) · 4.46 KB
/
basic_functions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
/*
+----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| https://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@php.net> |
| Zeev Suraski <zeev@php.net> |
+----------------------------------------------------------------------+
*/
#ifndefBASIC_FUNCTIONS_H
#defineBASIC_FUNCTIONS_H
#include<sys/stat.h>
#include<wchar.h>
#include"php_filestat.h"
#include"zend_highlight.h"
#include"url_scanner_ex.h"
#if defined(_WIN32) && !defined(__clang__)
#include<intrin.h>
#endif
externzend_module_entrybasic_functions_module;
#definebasic_functions_module_ptr &basic_functions_module
PHP_MINIT_FUNCTION(basic);
PHP_MSHUTDOWN_FUNCTION(basic);
PHP_RINIT_FUNCTION(basic);
PHP_RSHUTDOWN_FUNCTION(basic);
PHP_MINFO_FUNCTION(basic);
ZEND_APIvoidphp_get_highlight_struct(zend_syntax_highlighter_ini*syntax_highlighter_ini);
PHP_MINIT_FUNCTION(user_filters);
PHP_RSHUTDOWN_FUNCTION(user_filters);
PHP_RSHUTDOWN_FUNCTION(browscap);
/* Left for BC (not binary safe!) */
PHPAPIint_php_error_log(intopt_err, constchar*message, constchar*opt, constchar*headers);
PHPAPIint_php_error_log_ex(intopt_err, constchar*message, size_tmessage_len, constchar*opt, constchar*headers);
PHPAPIintphp_prefix_varname(zval*result, zend_string*prefix, constchar*var_name, size_tvar_name_len, booladd_underscore);
typedefstruct_php_basic_globals {
HashTable*user_shutdown_function_names;
HashTableputenv_ht;
zend_string*strtok_string;
zend_string*ctype_string; /* current LC_CTYPE locale (or NULL for 'C') */
boollocale_changed; /* locale was changed and has to be restored */
char*strtok_last;
charstrtok_table[256];
size_tstrtok_len;
zend_fcall_infouser_compare_fci;
zend_fcall_info_cacheuser_compare_fci_cache;
zend_llist*user_tick_functions;
zvalactive_ini_file_section;
/* http_fopen_wrapper.c */
zvallast_http_headers;
/* pageinfo.c */
zend_longpage_uid;
zend_longpage_gid;
zend_longpage_inode;
time_tpage_mtime;
/* filestat.c && main/streams/streams.c */
zend_string*CurrentStatFile, *CurrentLStatFile;
php_stream_statbufssb, lssb;
/* syslog.c */
char*syslog_device;
/* var.c */
unsignedserialize_lock; /* whether to use the locally supplied var_hash instead (__sleep/__wakeup) */
struct {
structphp_serialize_data*data;
unsignedlevel;
} serialize;
struct {
structphp_unserialize_data*data;
unsignedlevel;
} unserialize;
/* url_scanner_ex.re */
url_adapt_state_ex_turl_adapt_session_ex;
HashTableurl_adapt_session_hosts_ht;
url_adapt_state_ex_turl_adapt_output_ex;
HashTableurl_adapt_output_hosts_ht;
HashTable*user_filter_map;
/* file.c */
#if defined(_REENTRANT)
mbstate_tmblen_state;
#endif
intumask;
zend_longunserialize_max_depth;
} php_basic_globals;
#ifdefZTS
#defineBG(v) ZEND_TSRMG(basic_globals_id, php_basic_globals *, v)
PHPAPIexternintbasic_globals_id;
#else
#defineBG(v) (basic_globals.v)
PHPAPIexternphp_basic_globalsbasic_globals;
#endif
PHPAPIzend_string*php_getenv(constchar*str, size_tstr_len);
PHPAPIdoublephp_get_nan(void);
PHPAPIdoublephp_get_inf(void);
typedefstruct_php_shutdown_function_entry {
zend_fcall_infofci;
zend_fcall_info_cachefci_cache;
} php_shutdown_function_entry;
PHPAPIexternboolregister_user_shutdown_function(constchar*function_name, size_tfunction_len, php_shutdown_function_entry*shutdown_function_entry);
PHPAPIexternboolremove_user_shutdown_function(constchar*function_name, size_tfunction_len);
PHPAPIexternboolappend_user_shutdown_function(php_shutdown_function_entry*shutdown_function_entry);
PHPAPIvoidphp_call_shutdown_functions(void);
PHPAPIvoidphp_free_shutdown_functions(void);
#endif/* BASIC_FUNCTIONS_H */