bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] select/poll Wine bug workaround


From: Bruno Haible
Subject: Re: [PATCH] select/poll Wine bug workaround
Date: Wed, 5 Aug 2009 07:50:36 +0200
User-agent: KMail/1.9.9

Paolo Bonzini wrote:
> #define IsHandleConsole(h) (((long) (h) & 3) == 3)

Where have you seen a documentation of the bit patterns of handles?
This will not necessarily work in all implementations (Windows, Wine,
ReactOS).

The documented way to test for a console handle is like this:

static BOOL
IsHandleConsole(HANDLE h)
{
  DWORD mode;
  return GetConsoleMode (h, &mode);
}

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]