Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com Message-ID: <3D75F865.27083D77@yahoo.com> Date: Wed, 04 Sep 2002 08:11:17 -0400 From: Earnie Boyd Reply-To: cygwin-developers AT cygwin DOT com X-Accept-Language: en MIME-Version: 1.0 To: cygwin-developers AT cygwin DOT com Subject: Re: GetConsoleWindow References: <3D74CE7E DOT FC9C5BDF AT ieee DOT org> <3D74E346 DOT 53082DA7 AT yahoo DOT com> <3D7537F8 DOT 1050105 AT netscape DOT net> <3D754D71 DOT 9DB9EEDA AT yahoo DOT com> <20020904111259 DOT C1213 AT cygbert DOT vinschen DOT de> <20020904113230 DOT E1213 AT cygbert DOT vinschen DOT de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Corinna Vinschen wrote: > On Wed, Sep 04, 2002 at 11:12:59AM +0200, Corinna Vinschen wrote: > > Earnie, > > > > ever heard of autoload.cc? > > > > The problem is not in Cygwin but in w32api/include: > > > > Excerpt from windef.h: > > > > #ifndef WINVER > > #define WINVER 0x0400 > > #endif > > #ifndef _WIN32_WINNT > > #define _WIN32_WINNT WINVER > > #endif > > > > That variable has to be set to the latest version of Windows available, > > to 0x0510 or 0x0501, that is. > > You can't rely on each application to set it by hand. > > Btw., setting WINVER to >= 0x0500 raises a new problem. In that case > commdlg.h includes unknwn.h which defines interfaces which are only > available with the compiler option -fvtable-thunks. In turn, dll_main.cc > and other stuff which includes commdlg.h isn't compilable anymore. Cygwin cannot use GetConsoleWindow because it doesn't exist before Windows 2000 (W2K). GetConsoleWindow was added 2002-08-30 Christopher January * include/wincon.h: Define GetConsoleWindow(void). I added the guard per MSDN documentation after complaint from Pierre. 2002-09-03 Earnie Boyd * include/wincon.h (GetConsoleWindow): Add _WIN32_WINNT >= 0x0500 guard. We have WINVER set to 0x0400 to avoid the problems you mention. This change to Cygwin =================================================================== RCS file: /cvs/uberbaum/winsup/cygwin/ChangeLog,v retrieving revision 1.1463 retrieving revision 1.1464 diff -u -r1.1463 -r1.1464 --- winsup/cygwin/ChangeLog 2002/08/30 15:47:09 1.1463 +++ winsup/cygwin/ChangeLog 2002/08/30 16:03:52 1.1464 @@ -1,3 +1,9 @@ +2002-08-30 Christopher January + Christopher Faylor + + * tty.cc (tty_list::allocate_tty): Use GetConsoleWindow, if available. + Call FindWindow in a loop. + is what is causing the problems. The code needs conditionalized further, because the function doesn't exist pre W2K. The ChangeLog also needs adjusted to mention the autoload.cc changes. Yes, Cygwin is what is broken with this patch. Earnie.