CLEANUP: polling: gcc doesn't always optimize constants away

In ev_poll and ev_epoll, we have a bit-to-bit mapping between the POLL_
constants and the FD_POLL_ constants. A comment said that gcc was able
to detect this and to automatically apply a mask. Things have possibly
changed since the output assembly doesn't always reflect this. So let's
perform an explicit assignment when bits are equal.
diff --git a/src/ev_poll.c b/src/ev_poll.c
index cdc357f..2c7501d 100644
--- a/src/ev_poll.c
+++ b/src/ev_poll.c
@@ -154,12 +154,21 @@
 		if (!fdtab[fd].owner)
 			continue;
 
+		/* it looks complicated but gcc can optimize it away when constants
+		 * have same values... In fact it depends on gcc :-(
+		 */
 		fdtab[fd].ev &= FD_POLL_STICKY;
-		fdtab[fd].ev |=
-			((e & POLLIN ) ? FD_POLL_IN  : 0) |
-			((e & POLLOUT) ? FD_POLL_OUT : 0) |
-			((e & POLLERR) ? FD_POLL_ERR : 0) |
-			((e & POLLHUP) ? FD_POLL_HUP : 0);
+		if (POLLIN == FD_POLL_IN && POLLOUT == FD_POLL_OUT &&
+		    POLLERR == FD_POLL_ERR && POLLHUP == FD_POLL_HUP) {
+			fdtab[fd].ev |= e & (POLLIN|POLLOUT|POLLERR|POLLHUP);
+		}
+		else {
+			fdtab[fd].ev |=
+				((e & POLLIN ) ? FD_POLL_IN  : 0) |
+				((e & POLLOUT) ? FD_POLL_OUT : 0) |
+				((e & POLLERR) ? FD_POLL_ERR : 0) |
+				((e & POLLHUP) ? FD_POLL_HUP : 0);
+		}
 
 		if (fdtab[fd].iocb && fdtab[fd].owner && fdtab[fd].ev) {
 			/* Mark the events as speculative before processing