… | |
… | |
183 | # include EV_H |
183 | # include EV_H |
184 | #else |
184 | #else |
185 | # include "ev.h" |
185 | # include "ev.h" |
186 | #endif |
186 | #endif |
187 | |
187 | |
188 | EV_CPP(extern "C" {) |
|
|
189 | |
|
|
190 | #ifndef _WIN32 |
188 | #ifndef _WIN32 |
191 | # include <sys/time.h> |
189 | # include <sys/time.h> |
192 | # include <sys/wait.h> |
190 | # include <sys/wait.h> |
193 | # include <unistd.h> |
191 | # include <unistd.h> |
194 | #else |
192 | #else |
… | |
… | |
1303 | |
1301 | |
1304 | do |
1302 | do |
1305 | ncur <<= 1; |
1303 | ncur <<= 1; |
1306 | while (cnt > ncur); |
1304 | while (cnt > ncur); |
1307 | |
1305 | |
1308 | /* if size is large, round to MALLOC_ROUND - 4 * longs to accomodate malloc overhead */ |
1306 | /* if size is large, round to MALLOC_ROUND - 4 * longs to accommodate malloc overhead */ |
1309 | if (elem * ncur > MALLOC_ROUND - sizeof (void *) * 4) |
1307 | if (elem * ncur > MALLOC_ROUND - sizeof (void *) * 4) |
1310 | { |
1308 | { |
1311 | ncur *= elem; |
1309 | ncur *= elem; |
1312 | ncur = (ncur + elem + (MALLOC_ROUND - 1) + sizeof (void *) * 4) & ~(MALLOC_ROUND - 1); |
1310 | ncur = (ncur + elem + (MALLOC_ROUND - 1) + sizeof (void *) * 4) & ~(MALLOC_ROUND - 1); |
1313 | ncur = ncur - sizeof (void *) * 4; |
1311 | ncur = ncur - sizeof (void *) * 4; |
… | |
… | |
4416 | |
4414 | |
4417 | #if EV_MULTIPLICITY |
4415 | #if EV_MULTIPLICITY |
4418 | #include "ev_wrap.h" |
4416 | #include "ev_wrap.h" |
4419 | #endif |
4417 | #endif |
4420 | |
4418 | |
4421 | EV_CPP(}) |
|
|
4422 | |
|
|