… | |
… | |
9 | |
9 | |
10 | /* due to bugs in OS X we have to use libev/ explicitly here */ |
10 | /* due to bugs in OS X we have to use libev/ explicitly here */ |
11 | #include "libev/ev.c" |
11 | #include "libev/ev.c" |
12 | #include "event.c" |
12 | #include "event.c" |
13 | #define DNS_USE_GETTIMEOFDAY_FOR_ID 1 |
13 | #define DNS_USE_GETTIMEOFDAY_FOR_ID 1 |
|
|
14 | #if !defined (WIN32) && !defined(__CYGWIN__) |
14 | #define HAVE_STRUCT_IN6_ADDR 1 |
15 | # define HAVE_STRUCT_IN6_ADDR 1 |
|
|
16 | #endif |
15 | #undef HAVE_STRTOK_R |
17 | #undef HAVE_STRTOK_R |
16 | #undef strtok_r |
18 | #undef strtok_r |
17 | #define strtok_r fake_strtok_r |
19 | #define strtok_r fake_strtok_r |
18 | #include "evdns.c" |
20 | #include "evdns.c" |
|
|
21 | |
|
|
22 | #ifndef WIN32 |
|
|
23 | # include <pthread.h> |
|
|
24 | #endif |
19 | |
25 | |
20 | typedef int Signal; |
26 | typedef int Signal; |
21 | |
27 | |
22 | static struct EVAPI evapi; |
28 | static struct EVAPI evapi; |
23 | |
29 | |
… | |
… | |
315 | |
321 | |
316 | sv_setiv (sv, (IV)&evapi); |
322 | sv_setiv (sv, (IV)&evapi); |
317 | SvREADONLY_on (sv); |
323 | SvREADONLY_on (sv); |
318 | } |
324 | } |
319 | |
325 | |
|
|
326 | #ifndef WIN32 |
320 | pthread_atfork (0, 0, ev_default_fork); |
327 | pthread_atfork (0, 0, ev_default_fork); |
|
|
328 | #endif |
321 | } |
329 | } |
322 | |
330 | |
323 | NV ev_now () |
331 | NV ev_now () |
324 | |
332 | |
325 | int ev_method () |
333 | int ev_method () |