summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2011-02-16 08:02:49 +0000
committerroot <root>2011-02-16 08:02:49 +0000
commit748f4fe50508fa0f8253355b62aa93873bdd6058 (patch)
tree90a30bc98913362dfc6354853cffebe02fa2b4bf
parent0eee55b11b154595ce4856ddda9802cdbacc4e86 (diff)
ws cleanup, changes
-rw-r--r--Changes7
-rw-r--r--ev++.h6
-rw-r--r--ev.c10
-rw-r--r--ev.h6
-rw-r--r--ev_epoll.c6
-rw-r--r--ev_kqueue.c10
-rw-r--r--ev_poll.c6
-rw-r--r--ev_port.c6
-rw-r--r--ev_select.c14
-rw-r--r--ev_vars.h6
-rw-r--r--ev_win32.c12
-rw-r--r--event.c6
-rw-r--r--event.h6
-rw-r--r--event_compat.h2
14 files changed, 52 insertions, 51 deletions
diff --git a/Changes b/Changes
index c9b05c0..d6fca2f 100644
--- a/Changes
+++ b/Changes
@@ -1,8 +1,9 @@
Revision history for libev, a high-performance and full-featured event loop.
-TODO: signal mask problem documentation
-TODO: ev_loop_wakeup
-TODO: windows handle caching, added/not removed in ev_select.c
+4.04 Wed Feb 16 09:01:51 CET 2011
+ - fix two problems in the native win32 backend, where reuse of fd's
+ with different underlying handles caused handles not to be removed
+ or added to the select set (analyzed and tested by Bert Belder).
- do no rely on ceil() in ev_e?poll.c.
- backport libev to HP-UX versions before 11 v3.
- configure did not detect nanosleep and clock_gettime properly when
diff --git a/ev++.h b/ev++.h
index d85be55..ce42b5f 100644
--- a/ev++.h
+++ b/ev++.h
@@ -6,14 +6,14 @@
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
diff --git a/ev.c b/ev.c
index 0d71a40..4187b18 100644
--- a/ev.c
+++ b/ev.c
@@ -6,14 +6,14 @@
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
@@ -1371,7 +1371,7 @@ pipecb (EV_P_ ev_io *iow, int revents)
#if EV_SIGNAL_ENABLE
if (sig_pending)
- {
+ {
sig_pending = 0;
for (i = EV_NSIG - 1; i--; )
@@ -3080,7 +3080,7 @@ infy_add (EV_P_ ev_stat *w)
*pend = 0;
w->wd = inotify_add_watch (fs_fd, path, mask);
- }
+ }
while (w->wd < 0 && (errno == ENOENT || errno == EACCES));
}
}
diff --git a/ev.h b/ev.h
index 9edf656..874fdfd 100644
--- a/ev.h
+++ b/ev.h
@@ -6,14 +6,14 @@
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
diff --git a/ev_epoll.c b/ev_epoll.c
index 2c9dda0..5deb652 100644
--- a/ev_epoll.c
+++ b/ev_epoll.c
@@ -6,14 +6,14 @@
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
diff --git a/ev_kqueue.c b/ev_kqueue.c
index 0d809f5..1b526d1 100644
--- a/ev_kqueue.c
+++ b/ev_kqueue.c
@@ -6,14 +6,14 @@
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
@@ -103,12 +103,12 @@ kqueue_poll (EV_P_ ev_tstamp timeout)
kqueue_changecnt = 0;
if (expect_false (res < 0))
- {
+ {
if (errno != EINTR)
ev_syserr ("(libev) kevent");
return;
- }
+ }
for (i = 0; i < res; ++i)
{
diff --git a/ev_poll.c b/ev_poll.c
index e15504b..e53ae0d 100644
--- a/ev_poll.c
+++ b/ev_poll.c
@@ -6,14 +6,14 @@
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
diff --git a/ev_port.c b/ev_port.c
index a078de5..0ffebc3 100644
--- a/ev_port.c
+++ b/ev_port.c
@@ -6,14 +6,14 @@
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
diff --git a/ev_select.c b/ev_select.c
index 3549995..0ea9467 100644
--- a/ev_select.c
+++ b/ev_select.c
@@ -6,14 +6,14 @@
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
@@ -283,10 +283,10 @@ select_init (EV_P_ int flags)
#endif
#else
vec_max = 0;
- vec_ri = 0;
- vec_ro = 0;
- vec_wi = 0;
- vec_wo = 0;
+ vec_ri = 0;
+ vec_ro = 0;
+ vec_wi = 0;
+ vec_wo = 0;
#ifdef _WIN32
vec_eo = 0;
#endif
diff --git a/ev_vars.h b/ev_vars.h
index 17d77c8..5ee3ed1 100644
--- a/ev_vars.h
+++ b/ev_vars.h
@@ -6,14 +6,14 @@
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
diff --git a/ev_win32.c b/ev_win32.c
index ee60ae6..338886e 100644
--- a/ev_win32.c
+++ b/ev_win32.c
@@ -6,14 +6,14 @@
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
@@ -46,7 +46,7 @@
/* MSDN says this is required to handle SIGFPE */
/* my wild guess would be that using something floating-pointy is required */
/* for the crt to do something about it */
-volatile double SIGFPE_REQ = 0.0f;
+volatile double SIGFPE_REQ = 0.0f;
/* oh, the humanity! */
static int
@@ -59,7 +59,7 @@ ev_pipe (int filedes [2])
SOCKET listener;
SOCKET sock [2] = { -1, -1 };
- if ((listener = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
+ if ((listener = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
return -1;
addr.sin_family = AF_INET;
@@ -75,7 +75,7 @@ ev_pipe (int filedes [2])
if (listen (listener, 1))
goto fail;
- if ((sock [0] = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
+ if ((sock [0] = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
goto fail;
if (connect (sock [0], (struct sockaddr *)&addr, addr_size))
diff --git a/event.c b/event.c
index 579423f..aaf6d53 100644
--- a/event.c
+++ b/event.c
@@ -6,14 +6,14 @@
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
diff --git a/event.h b/event.h
index 6411fb6..10ff05a 100644
--- a/event.h
+++ b/event.h
@@ -6,14 +6,14 @@
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
diff --git a/event_compat.h b/event_compat.h
index d5cc1ef..c62802c 100644
--- a/event_compat.h
+++ b/event_compat.h
@@ -182,7 +182,7 @@ int evbuffer_read(struct evbuffer *, int, int);
u_char *evbuffer_find(struct evbuffer *, const u_char *, size_t);
void evbuffer_setcb(struct evbuffer *, void (*)(struct evbuffer *, size_t, size_t, void *), void *);
-/*
+/*
* Marshaling tagged data - We assume that all tags are inserted in their
* numeric order - so that unknown tags will always be higher than the
* known ones - and we can just ignore the end of an event buffer.