… | |
… | |
186 | # endif |
186 | # endif |
187 | #endif |
187 | #endif |
188 | |
188 | |
189 | /* this block tries to deduce configuration from header-defined symbols and defaults */ |
189 | /* this block tries to deduce configuration from header-defined symbols and defaults */ |
190 | |
190 | |
|
|
191 | /* try to deduce the maximum number of signals on this platform */ |
|
|
192 | #if defined (EV_NSIG) |
|
|
193 | /* use what's provided */ |
|
|
194 | #elif defined (NSIG) |
|
|
195 | # define EV_NSIG (NSIG) |
|
|
196 | #elif defined(_NSIG) |
|
|
197 | # define EV_NSIG (_NSIG) |
|
|
198 | #elif defined (SIGMAX) |
|
|
199 | # define EV_NSIG (SIGMAX+1) |
|
|
200 | #elif defined (SIG_MAX) |
|
|
201 | # define EV_NSIG (SIG_MAX+1) |
|
|
202 | #elif defined (_SIG_MAX) |
|
|
203 | # define EV_NSIG (_SIG_MAX+1) |
|
|
204 | #elif defined (MAXSIG) |
|
|
205 | # define EV_NSIG (MAXSIG+1) |
|
|
206 | #elif defined (MAX_SIG) |
|
|
207 | # define EV_NSIG (MAX_SIG+1) |
|
|
208 | #elif defined (SIGARRAYSIZE) |
|
|
209 | # define EV_NSIG SIGARRAYSIZE /* Assume ary[SIGARRAYSIZE] */ |
|
|
210 | #elif defined (_sys_nsig) |
|
|
211 | # define EV_NSIG (_sys_nsig) /* Solaris 2.5 */ |
|
|
212 | #else |
|
|
213 | # error "unable to find value for NSIG, please report" |
|
|
214 | /* to make it compile regardless, just remove the above line */ |
|
|
215 | # define EV_NSIG 64 |
|
|
216 | #endif |
|
|
217 | |
|
|
218 | /* Default to some arbitrary number that's big enough to get most |
|
|
219 | of the common signals. |
|
|
220 | */ |
|
|
221 | #ifndef NSIG |
|
|
222 | # define NSIG 50 |
|
|
223 | #endif |
|
|
224 | /* <-- NSIG logic from Configure */ |
191 | #ifndef EV_USE_CLOCK_SYSCALL |
225 | #ifndef EV_USE_CLOCK_SYSCALL |
192 | # if __linux && __GLIBC__ >= 2 |
226 | # if __linux && __GLIBC__ >= 2 |
193 | # define EV_USE_CLOCK_SYSCALL 1 |
227 | # define EV_USE_CLOCK_SYSCALL 1 |
194 | # else |
228 | # else |
195 | # define EV_USE_CLOCK_SYSCALL 0 |
229 | # define EV_USE_CLOCK_SYSCALL 0 |
… | |
… | |
1630 | #if EV_IDLE_ENABLE |
1664 | #if EV_IDLE_ENABLE |
1631 | array_free (idle, [i]); |
1665 | array_free (idle, [i]); |
1632 | #endif |
1666 | #endif |
1633 | } |
1667 | } |
1634 | |
1668 | |
1635 | ev_free (anfds); anfdmax = 0; |
1669 | ev_free (anfds); anfds = 0; anfdmax = 0; |
1636 | |
1670 | |
1637 | /* have to use the microsoft-never-gets-it-right macro */ |
1671 | /* have to use the microsoft-never-gets-it-right macro */ |
1638 | array_free (rfeed, EMPTY); |
1672 | array_free (rfeed, EMPTY); |
1639 | array_free (fdchange, EMPTY); |
1673 | array_free (fdchange, EMPTY); |
1640 | array_free (timer, EMPTY); |
1674 | array_free (timer, EMPTY); |