On Fri, Aug 17, 2018 at 03:26:23PM +0200, Kamil Rytarowski wrote:
> On 17.08.2018 15:16, Thomas Klausner wrote:
> > Hi!
> > 
> > Does anyone know why NetBSD has udata defined as intptr_t in kqueue(3)?
> > 
> > I.e.:
> > 
> >      EV_SET(&kev, ident, filter, flags, fflags, data, udata);
> > 
> > where the values are defined as:
> > 
> >      struct kevent {
> >              uintptr_t ident;        /* identifier for this event */
> >              uint32_t  filter;       /* filter for event */
> >              uint32_t  flags;        /* action flags for kqueue */
> >              uint32_t  fflags;       /* filter flag value */
> >              int64_t   data;         /* filter data value */
> >              intptr_t  udata;        /* opaque user data identifier */
> >      };
> > 
> > while other operating systems have udata as "void *" instead?
> > This currently causes a bug report in wxWidgets.
> > 
> 
> (Recent?) C++ is more sensitive to casts. In C everything works under
> the neath.
> 
> There might be an option to make it more compatible for C++ this way:
...

I was wondering if the difference is even necessary or if we should
match other operating systems in this aspect.

(fixing wxWidgets is ongoing, that's not the issue here)
 Thomas

Reply via email to