bug-texinfo
[Top][All Lists]
Advanced

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

Current trunk is broken for MinGW, patches included


From: Eli Zaretskii
Subject: Current trunk is broken for MinGW, patches included
Date: Wed, 24 Dec 2014 19:41:45 +0200

I've built the current trunk using MinGW toolchain on MS-Windows, and
found the build of the stand-alone Info reader broken.  It didn't even
compile at first, because of these problems:

  . memrchr and asprintf are being used, but the corresponding Gnulib
    modules were not imported, and so the build on any platform that
    lacks these is broken.

  . man.c has reshuffled code that doesn't compile because it uses an
    undeclared variable in the non-HAVE_FORK branch of
    get_manpage_from_formatter.  Suggested patch below.

In addition, there are non-fatal warnings: libiconv routines are
called with 'char **' arguments where the functions expect to get a
'const char **' argument, and there's one case of conflicting
prototypes in pcterm.c.  Patch for the latter is below; as for the
iconv problem, I'm unsure how best to solve this, since I don't
understand why the code doesn't use the correct types -- perhaps
because non-GNU implementations of libiconv need that?

Once I got past these problems, the reader crashed upon the first
keypress.  It turns out the new code that initializes the
byte_seq_to_key array was not called when there's a
terminal_initialize_terminal_hook.  Patch for this is also below.

I wonder if there's a way to avoid such severe breakage during
development.  Is there perhaps some CI-type buildbot somewhere that
the project uses?  If so, is it possible to set it up to try the MinGW
(cross-)build as well?  Failing that, is there some mailing list that
disseminates all the commits, to which I could subscribe and watch the
changes, so I could alert about any problems I spot sooner?  Any other
suggestions?

Thanks in advance.

P.S.  I did that build to try to see how best to incorporate patches
suggested a month and a half ago, see
http://lists.gnu.org/archive/html/bug-texinfo/2014-11/msg00005.html.
I will write separately about that soon, once I finish testin the
changes I'd like to propose.

Here are the patches I suggest for the problems listed above.  If
accepted, I think I can commit them myself (with the appropriate
ChangeLog entries, of course).

This fixes conflicting declarations in pcterm.c:

--- info/pcterm.c~0     2014-12-23 21:51:59 +0200
+++ info/pcterm.c       2014-12-24 16:11:06 +0200
@@ -71,6 +73,7 @@ enum text_modes { LASTMODE=-1 };
 #endif
 
 #include "variables.h"
+#include "session.h"
 
 extern int speech_friendly;    /* defined in info.c */
 
@@ -176,7 +191,7 @@ gettextinfo (struct text_info *ti)
                          errbuf, sizeof (errbuf), NULL))
        sprintf (errbuf, "w32 error %u", error_no);
       CloseHandle (hinfo);
-      info_error (_("Terminal cannot be initialized: %s\n"), errbuf, NULL);
+      info_error (_("Terminal cannot be initialized: %s\n"), errbuf);
       exit (1);
     }
 }
@@ -1189,7 +1277,6 @@ install_keyboard_handler (void)
 
 #include <limits.h>
 #include "signals.h"
-#include "session.h"
 
 #ifndef PATH_MAX
 # define PATH_MAX 512


This initializes byte_seq_to_key:

--- info/terminal.c~0   2014-12-23 21:51:59 +0200
+++ info/terminal.c     2014-12-24 10:13:04 +0200
@@ -723,6 +723,7 @@ terminal_initialize_terminal (char *term
   if (terminal_initialize_terminal_hook)
     {
       (*terminal_initialize_terminal_hook) (terminal_name);
+      initialize_byte_map ();
       return;
     }
 

This fixes a compilation error due to undeclared variable:

--- info/man.c~0        2014-12-23 21:51:59 +0200
+++ info/man.c  2014-12-24 09:14:52 +0200
@@ -386,7 +386,7 @@ get_manpage_from_formatter (char *format
     int fd_err = open (NULL_DEVICE, O_WRONLY, 0666);
     int i;
 
-    for (i = 0; i < arg_index; i++)
+    for (i = 0; formatter_args[i]; i++)
       cmdlen += strlen (formatter_args[i]);
     /* Add-ons: 2 blanks, 2 quotes for the formatter program, 1
        terminating null character.  */



reply via email to

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