-
Notifications
You must be signed in to change notification settings - Fork 18
/
php_shadow.h
86 lines (73 loc) · 2 KB
/
php_shadow.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
/*
* Copyright (C) 2014, SugarCRM Inc.
*
* This product is licensed by SugarCRM under the Apache License, Version 2.0 (the "License").
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
#ifndef PHP_SHADOW_H
#define PHP_SHADOW_H
extern zend_module_entry shadow_module_entry;
#define phpext_shadow_ptr &shadow_module_entry
#ifdef PHP_WIN32
# define PHP_SHADOW_API __declspec(dllexport)
#elif defined(__GNUC__) && __GNUC__ >= 4
# define PHP_SHADOW_API __attribute__ ((visibility("default")))
#else
# define PHP_SHADOW_API
#endif
#ifdef ZTS
#include "TSRM.h"
#endif
PHP_MINIT_FUNCTION(shadow);
PHP_MSHUTDOWN_FUNCTION(shadow);
PHP_RINIT_FUNCTION(shadow);
PHP_RSHUTDOWN_FUNCTION(shadow);
PHP_MINFO_FUNCTION(shadow);
#define SHADOW_DEBUG_FULLPATH (1<<0)
#define SHADOW_DEBUG_OPEN (1<<1)
#define SHADOW_DEBUG_STAT (1<<2)
#define SHADOW_DEBUG_MKDIR (1<<3)
#define SHADOW_DEBUG_OPENDIR (1<<4)
#define SHADOW_DEBUG_RESOLVE (1<<5)
#define SHADOW_DEBUG_UNLINK (1<<6)
#define SHADOW_DEBUG_RENAME (1<<7)
#define SHADOW_DEBUG_PATHCHECK (1<<8)
#define SHADOW_DEBUG_ENSURE (1<<9)
#define SHADOW_DEBUG_FAIL (1<<10)
#define SHADOW_DEBUG_TOUCH (1<<11)
#define SHADOW_DEBUG_CHMOD (1<<11)
#define SHADOW_DEBUG_OVERRIDE (1<<12)
ZEND_BEGIN_MODULE_GLOBALS(shadow)
/* config vars */
zend_bool enabled;
long mkdir_mask;
long debug;
unsigned long cache_size;
char *override;
/* runtime data */
zend_string *template;
zend_string *instance;
char **instance_only;
int instance_only_count;
char *curdir;
HashTable cache;
HashTable replaced_function_table;
uint segment_id;
char *shadow_override_copy;
ZEND_END_MODULE_GLOBALS(shadow)
#ifdef ZTS
#define SHADOW_G(v) TSRMG(shadow_globals_id, zend_shadow_globals *, v)
#else
#define SHADOW_G(v) (shadow_globals.v)
#endif
#define SHADOW_VERSION "1.2.0"
ZEND_EXTERN_MODULE_GLOBALS(shadow)
#endif /* PHP_SHADOW_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/