forked from nx111/oscam
-
Notifications
You must be signed in to change notification settings - Fork 1
/
oscam-config-funcs.h
368 lines (318 loc) · 5.83 KB
/
oscam-config-funcs.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
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
#ifndef OSCAM_CONFIG_FUNCS_H_
#define OSCAM_CONFIG_FUNCS_H_
#if defined(WITH_SSL) && !defined(WITH_LIBCRYPTO)
# define WITH_LIBCRYPTO
#endif
#if defined(__CYGWIN__) || defined(__arm__) || defined(__SH4__) || defined(__MIPS__) || defined(__MIPSEL__) || defined(__powerpc__)
# define CS_LOGFILE "/dev/tty"
#endif
#if defined(__AIX__) || defined(__SGI__) || defined(__OSF__) || defined(__HPUX__) || defined(__SOLARIS__) || defined(__APPLE__)
# define NEED_DAEMON
#endif
#if defined(__AIX__) || defined(__SGI__) || defined(__OSF__) || defined(__HPUX__) || defined(__SOLARIS__) || defined(__CYGWIN__)
# define NO_ENDIAN_H
#endif
#if defined(__AIX__) || defined(__SGI__)
# define socklen_t unsigned long
#endif
#if defined(__SOLARIS__) || defined(__FreeBSD__)
# define BSD_COMP
#endif
#if defined(__HPUX__)
# define _XOPEN_SOURCE_EXTENDED
#endif
/*
* These functions allow checking of configuration variables in
* the C code without using #ifdefs's. The dead code elimination
* of the compiler takes care of removing the code that depends
* on the disabled config options and we get compilation coverage
* even when some option is disabled.
*/
static inline int config_WEBIF(void) {
#ifdef WEBIF
return 1;
#else
return 0;
#endif
}
static inline int config_WITH_SSL(void) {
#ifdef WITH_SSL
return 1;
#else
return 0;
#endif
}
static inline int config_WITH_LIBCRYPTO(void) {
#ifdef WITH_LIBCRYPTO
return 1;
#else
return 0;
#endif
}
static inline int config_WITH_PCSC(void) {
#ifdef WITH_PCSC
return 1;
#else
return 0;
#endif
}
static inline int config_WITH_LIBUSB(void) {
#ifdef WITH_LIBUSB
return 1;
#else
return 0;
#endif
}
static inline int config_HAVE_DVBAPI(void) {
#ifdef HAVE_DVBAPI
return 1;
#else
return 0;
#endif
}
static inline int config_WITH_STAPI(void) {
#ifdef WITH_STAPI
return config_HAVE_DVBAPI() ? 1 : 0;
#else
return 0;
#endif
}
static inline int config_IRDETO_GUESSING(void) {
#ifdef IRDETO_GUESSING
return 1;
#else
return 0;
#endif
}
static inline int config_CS_ANTICASC(void) {
#ifdef CS_ANTICASC
return 1;
#else
return 0;
#endif
}
static inline int config_WITH_COOLAPI(void) {
#ifdef WITH_COOLAPI
return 1;
#else
return 0;
#endif
}
static inline int config_WITH_DEBUG(void) {
#ifdef WITH_DEBUG
return 1;
#else
return 0;
#endif
}
static inline int config_WITH_LB(void) {
#ifdef WITH_LB
return 1;
#else
return 0;
#endif
}
static inline int config_LCDSUPPORT(void) {
#ifdef LCDSUPPORT
return 1;
#else
return 0;
#endif
}
static inline int config_IPV6SUPPORT(void) {
#ifdef IPV6SUPPORT
return 1;
#else
return 0;
#endif
}
static inline int config_MODULE_MONITOR(void) {
#ifdef MODULE_MONITOR
return 1;
#else
return 0;
#endif
}
static inline int config_MODULE_CAMD33(void) {
#ifdef MODULE_CAMD33
return 1;
#else
return 0;
#endif
}
static inline int config_MODULE_CAMD35(void) {
#ifdef MODULE_CAMD35
return 1;
#else
return 0;
#endif
}
static inline int config_MODULE_CAMD35_TCP(void) {
#ifdef MODULE_CAMD35_TCP
return 1;
#else
return 0;
#endif
}
static inline int config_MODULE_NEWCAMD(void) {
#ifdef MODULE_NEWCAMD
return 1;
#else
return 0;
#endif
}
static inline int config_MODULE_CCCAM(void) {
#ifdef MODULE_CCCAM
return 1;
#else
return 0;
#endif
}
static inline int config_MODULE_CCCSHARE(void) {
#ifdef MODULE_CCCSHARE
return config_MODULE_CCCAM() ? 1 : 0;
#else
return 0;
#endif
}
static inline int config_MODULE_GBOX(void) {
#ifdef MODULE_GBOX
return 1;
#else
return 0;
#endif
}
static inline int config_MODULE_RADEGAST(void) {
#ifdef MODULE_RADEGAST
return 1;
#else
return 0;
#endif
}
static inline int config_MODULE_SERIAL(void) {
#ifdef MODULE_SERIAL
return 1;
#else
return 0;
#endif
}
static inline int config_MODULE_CONSTCW(void) {
#ifdef MODULE_CONSTCW
return 1;
#else
return 0;
#endif
}
static inline int config_MODULE_PANDORA(void) {
#ifdef MODULE_PANDORA
return 1;
#else
return 0;
#endif
}
static inline int config_WITH_CARDREADER(void) {
#ifdef WITH_CARDREADER
return 1;
#else
return 0;
#endif
}
static inline int config_READER_NAGRA(void) {
#ifdef READER_NAGRA
return config_WITH_CARDREADER() ? 1 : 0;
#else
return 0;
#endif
}
static inline int config_READER_IRDETO(void) {
#ifdef READER_IRDETO
return config_WITH_CARDREADER() ? 1 : 0;
#else
return 0;
#endif
}
static inline int config_READER_CONAX(void) {
#ifdef READER_CONAX
return config_WITH_CARDREADER() ? 1 : 0;
#else
return 0;
#endif
}
static inline int config_READER_CRYPTOWORKS(void) {
#ifdef READER_CRYPTOWORKS
return config_WITH_CARDREADER() ? 1 : 0;
#else
return 0;
#endif
}
static inline int config_READER_SECA(void) {
#ifdef READER_SECA
return config_WITH_CARDREADER() ? 1 : 0;
#else
return 0;
#endif
}
static inline int config_READER_VIACCESS(void) {
#ifdef READER_VIACCESS
return config_WITH_CARDREADER() ? 1 : 0;
#else
return 0;
#endif
}
static inline int config_READER_VIDEOGUARD(void) {
#ifdef READER_VIDEOGUARD
return config_WITH_CARDREADER() ? 1 : 0;
#else
return 0;
#endif
}
static inline int config_READER_DRE(void) {
#ifdef READER_DRE
return config_WITH_CARDREADER() ? 1 : 0;
#else
return 0;
#endif
}
static inline int config_READER_TONGFANG(void) {
#ifdef READER_TONGFANG
return config_WITH_CARDREADER() ? 1 : 0;
#else
return 0;
#endif
}
static inline int config_READER_STREAMGUARD(void) {
#ifdef READER_STREAMGUARD
return config_WITH_CARDREADER() ? 1 : 0;
#else
return 0;
#endif
}
static inline int config_READER_BULCRYPT(void) {
#ifdef READER_BULCRYPT
return config_WITH_CARDREADER() ? 1 : 0;
#else
return 0;
#endif
}
static inline int config_CS_CACHEEX(void) {
#ifdef CS_CACHEEX
return 1;
#else
return 0;
#endif
}
static inline int config_QBOXHD(void) {
#ifdef QBOXHD
return 1;
#else
return 0;
#endif
}
static inline int config_ARM(void) {
#ifdef __arm__
return 1;
#else
return 0;
#endif
}
#endif