Definition conflict: EV_ERROR

Marc Lehmann schmorp at schmorp.de
Wed Feb 8 20:55:27 CET 2012


On Wed, Feb 08, 2012 at 08:43:18PM +0800, 191919 <191919 at gmail.com> wrote:
> In ev.h, EV_ERROR is defined as an enum value: 
> 
>   EV_ERROR    = 0x80000000  /* sent when an error occurs */
> 
> but in systems which have kqueue, EV_ERROR is defined for the use of kqueue itself:
> 
> /usr/include/sys/event.h:#define EV_ERROR       0x4000          /* error, data contains errno */

ev.h doesn't include sys/event.h - how do you get a conflict? the compiled
libev itself uses the wrong value for EV_ERROR?

> I suggest libev rename EV_ERROR to EV_EVERROR or something else. 

Well, too late for that.

If you run into a problem becaue libev uses the wrong symbol for EV_ERROR,
can you add this to the *end* of ev_kqueue.c and see if that fixes these
problems?

   #undef EV_ERROR

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\



More information about the libev mailing list