* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if EV_USE_CONFIG_H
+#ifndef EV_STANDALONE
# include "config.h"
#endif
typedef struct
{
- struct ev_io *head;
+ struct ev_watcher_list *head;
unsigned char events;
unsigned char reify;
} ANFD;
ANFD *anfd = anfds + fd;
struct ev_io *w;
- for (w = anfd->head; w; w = w->next)
+ for (w = (struct ev_io *)anfd->head; w; w = (struct ev_io *)((WL)w)->next)
{
int ev = w->events & events;
int events = 0;
- for (w = anfd->head; w; w = w->next)
+ for (w = (struct ev_io *)anfd->head; w; w = (struct ev_io *)((WL)w)->next)
events |= w->events;
anfd->reify = 0;
{
struct ev_io *w;
- printf ("killing fd %d\n", fd);//D
- while ((w = anfds [fd].head))
+ while ((w = (struct ev_io *)anfds [fd].head))
{
ev_io_stop (w);
event ((W)w, EV_ERROR | EV_READ | EV_WRITE);
typedef struct
{
- struct ev_signal *head;
+ struct ev_watcher_list *head;
sig_atomic_t volatile gotsig;
} ANSIG;
static void
sigcb (struct ev_io *iow, int revents)
{
- struct ev_signal *w;
+ struct ev_watcher_list *w;
int signum;
read (sigpipe [0], &revents, 1);
{
struct ev_child *w;
- for (w = childs [chain & (PID_HASHSIZE - 1)]; w; w = w->next)
+ for (w = (struct ev_child *)childs [chain & (PID_HASHSIZE - 1)]; w; w = (struct ev_child *)((WL)w)->next)
if (w->pid == pid || !w->pid)
{
w->priority = sw->priority; /* need to do it *now* */
w->rpid = pid;
w->rstatus = status;
- printf ("rpid %p %d %d\n", w, pid, w->pid);//D
event ((W)w, EV_CHILD);
}
}
{
int pid, status;
- printf ("chld %x\n", revents);//D
if (0 < (pid = waitpid (-1, &status, WNOHANG | WUNTRACED | WCONTINUED)))
{
/* make sure we are called again until all childs have been reaped */
return 0;
if (methods == EVMETHOD_AUTO)
- if (!enable_secure () && getenv ("LIBEV_METHODS"))
- methods = atoi (getenv ("LIBEV_METHODS"));
- else
- methods = EVMETHOD_ANY;
+ if (!enable_secure () && getenv ("LIBEV_METHODS"))
+ methods = atoi (getenv ("LIBEV_METHODS"));
+ else
+ methods = EVMETHOD_ANY;
ev_method = 0;
#if EV_USE_KQUEUE