summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2008-04-16 01:37:14 +0000
committerroot <root>2008-04-16 01:37:14 +0000
commit22a779277c1d3f76c396208dd8e1321ebce87521 (patch)
tree9b83c7378b4ad92794e8990adf0659a66468eab6
parent8176c9f3c1c2e3b60d7ff3cc89c9083c8d0f1826 (diff)
*** empty log message ***
-rw-r--r--Changes1
-rw-r--r--ev.c2
-rw-r--r--ev.h52
3 files changed, 28 insertions, 27 deletions
diff --git a/Changes b/Changes
index 2a3927a..c2106bd 100644
--- a/Changes
+++ b/Changes
@@ -18,6 +18,7 @@ Revision history for libev, a high-performance and full-featured event loop.
- fix ev_async_pending, add c++ wrapper for ev_async
(based on patch sent by Johannes Deisenhofer.
- add sensible set method to ev::embed.
+ - made integer constants type int in ev.h.
3.2 Wed Apr 2 17:11:19 CEST 2008
- fix a 64 bit overflow issue in the select backend,
diff --git a/ev.c b/ev.c
index 51a070e..63cc99f 100644
--- a/ev.c
+++ b/ev.c
@@ -1187,7 +1187,7 @@ loop_init (EV_P_ unsigned int flags)
&& getenv ("LIBEV_FLAGS"))
flags = atoi (getenv ("LIBEV_FLAGS"));
- if (!(flags & 0x0000ffffUL))
+ if (!(flags & 0x0000ffffU))
flags |= ev_recommended_backends ();
#if EV_USE_PORT
diff --git a/ev.h b/ev.h
index ebedcbf..f406e89 100644
--- a/ev.h
+++ b/ev.h
@@ -125,23 +125,23 @@ struct ev_loop;
/*****************************************************************************/
/* eventmask, revents, events... */
-#define EV_UNDEF -1L /* guaranteed to be invalid */
-#define EV_NONE 0x00L /* no events */
-#define EV_READ 0x01L /* ev_io detected read will not block */
-#define EV_WRITE 0x02L /* ev_io detected write will not block */
-#define EV_IOFDSET 0x80L /* internal use only */
-#define EV_TIMEOUT 0x00000100L /* timer timed out */
-#define EV_PERIODIC 0x00000200L /* periodic timer timed out */
-#define EV_SIGNAL 0x00000400L /* signal was received */
-#define EV_CHILD 0x00000800L /* child/pid had status change */
-#define EV_STAT 0x00001000L /* stat data changed */
-#define EV_IDLE 0x00002000L /* event loop is idling */
-#define EV_PREPARE 0x00004000L /* event loop about to poll */
-#define EV_CHECK 0x00008000L /* event loop finished poll */
-#define EV_EMBED 0x00010000L /* embedded event loop needs sweep */
-#define EV_FORK 0x00020000L /* event loop resumed in child */
-#define EV_ASYNC 0x00040000L /* async intra-loop signal */
-#define EV_ERROR 0x80000000L /* sent when an error occurs */
+#define EV_UNDEF -1 /* guaranteed to be invalid */
+#define EV_NONE 0x00 /* no events */
+#define EV_READ 0x01 /* ev_io detected read will not block */
+#define EV_WRITE 0x02 /* ev_io detected write will not block */
+#define EV_IOFDSET 0x80 /* internal use only */
+#define EV_TIMEOUT 0x00000100 /* timer timed out */
+#define EV_PERIODIC 0x00000200 /* periodic timer timed out */
+#define EV_SIGNAL 0x00000400 /* signal was received */
+#define EV_CHILD 0x00000800 /* child/pid had status change */
+#define EV_STAT 0x00001000 /* stat data changed */
+#define EV_IDLE 0x00002000 /* event loop is idling */
+#define EV_PREPARE 0x00004000 /* event loop about to poll */
+#define EV_CHECK 0x00008000 /* event loop finished poll */
+#define EV_EMBED 0x00010000 /* embedded event loop needs sweep */
+#define EV_FORK 0x00020000 /* event loop resumed in child */
+#define EV_ASYNC 0x00040000 /* async intra-loop signal */
+#define EV_ERROR 0x80000000 /* sent when an error occurs */
/* can be used to add custom fields to all watchers, while losing binary compatibility */
#ifndef EV_COMMON
@@ -373,17 +373,17 @@ union ev_any_watcher
/* bits for ev_default_loop and ev_loop_new */
/* the default */
-#define EVFLAG_AUTO 0x00000000UL /* not quite a mask */
+#define EVFLAG_AUTO 0x00000000U /* not quite a mask */
/* flag bits */
-#define EVFLAG_NOENV 0x01000000UL /* do NOT consult environment */
-#define EVFLAG_FORKCHECK 0x02000000UL /* check for a fork in each iteration */
+#define EVFLAG_NOENV 0x01000000U /* do NOT consult environment */
+#define EVFLAG_FORKCHECK 0x02000000U /* check for a fork in each iteration */
/* method bits to be ored together */
-#define EVBACKEND_SELECT 0x00000001UL /* about anywhere */
-#define EVBACKEND_POLL 0x00000002UL /* !win */
-#define EVBACKEND_EPOLL 0x00000004UL /* linux */
-#define EVBACKEND_KQUEUE 0x00000008UL /* bsd */
-#define EVBACKEND_DEVPOLL 0x00000010UL /* solaris 8 */ /* NYI */
-#define EVBACKEND_PORT 0x00000020UL /* solaris 10 */
+#define EVBACKEND_SELECT 0x00000001U /* about anywhere */
+#define EVBACKEND_POLL 0x00000002U /* !win */
+#define EVBACKEND_EPOLL 0x00000004U /* linux */
+#define EVBACKEND_KQUEUE 0x00000008U /* bsd */
+#define EVBACKEND_DEVPOLL 0x00000010U /* solaris 8 */ /* NYI */
+#define EVBACKEND_PORT 0x00000020U /* solaris 10 */
#if EV_PROTOTYPES
int ev_version_major (void);