-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathphp_trochilidae.h
47 lines (39 loc) · 1.18 KB
/
php_trochilidae.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
#ifndef PHP_TROCHILIDAE_H
#define PHP_TROCHILIDAE_H 1
#define PHP_TROCHILIDAE_VERSION "0.0.7-dev"
#define PHP_TROCHILIDAE_EXTNAME "trochilidae"
#define PHP_TROCHILIDAE_MODE_CLI 0x01
#define PHP_TROCHILIDAE_MODE_CGI 0x02
#include <sys/resource.h>
#include "trochilidae/utils.h"
#include "trochilidae/tr_network.h"
#include "trochilidae/tr_timer.h"
#include "trochilidae/tr_array.h"
#ifdef PHP_WIN32
# define PHP_TROCHILIDAE_API __declspec(dllexport)
#elif defined(__GNUC__) && __GNUC__ >= 4
# define PHP_TROCHILIDAE_API __attribute__ ((visibility("default")))
#else
# define PHP_TROCHILIDAE_API
#endif
ZEND_BEGIN_MODULE_GLOBALS(trochilidae)
bool enabled;
bool modeCli;
char *server_list;
char hostName[HOST_NAME_MAX];
struct tr_array msg;
TrClient collectors[PHP_TROCHILIDAE_COLLECTORS_MAX];
TrRequestData requestData;
zval tags;
zval timers;
unsigned long bytesSend;
unsigned long requestCount;
ZEND_END_MODULE_GLOBALS(trochilidae)
#ifdef ZTS
#define TR_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(trochilidae, v)
#else
#define TR_G(v) (trochilidae_globals.v)
#endif
static PHP_FUNCTION(trochilidae_set_host);
extern zend_module_entry trochilidae_module_entry;
#endif