forked from Luccifer/FB-Source-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Flib constants.txt
executable file
·164 lines (130 loc) · 5.06 KB
/
Flib constants.txt
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?php
// ------------------------------------------
// Flib constants
// ------------------------------------------
// see also static $builtin_defines = ...
// in www/flib/_bin/_checkModuleLib.php
// now in hphp_constants.php
// define('CLOCK_THREAD_CPUTIME_ID', 1);
// flib/ code is supposed to never use flib_init() so never use
// any FLIB_CONTEXT_xxx constants, but some of our
// code sometimes do:
// if (ModuleStack::getContext() === FLIB_CONTEXT_TEST) ...
define('FLIB_CONTEXT_TEST', 1);
// flib/init/http/safety.php also uses those constants to determine which
// pages should be 404'ed in the secure tier.
// mostly copy paste of flib/__flib.php
define('FLIB_CONTEXT_NOOP', -1);
define('FLIB_CONTEXT_NULL', 0);
//define('FLIB_CONTEXT_TEST', 1); done above
define('FLIB_CONTEXT_SCRIPT', 2);
define('FLIB_CONTEXT_AJAX', 3);
define('FLIB_CONTEXT_WEB', 4);
define('FLIB_CONTEXT_WEB_LITE', 5);
define('FLIB_CONTEXT_WEB_INTERN', 6);
define('FLIB_CONTEXT_RESOURCE', 7);
define('FLIB_CONTEXT_AGENT', 8);
define('FLIB_CONTEXT_REDIRECT', 9);
define('FLIB_CONTEXT_LOGGING', 10);
define('FLIB_CONTEXT_ALITE', 11);
define('FLIB_CONTEXT_PAGELET', 12);
define('FLIB_CONTEXT_API', 13);
define('FLIB_CONTEXT_THRIFT', 14);
define('FLIB_CONTEXT_DEVSITE', 15);
define('FLIB_CONTEXT_SECURE_WEB', 16);
define('FLIB_CONTEXT_CANVAS', 17);
define('FLIB_CONTEXT_CODESITE', 18);
define('FLIB_CONTEXT_FBIPHONE_ENDPOINT', 19);
define('FLIB_CONTEXT_CANVAS_ALITE', 20);
define('FLIB_CONTEXT_EXTERNAL_DOMAIN', 21);
// ------------------------------------------
// Misc
// ------------------------------------------
define('T_XHP_TEXT', 1);
// see http://www.intern.facebook.com/intern/hphp/doc/index.php?file=threading
// now in hphp_constants.php
//define('GLOBAL_STATE_IGNORE', 1);
//define('GLOBAL_STATE_OVERWRITE', 1);
//define('GLOBAL_STATE_SKIP', 1);
//define('GLOBAL_SYMBOL_GLOBAL_VARIABLE', 1);
//define('GLOBAL_SYMBOL_STATIC_VARIABLE', 1);
//define('GLOBAL_SYMBOL_CLASS_STATIC', 1);
//define('GLOBAL_SYMBOL_DYNAMIC_CONSTANT', 1);
//define('GLOBAL_SYMBOL_FILE_INCLUDE', 1);
//define('GLOBAL_SYMBOL_REDECLARED_FUNCTION', 1);
//define('GLOBAL_SYMBOL_REDECLARED_CLASS', 1);
// define('PHPMCC_USED_FAST_PATH', 1);
// ??? defined where ?
// was in www/conf/constants.php
// Programmers should require_conf('constants.php') but they dont.
// Those constants seems builtin now and put inside a if(!defined(...)
// So for now they are handled specially in check_module.ml
//define('DEBUG_LOG_NONE', 1);
//define('DEBUG_LOG_TRACE', 1);
//define('DEBUG_LOG_USER', 1);
//define('DEBUG_LOG_IP', 1);
//define('DEBUG_LOG_URL', 1);
//define('DEBUG_LOG_REFERER', 1);
//define('DEBUG_LOG_AGENT', 1);
//define('DEBUG_LOG_POST', 1);
//define('DEBUG_LOG_COOKIE', 1);
//define('DEBUG_LOG_ALL', 1);
//define('DEBUG_LOG_DEFAULT', 1);
//from _checkModuleLib.php in $extension_defines
define('MCC_NZLIB_COMPRESSION', 0);
define('MCC_ARG_FB_SERIALIZE_PREFIXES', 0);
define('MCC_COMPRESSION_THRESHHOLD', 0);
// used to be in flib/utils/strings/ but now is core
class StringBuffer {
}
// ------------------------------------------
// In HPHP idl files ??
// ------------------------------------------
//define('JSON_FB_LOOSE', 0);
define('JSON_FB_EXTRA_ESCAPES', 0);
// ------------------------------------------
// In hphp/facebook/extensions/ idl files
// ------------------------------------------
//TODO: autogenerate them too
function photodna_jpeg_get_hashes($filename) { }
function fbobj_hphp_register_config_func($str, $version) { }
function fbobj_hphp_create(int $fbtype, int $profile, int $fbid, array
$tao_response) { }
// ------------------------------------------
// used by third party code
// ------------------------------------------
define('_SYSTEM_TTFONTS', 0);
// defined in flib/third-party/tfpdf/font/unifont/ttfonts.php
// which is included via a dynamic include_once :( so hardcode it here
class TTFontFile { }
// defined ?? this flib/third-party/geojson/WKT/WKT.class.php defines
// only class GeoJSONWKT. Maybe some magic done around class name
class WKT {
public static function load($x) { }
}
// ------------------------------------------
// Defined in some scripts
// ------------------------------------------
// scripts/memcache/sync_mcconf_to_smc.php
define('SCRIPT_IDENTIFIER', 0);
define('SCRIPT_OWNER_FBID', 0);
// ------------------------------------------
// Covered by some if(function_exists(...))
// ------------------------------------------
// we need to include it there because scheck is not
// aware of the if(function_exists(...) idion. todo?
function hphp_murmurhash($key, $len, $seed) { }
function syck_load($xs) { }
// ------------------------------------------
// Now in HPHP idl files
// ------------------------------------------
// see also static $extension_functions
// in www/flib/_bin/_checkModuleLib.php
// function mysql_connect_with_db() { }
// function hphp_get_thread_id() { }
// function xhp_preprocess_code() { }
//class phpmcc {}
function mysql_fetch_result($conn) { }
function mysql_more_results($conn) { }
function mysql_next_result($conn) { }
function mysql_multi_query($sql, $conn) { }