[Mono-dev] [RFC 09/12] console-unix: Workaround FIONREAD ioctl for Haiku

Miguel de Icaza miguel at novell.com
Fri Mar 26 12:13:10 EDT 2010


Well, this is broken, and I rather not add workarounds to mono for broken code.

So this should not go in.

On Fri, Mar 26, 2010 at 9:30 AM, Andreas Färber <andreas.faerber at web.de> wrote:
> This commit is licensed under the MIT X11 license.
> ---
>  mono/metadata/console-unix.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/mono/metadata/console-unix.c b/mono/metadata/console-unix.c
> index 7280b6f..324c0c1 100644
> --- a/mono/metadata/console-unix.c
> +++ b/mono/metadata/console-unix.c
> @@ -159,10 +159,14 @@ ves_icall_System_ConsoleDriver_InternalKeyAvailable (gint32 timeout)
>        } while (ret == -1 && errno == EINTR);
>
>        if (ret > 0) {
> +#ifdef __HAIKU__
> +               ret = 0;
> +#else
>                nbytes = 0;
>                ret = ioctl (STDIN_FILENO, FIONREAD, &nbytes);
>                if (ret >= 0)
>                        ret = nbytes;
> +#endif
>        }
>
>        return (ret > 0) ? ret : 0;
> --
> 1.6.5.3
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>


More information about the Mono-devel-list mailing list