[PATCH]: mtdev could be disabled at configuration
Pekka Paalanen
ppaalanen at gmail.com
Tue Jun 11 06:12:14 PDT 2013
On Tue, 11 Jun 2013 14:41:18 +0200
Marc Chalain <marc.chalain at gmail.com> wrote:
> Hello
> The detection of the library is automatically done during the
> configuration. The option is not useful.
>
> And the use #ifdef HAVE_MTDEV seems to be simpler, if in the future this
> feature will disappear.
>
> What I do ? I send again or I increase the complexity.
Send again. I think distro packagers would like a ./configure switch
with yes/no/auto, defaulting to auto.
I didn't even realize the --disable-mtdev was not actually a configure
option.
Here's what I meant earlier (pseudo code):
#ifdef HAVE_MTDEV
#include <mtdev.h>
#else
struct mtdev
{
int dummy;
};
static inline int
mtdev_get(struct mtdev *, int, blah*, int)
{
return -1;
}
static inline void
mtdev_close_delete(struct mtdev *)
{
}
#endif
That way the significant code will have only one #ifdef after the above
in the top of the file.
device->mtdev will always be NULL, anyway, so these stubs will never be
called, and the compiler is still happy.
Thanks,
pq
More information about the wayland-devel
mailing list