This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with pex-win32.c
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: mark at codesourcery dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 14 Mar 2006 09:54:48 +1300
- Subject: Re: Problem with pex-win32.c
------------------------------------------------------------------------
--------
Mark Mitchell wrote at http://gcc.gnu.org/ml/gcc/2006-03/msg00441.html
> Here is a sample program which does the right thing (no spurious
console
> windows, all output visible) when run either from a console or from a
> console-free environment, such as a Cygwin xterm. This is the code
> we'll be working into libiberty -- unless someone has a better
solution!
In my experience, following test is not necessary. Win9x just ignores
the CREATE_NO_WINDOWS flag so setting it is a harmless no-op on these
platforms.
> version_info.dwOSVersionInfoSize = sizeof (version_info);
> GetVersionEx (&version_info);
> if (version_info.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
> /* On Windows 95/98/ME the CREATE_NO_WINDOW flag is not
> supported, so we cannot avoid creating a console window. */
> dwCreationFlags = 0;
See also
http://gcc.gnu.org/ml/java-patches/2003-q4/msg00260.html
Danny