diff options
author | Kozlov Dmitry <dima@server> | 2010-09-02 19:01:47 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-09-02 19:01:47 +0400 |
commit | b43d224c8a306ff54bbb913c5aab891f82541f6e (patch) | |
tree | c3b6c135030fcd4bba4a2ea44d21745fba254a6c /accel-pptpd/triton/triton.h | |
parent | 81515c09f55f152e8330c3b43ad159be64f494e8 (diff) | |
download | accel-ppp-b43d224c8a306ff54bbb913c5aab891f82541f6e.tar.gz accel-ppp-b43d224c8a306ff54bbb913c5aab891f82541f6e.zip |
rewriting triton library ...
Diffstat (limited to 'accel-pptpd/triton/triton.h')
-rw-r--r-- | accel-pptpd/triton/triton.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/accel-pptpd/triton/triton.h b/accel-pptpd/triton/triton.h index 73640219..2cc4edb4 100644 --- a/accel-pptpd/triton/triton.h +++ b/accel-pptpd/triton/triton.h @@ -115,4 +115,20 @@ int triton_init(const char *conf_file); void triton_run(void); void triton_terminate(void); + +#define __init __attribute__((constructor)) + +#undef offsetof +#ifdef __compiler_offsetof +#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) +#else +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) +#endif + +#define container_of(ptr, type, member) ({ \ + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) + +#define __export __attribute__((visibility("default"))) + #endif |