-
Notifications
You must be signed in to change notification settings - Fork 14
/
libevil.h
36 lines (26 loc) · 1 KB
/
libevil.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
#ifndef _LIBEVIL_H
#define _LIBEVIL_H
#define __cons __attribute__((constructor))
#define TRAP(func, params) \
evil_##func params; \
static int (*real_##func) params; \
static void set_real_##func (void) __cons; \
static void set_real_##func (void) \
{ real_##func = dlsym (RTLD_NEXT, #func); } \
int __REDIRECT (evil_##func, params, func); \
int evil_##func params
enum {
NO = 0,
YES = 1
};
#define EPOCH_FILE "/.epoch"
#define DEFAULT_FILE "/.default"
#define LICDIR "/lic"
#define PERMITFILE LICDIR "/permit.asc"
#define LICFILE LICDIR "/license.asc"
#define MAX(a,b) ( (a) > (b) ? (a) : (b) )
#define SECS(x) (x)
#define MINS(x) (x * SECS(60))
#define HOURS(x) (x * MINS(60))
#define DAYS(x) (x * HOURS(24))
#endif /* !_LIBEVIL_H */