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 #ifndef NETSITE_H
35 #define NETSITE_H
36
37 #ifndef NOINTNSAPI
38 #define INTNSAPI
39 #endif
40
41
42
43
44
45
46 #ifndef BASE_SYSTEMS_H
47 #include "../util/systems.h"
48 #endif
49
50
51
52 #define MAGNUS_VERSION_STRING INTsystem_version()
53 #define MAGNUS_VERSION PRODUCT_VERSION_ID
54
55
56 #ifndef PUBLIC_NETSITE_H
57 #include "../public/nsapi.h"
58 #endif
59
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63
64
65
66
67
68 NSAPI_PUBLIC void InitThreadMallocKey(
void);
69
70 NSAPI_PUBLIC void system_set_temp_dir(
const char *dir);
71
72 NSAPI_PUBLIC const char *system_get_temp_dir(
void);
73
74
75 NSAPI_PUBLIC char *INTdns_guess_domain(
char * hname);
76
77
78
79 #ifdef INTNSAPI
80
81 NSAPI_PUBLIC char *INTsystem_version(
void);
82
83
84
85
86
87
88
89
90
91 NSAPI_PUBLIC void *INTsystem_malloc(
int size);
92
93
94 NSAPI_PUBLIC void *INTsystem_calloc(
int size);
95
96
97 NSAPI_PUBLIC void *INTsystem_realloc(
void *ptr,
int size);
98
99
100 NSAPI_PUBLIC void INTsystem_free(
void *ptr);
101
102 NSAPI_PUBLIC char *INTsystem_strdup(
const char *ptr);
103
104
105
106
107
108
109 #define PERM_MALLOC(size) INTsystem_malloc_perm(size)
110 NSAPI_PUBLIC void *INTsystem_malloc_perm(
int size);
111
112 #define PERM_CALLOC(size) INTsystem_calloc_perm(size)
113 NSAPI_PUBLIC void *INTsystem_calloc_perm(
int size);
114
115 #define PERM_REALLOC(ptr, size) INTsystem_realloc_perm(ptr, size)
116 NSAPI_PUBLIC void *INTsystem_realloc_perm(
void *ptr,
int size);
117
118 #define PERM_FREE(ptr) INTsystem_free_perm(ptr)
119 NSAPI_PUBLIC void INTsystem_free_perm(
void *ptr);
120
121 #define PERM_STRDUP(ptr) INTsystem_strdup_perm(ptr)
122 NSAPI_PUBLIC char *INTsystem_strdup_perm(
const char *ptr);
123
124
125
126
127
128
129
130
131
132
133 NSAPI_PUBLIC int INTgetThreadMallocKey(
void);
134
135 NSAPI_PUBLIC pool_handle_t *INTsystem_pool(
void);
136
137
138
139 NSAPI_PUBLIC void INTsystem_setnewhandler(
void);
140
141 #endif
142
143
144
145 int system_close(
int fd);
146
147 #ifdef __cplusplus
148 }
149 #endif
150
151 #ifdef INTNSAPI
152
153 #define dns_guess_domain INTdns_guess_domain
154
155 #define system_malloc INTsystem_malloc
156 #define system_calloc INTsystem_calloc
157 #define system_realloc INTsystem_realloc
158 #define system_free INTsystem_free
159 #define system_strdup INTsystem_strdup
160 #define system_malloc_perm INTsystem_malloc_perm
161 #define system_calloc_perm INTsystem_calloc_perm
162 #define system_realloc_perm INTsystem_realloc_perm
163 #define system_free_perm INTsystem_free_perm
164 #define system_strdup_perm INTsystem_strdup_perm
165 #define getThreadMallocKey INTgetThreadMallocKey
166 #define system_pool INTsystem_pool
167 #define system_setnewhandler INTsystem_setnewhandler
168
169 #endif
170
171 #ifndef HTTPS_ADMSERV
172 #define HTTPS_ADMSERV "https-admserv"
173 #endif
174
175 #endif
176