[SDL] Re: New driver for OpenBSD/wscons

Staffan Ulfberg staffan at ulfberg.se
Tue Nov 22 02:07:45 PST 2005

"Ryan C. Gordon" <icculus at icculus.org> writes:

> You added this in the joystick code:
> -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
> +#if defined(__FreeBSD__) || defined(__NetBSD__) ||
> (defined(__OpenBSD__) && defined(__i386__))
> Is there any reason that piece of code is x86 specific? Does that
> interface only exist as a legacy thing on OpenBSD/x86?

I do not really understand the code, but the following suggests it is
i386 specific:
- The code does not compile on my arm system without the patch.
- The OpenBSD port of SDL includes this patch.
- The only "joystick.h" file on my system is in

Maybe it would have been better to submit two patches, since this is
not strictly part of the wscons driver?  (There are also some patches
in src/audio/openbsd/SDL_openbsdaudio.c, without which the code deos
not compile, so I threw them in with the other stuff, even if the
patches are not strictly part of the wscons driver.)

> Also, the configure.in script added this:
> +        AC_MSG_CHECKING(for wscons support)
> +        video_wscons=no
> +        AC_LANG_C
> +        AC_TRY_COMPILE([
> +       #include <sys/time.h>
> +       #include <dev/wscons/wsconsio.h>
> +        ],[
> +        ],[
> +        video_wscons=yes
> +        ])
> +
> ...it looks like you are only concerned with the existence of
> wsconsio.h...can we just use AC_CHECK_HEADER instead?

Sure!  This is the first time I've ever written something for
autoconf, so I didn't realize the simpler alternative! :)


More information about the SDL mailing list