lilypond-devel
[Top][All Lists]
Advanced

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

Re: building lilypond.exe to test WinME fixes


From: Jan Nieuwenhuizen
Subject: Re: building lilypond.exe to test WinME fixes
Date: Sat, 09 Jul 2005 11:19:10 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Brynne and Russ Jorgensen writes:

> if (GetStdHandle (STD_OUTPUT_HANDLE) == INVALID_HANDLE) {
>       /* send stdout to nul device */
>       freopen ("nul$", "w", stdout);
> }
>
> This shouldn't cause problems on other versions of Windows, but if we
> wanted to be super conservative we could conditionalize it for just
> Win9x/ME.

I've built a new version using the patch below.  This is not the
official 2.6.1 yet.  Can some of you test/report on what flavours of
windows this works?

    http://lilypond.org/people/janneke/windhoos

Thanks,
Jan.

--- main.cc     14 jun 2005 02:19:37 +0200      1.264
+++ main.cc     09 jul 2005 10:37:27 +0200      
@@ -726,9 +726,25 @@ parse_argv (int argc, char **argv)
     }
 }
 
+#ifdef __MINGW32__
+#  include "windows.h"
+#  ifndef INVALID_HANDLE
+#    define INVALID_HANDLE ((void*) -1)
+#  endif
+#endif
+
 int
 main (int argc, char **argv)
 {
+#ifdef __MINGW32__
+  /* Possible gs.exe fix for DOS-based Windowses.  */
+  if (GetStdHandle (STD_OUTPUT_HANDLE) == INVALID_HANDLE)
+    {
+      freopen ("nul$", "w", stdout);
+      freopen ("nul$", "w", stderr);
+    }
+#endif
+
   setup_localisation ();
   setup_paths (argv[0]);
   parse_argv (argc, argv);


-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org




reply via email to

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