This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GetConsoleWindow


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 <ccj00@doc.ic.ac.uk>

        * include/wincon.h: Define GetConsoleWindow(void).

I added the guard per MSDN documentation after complaint from Pierre.

2002-09-03  Earnie Boyd  <earnie@users.sf.net>

        * 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  <chris@atomice.net>
+           Christopher Faylor  <cgf@redhat.com>
+
+       * 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]